bot.on('message', async message => { let args = message.content.substring(prefix.length).split(" ") if (message.content.startsWith(`${prefix}giveaway`)) { let time = args[1] if (!time) return message.channel.send('Doste Aziz Shoma Time Giveaway Ra Entekhab Nakardid'); if ( !args[1].endsWith("d") && !args[1].endsWith("h") && !args[1].endsWith("m") && !args[1].endsWith("s") ) return message.channel.send(`Shoma Bayad Baraye Time Az d(days), h(hours), m(minutes), s(secend) baraye mesal:${prefix}giveaway 1m #channel Nitro`) let gchannel = message.mentions.channels.first(); if (!gchannel) return message.channel.send("Man Nmitavanam Channeli Ke Mikhayid Ru Peyda konam") let prize = args.slice(3).join(" ") if (!prize) return message.channel.send('Aziz Man Muzuei Chiye?') message.delete() gchannel.send(":tada: **NEW GIVEAWAY** :tada:") let gembed = new Discord.MessageEmbed() .setTitle('NEW GIVEAWAY') .setColor('#ce03fc') .setDescription(`Baraye Join Shodan Be Giveaway Bar Ruye :tada: Click Konid\nSakhte Shode Tavasote: **${message.author}**\nTime: **${time}**\nMuzuie: **${prize}**`) .setTimestamp() .setFooter('IR Galaxy Giveaway‚ú¶Dev:AliReza') let m = await gchannel.send(gembed) m.react("????") setTimeout(() => { if (m.reactions.cache.get("????").count <= 1) { return message.channel.send("||@everyone|| Be Dalil Inke Kasi Dar GiveAway Sherkat Nakard Jayeze Beyn Owner Ya Admin Ha Taghsim Mihavad \<:805399975843463198:807927155040190485>") } let winner = m.reactions.cache.get("????").users.cache.filter((u) => !u.bot).random(); gchannel.send(`Mobarake ${winner} Shoma Barande **${prize}** Shodid` ); }, ms(args[1])); } })