diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-03-21 19:07:27 -0400 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-03-21 19:07:27 -0400 |
| commit | d6a86a09c334360c2cdee952a579a9a8b5adad7d (patch) | |
| tree | 4b515ce82d8e27503ad89c80bcb6182501acb3c6 /commands/Owners Only | |
| parent | 3de5a9dbbce2339d0a2db8e3389cd67a668a9daf (diff) | |
| download | PokeBot-d6a86a09c334360c2cdee952a579a9a8b5adad7d.tar.gz PokeBot-d6a86a09c334360c2cdee952a579a9a8b5adad7d.tar.bz2 PokeBot-d6a86a09c334360c2cdee952a579a9a8b5adad7d.zip | |
i doubt this will work
Diffstat (limited to 'commands/Owners Only')
| -rw-r--r-- | commands/Owners Only/triggeregg.js | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/commands/Owners Only/triggeregg.js b/commands/Owners Only/triggeregg.js index 472afd9..b695729 100644 --- a/commands/Owners Only/triggeregg.js +++ b/commands/Owners Only/triggeregg.js @@ -18,22 +18,27 @@ * * *************************************/ -exports.run = async (bot, msg, args) => { - if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(msg.author.id)) { - msg.reply('Nope! You need the person who created this bot to use this command.'); +exports.run = async (bot, msg) => { + if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(msg.author.id)) { + msg.reply('Nope! You need the person who created this bot to use this command.'); + } + else { + if (Math.random() > 0.5) { + msg.guild.channels.find('name', 'pokeegghunt').send(':egg: **An egg is available!** First two people to type egg gets to battle! *Someone needs to battle for it though...*'); } else { - msg.guild.channels.find('name', 'pokeegghunt').send(':egg: **An egg is available!** *Someone needs to battle for it though...*'); + const gym = msg.guild.channels.filter(channel => channel.type == 'category').find('id', '417149626433404940').children.random().name; + msg.guild.channels.find('name', 'pokeegghunt').send(':egg: **An egg is available!** *Someone needs to battle for it though...* Go to ' + gym + 'to get it. In 5 minutes, the person holding the gym gets the egg!'); } - }; - - exports.conf = { - aliases: [], - guildOnly: true, - }; - - exports.help = { - name: 'triggeregg', - description: 'Sends an egg out for players to collect', - }; -
\ No newline at end of file + } +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'triggeregg', + description: 'Sends an egg out for players to collect', +}; |
