diff options
| author | Trey <trey6979@gmail.com> | 2018-04-06 13:37:22 -0400 |
|---|---|---|
| committer | Trey <trey6979@gmail.com> | 2018-04-06 13:37:22 -0400 |
| commit | 20b860bb2299d4a45aa9899fcab2b340cbe9a0b5 (patch) | |
| tree | 4022b84287f9df17854947a6f6ae98665719f209 /commands | |
| parent | b85b686829798f29f5f19fe919ae8807ef9ad69c (diff) | |
| parent | e39d116465334ce84ee06267e8defb6007dddf22 (diff) | |
| download | PokeBot-20b860bb2299d4a45aa9899fcab2b340cbe9a0b5.tar.gz PokeBot-20b860bb2299d4a45aa9899fcab2b340cbe9a0b5.tar.bz2 PokeBot-20b860bb2299d4a45aa9899fcab2b340cbe9a0b5.zip | |
Merge branch 'master' of https://github.com/PokeWorld/PokeBot
Diffstat (limited to 'commands')
46 files changed, 168 insertions, 662 deletions
diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 16d5d24..48f53e0 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -3,18 +3,7 @@ * 8ball: Plugin for PokeBot that allows users to use an 8ball. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/balance.js b/commands/Fun/balance.js index 6bfd2b0..afe094e 100644 --- a/commands/Fun/balance.js +++ b/commands/Fun/balance.js @@ -3,18 +3,7 @@ * Get Credits: Plugin for PokeBot that gives you credits. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/cureboredom.js b/commands/Fun/cureboredom.js index 1b7913c..4b99406 100644 --- a/commands/Fun/cureboredom.js +++ b/commands/Fun/cureboredom.js @@ -3,18 +3,7 @@ * CureBoredom: Plugin for PokeBot that "cures" your boredom. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/findmyphone.js b/commands/Fun/findmyphone.js index 1575917..135d449 100644 --- a/commands/Fun/findmyphone.js +++ b/commands/Fun/findmyphone.js @@ -3,18 +3,7 @@ * FindMyPhone: Plugin for PokeBot that "helps you find your phone". * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/getcredits.js b/commands/Fun/getcredits.js index f52ee38..66ba282 100644 --- a/commands/Fun/getcredits.js +++ b/commands/Fun/getcredits.js @@ -3,35 +3,25 @@ * Get Credits: Plugin for PokeBot that gives you credits. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ -const commandCooldown = new Set(); +const cooldown = new Set(); exports.run = (bot, msg) => { - if (commandCooldown.has(msg.author.id)) return msg.reply('You have claimed credits too recently'); + if (cooldown.has(msg.author.id)) return msg.reply('You have claimed credits too recently'); if (bot.dbl.hasVoted(msg.author.id)) { bot.plugins.economy.add(msg.author.id, 100); - return msg.reply('Since you upvoted the bot, here is 100 credits.'); + msg.reply('Since you upvoted the bot, here is 100 credits.'); } - bot.plugins.economy.add(msg.author.id, 25); - msg.reply('Added 25 credits.'); - - commandCooldown.add(msg.author.id); + else { + bot.plugins.economy.add(msg.author.id, 25); + msg.reply('Added 25 credits.'); + } + cooldown.add(msg.author.id); setTimeout(() => { - commandCooldown.delete(msg.author.id); + cooldown.delete(msg.author.id); }, 3600000); }; diff --git a/commands/Fun/og151.js b/commands/Fun/og151.js index aa9a288..d2b3ccf 100644 --- a/commands/Fun/og151.js +++ b/commands/Fun/og151.js @@ -3,18 +3,7 @@ * og151: Plugin for PokeBot that randomly picks 1 out of the original 151 Pokemon. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/ship.js b/commands/Fun/ship.js index fdf9e3e..ba31db5 100644 --- a/commands/Fun/ship.js +++ b/commands/Fun/ship.js @@ -3,18 +3,7 @@ * Ship: Plugin for PokeBot that ships the user with someone else. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/slots.js b/commands/Fun/slots.js index b3295b4..ddd6757 100644 --- a/commands/Fun/slots.js +++ b/commands/Fun/slots.js @@ -3,18 +3,7 @@ * Slots: Plugin for PokeBot that allows you to gamble. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * TLicensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/story.js b/commands/Fun/story.js index 538bade..c35e3e7 100644 --- a/commands/Fun/story.js +++ b/commands/Fun/story.js @@ -3,18 +3,7 @@ * Story: Plugin for PokeBot that tells the user a story. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Getting Started/contribute.js b/commands/Getting Started/contribute.js index 0e1ae82..15204fd 100644 --- a/commands/Getting Started/contribute.js +++ b/commands/Getting Started/contribute.js @@ -3,23 +3,12 @@ * Contribute: Plugin for PokeBot that redirects users to the proper place to contribute. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = (bot, msg) => { - msg.channel.send('Want to help the bot? Here you go: https://github.com/PokeWorld/PokeBot.'); + msg.channel.send('Want to help the bot? Here you go: https://github.com/UniverseDevGroup/PokeBot.'); }; exports.conf = { diff --git a/commands/Getting Started/help.js b/commands/Getting Started/help.js index 457e6ec..1f6cf44 100644 --- a/commands/Getting Started/help.js +++ b/commands/Getting Started/help.js @@ -3,18 +3,7 @@ * Help: Plugin for PokeBot that guides the user on how to use the bot. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ @@ -25,7 +14,7 @@ exports.run = (bot, msg, args) => { embed .setColor (0x36393e) .setTitle('PokeBot Command List') - .setDescription('Full help contents can be found at http://www.digitalregion.ml/pokeworld/pokebot/commands/') + .setDescription('Full help contents can be found at http://universedevgroup.net/pokeworld/pokebot/commands/') .setFooter('PokeBot v1.0'); const categories = Array.from(bot.categories.keys()); diff --git a/commands/Getting Started/ping.js b/commands/Getting Started/ping.js index 3de0479..365c9f4 100644 --- a/commands/Getting Started/ping.js +++ b/commands/Getting Started/ping.js @@ -3,18 +3,7 @@ * Ping: Plugin for PokeBot that provides diagnostic information. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Getting Started/start.js b/commands/Getting Started/start.js index c31ff1c..e24ca70 100644 --- a/commands/Getting Started/start.js +++ b/commands/Getting Started/start.js @@ -3,18 +3,7 @@ * GettingStarted: Plugin for PokeBot that guides the user on how to start a journey. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ @@ -26,7 +15,7 @@ exports.run = (bot, msg) => { .setColor(0x00ae86) .setTitle('Getting Started in PokeWorld') .addField('PokeCord', 'First off, we need to get you up and running in PokeCord!\n\nMake sure to use the `p!start` command to pick a starter pokemon. Once you have done that, you can start using PokeCord related features in the server!') - .addField('Teams // Gyms', 'Next, you may join a team using PokeBot. To do this, run the `join` command followed by the team you want to join. You can join `aqua`, `magma`, and `rocket`. Now, you can start claiming gyms. To do this, run `p:claim` in a gym channel. If no one owns it, the gym will now be yours. However if someone does own it, it will either tell you to lay off (if your team owns the gym), or it will ping the owner of the gym and tell them to battle you. If you lose said battle, you will not recieve the gym. Otherwise, the owner of the gym will have to drop it for you to claim. You can also trade gyms with other members using the `tradegym` command.') + .addField('Teams // Gyms', 'Next, you may join a team using PokeBot. To do this, run the `join` command followed by the team you want to join. You can join `flare` or `skull`. Now, you can start claiming gyms. To do this, run `p:claim` in a gym channel. If no one owns it, the gym will now be yours. However if someone does own it, it will either tell you to lay off (if your team owns the gym), or it will ping the owner of the gym and tell them to battle you. If you lose said battle, you will not recieve the gym. Otherwise, the owner of the gym will have to drop it for you to claim. You can also trade gyms with other members using the `tradegym` command.') .addField('The End of the Introduction', 'Now that you have done all of this, you are ready to start your journey in the digital region! Chat with people, make friends, and most importantly, have fun!\n\n-The official "sentience" of the PokeWorld server!') .setFooter('PokeBot v1.0') ); diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index 5974c53..b9ffa4d 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -3,18 +3,7 @@ * Ban: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ @@ -23,12 +12,16 @@ exports.run = async (bot, msg, args) => { if (!msg.guild.member(bot.user).hasPermission('BAN_MEMBERS')) return msg.reply('I don\'t have permission to ban members.'); const member = msg.mentions.members.first(); - if (!member) return await msg.reply('Who am I gonna ban?'); + if (!member) return await msg.reply('Who am I gonna ban? (Remember to @mention them)'); const reason = args.join(' ').slice(3 + member.user.id.length); await member.ban({ days: 7, reason: msg.author.tag + (reason ? ': ' + reason : '') }) - .catch(err => { msg.reply('There was an error.'); console.error(err.stack);}); - msg.channel.send(`Alright, I banned **${member.user.tag}**${(reason ? ` for the reason **${reason}**.` : '.')}`); + .catch(err => { + msg.reply('There was an error.'); return console.error(err.stack); + }) + .then(() => { + msg.channel.send(`Alright, I banned **${member.user.tag}**${(reason ? ` for the reason **${reason}**.` : '.')}`); + }); const { RichEmbed } = require('discord.js'); try { diff --git a/commands/Moderation/interrogate.js b/commands/Moderation/interrogate.js index 8fa9708..821c93a 100644 --- a/commands/Moderation/interrogate.js +++ b/commands/Moderation/interrogate.js @@ -3,18 +3,7 @@ * Interrogate: Plugin for PokeBot that allows the staff to investigate the fish :cod: * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ @@ -25,7 +14,7 @@ exports.run = async (bot, msg) => { if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot interrogate anyone.'); const member = msg.mentions.members.first(); - if (!member) return await msg.reply('Who do I interrogate?'); + if (!member) return await msg.reply('Who shall I interrogate? (Remember to @mention them)'); member.addRole(msg.guild.roles.find('name', 'Interrogation')); diff --git a/commands/Moderation/jail.js b/commands/Moderation/jail.js index 9923540..2dc50cf 100644 --- a/commands/Moderation/jail.js +++ b/commands/Moderation/jail.js @@ -3,18 +3,7 @@ * Jail: Plugin for PokeBot that punishes bad boys.. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ @@ -25,7 +14,7 @@ exports.run = async (bot, msg) => { if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot put anyone in jail.'); const member = msg.mentions.members.first(); - if (!member) return await msg.reply('Who do I put in jail?'); + if (!member) return await msg.reply('Who do I put in jail? (Remember to @mention them)'); member.addRole(msg.guild.roles.find('name', 'Jail')); diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index c9d1d24..174e867 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -3,18 +3,7 @@ * Kick: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ @@ -23,7 +12,7 @@ exports.run = async (bot, msg, args) => { if (!msg.guild.member(bot.user).hasPermission('KICK_MEMBERS')) return msg.reply('I don\'t have permission to kick members.'); const member = msg.mentions.members.first(); - if (!member) return await msg.reply('Who am I gonna kick?'); + if (!member) return await msg.reply('Who am I gonna kick? (Remember to @mention them)'); const reason = args.join(' ').slice(3 + member.user.id.length); await member.kick(msg.author.tag + ': ' + (reason ? ': ' + reason : '')) diff --git a/commands/Moderation/lswarns.js b/commands/Moderation/lswarns.js index 7d03c12..732184d 100644 --- a/commands/Moderation/lswarns.js +++ b/commands/Moderation/lswarns.js @@ -3,18 +3,7 @@ * List Warns: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ @@ -23,11 +12,11 @@ exports.run = async (bot, msg) => { const { RichEmbed } = require('discord.js'); const warns = await db.fetch(`warns_${msg.guild.id}_${msg.author.id}`); - if (!warns) return await msg.reply('Yay! You have no warns.'); + if (!warns) return await msg.reply('You don\'t have any warnings in this server.'); const embed = new RichEmbed() .setTitle('Warns'); for (let i = 0; i < warns.count; i++) { - embed.addField('Warning #' + i+1, warns.reasons[i]); + embed.addField('Warning #' + i + 1, warns.reasons[i]); } msg.channel.send({ embed }); }; diff --git a/commands/Moderation/purge.js b/commands/Moderation/purge.js index 256dca8..6ce557c 100644 --- a/commands/Moderation/purge.js +++ b/commands/Moderation/purge.js @@ -3,18 +3,7 @@ * Purge: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/setLogs.js b/commands/Moderation/setLogs.js index a354085..8ae50ea 100644 --- a/commands/Moderation/setLogs.js +++ b/commands/Moderation/setLogs.js @@ -3,18 +3,7 @@ * Set Log: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/setSuggestions.js b/commands/Moderation/setSuggestions.js index 2fcd880..2a9d1bd 100644 --- a/commands/Moderation/setSuggestions.js +++ b/commands/Moderation/setSuggestions.js @@ -3,35 +3,23 @@ * Set Suggestions: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = async (bot, msg, args) => { - if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permission to manage messages.'); - bot.plugins.settings.setStr('suggestions', args[0], msg.guild.id); - msg.reply('Alright, I have set the suggestions channel to ' + args[0]); - }; - - exports.conf = { - aliases: [], - guildOnly: true, - }; - - exports.help = { - name: 'setSuggestions', - description: 'Set\'s the Suggestions Channel.', - usage: '<channelID>', - }; -
\ No newline at end of file + if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permission to manage messages.'); + bot.plugins.settings.setStr('suggestions', args[0], msg.guild.id); + msg.reply('Alright, I have set the suggestions channel to ' + args[0]); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'setSuggestions', + description: 'Set\'s the Suggestions Channel.', + usage: '<channelID>', +}; diff --git a/commands/Moderation/softban.js b/commands/Moderation/softban.js index 2db58ec..dd5b4a9 100644 --- a/commands/Moderation/softban.js +++ b/commands/Moderation/softban.js @@ -3,18 +3,7 @@ * SoftBan: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ @@ -27,9 +16,19 @@ exports.run = async (bot, msg, args) => { const reason = args.join(' ').slice(3 + member.user.id.length); await member.ban({ days: 7, reason: msg.author.tag + ': ' + (reason ? reason : '') }) - .catch(err => { msg.reply('There was an error.'); console.error(err.stack);}); - await msg.guild.unban(member.user.id).catch(msg.reply('There was an error.')); - msg.channel.send(`Alright, I softbanned **${member.user.tag}**${(reason ? ` for the reason **${reason}**.` : '.')}`); + .catch(err => { + msg.reply('There was an error.'); + return console.error(err.stack); + }) + .then(() => { + msg.channel.send(`Alright, I softbanned **${member.user.tag}**${(reason ? ` for the reason **${reason}**.` : '.')}`); + }); + await msg.guild.unban(member.user.id) + .catch(err => { + msg.reply('There was an error.'); + return console.error(err.stack); + }); + const { RichEmbed } = require('discord.js'); try { const embed = new RichEmbed() diff --git a/commands/Moderation/timeout.js b/commands/Moderation/timeout.js index af9c713..2e479ac 100644 --- a/commands/Moderation/timeout.js +++ b/commands/Moderation/timeout.js @@ -3,18 +3,7 @@ * Time Out: Plugin for PokeBot that punishes bad boys.. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 2599c0f..1dd0410 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -3,18 +3,7 @@ * Warn: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Music/play.js b/commands/Music/play.js index cd22057..c494ea2 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -3,18 +3,7 @@ * Play: Plugin for PokeBot that performs music player actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Music/skip.js b/commands/Music/skip.js index 09ab165..96cecf6 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -3,18 +3,7 @@ * Skip: Plugin for PokeBot that performs music player actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/eval.js b/commands/Owners Only/eval.js index a6a6916..09aac08 100644 --- a/commands/Owners Only/eval.js +++ b/commands/Owners Only/eval.js @@ -3,18 +3,7 @@ * Eval / Exec: Plugin for PokeBot that provides diagnostic information. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/modifycredits.js b/commands/Owners Only/modifycredits.js index 69da668..050d74d 100644 --- a/commands/Owners Only/modifycredits.js +++ b/commands/Owners Only/modifycredits.js @@ -3,18 +3,7 @@ * Modify Credits: Plugin for PokeBot that modifies economy features. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ @@ -28,7 +17,7 @@ exports.run = async (bot, msg) => { user = msg.mentions.users.first(); } - var oldbal = bot.plugins.economy.get(user.id); + const oldbal = bot.plugins.economy.get(user.id); bot.plugins.economy.subtract(user.id, oldbal); diff --git a/commands/Owners Only/poweroff.js b/commands/Owners Only/poweroff.js index 0facc66..4bd7f75 100644 --- a/commands/Owners Only/poweroff.js +++ b/commands/Owners Only/poweroff.js @@ -3,18 +3,7 @@ * Poweroff: Plugin for PokeBot that remotely exits the process. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/say.js b/commands/Owners Only/say.js index 95f6c53..3085d53 100644 --- a/commands/Owners Only/say.js +++ b/commands/Owners Only/say.js @@ -3,18 +3,7 @@ * Say: Plugin for PokeBot that sends a message with the provided content. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/testingcredits.js b/commands/Owners Only/testingcredits.js index 01d4934..bee93b2 100644 --- a/commands/Owners Only/testingcredits.js +++ b/commands/Owners Only/testingcredits.js @@ -3,18 +3,7 @@ * Testing Credits: Plugin for PokeBot that modifies economy features. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/triggeregg.js b/commands/Owners Only/triggeregg.js index 45da516..c65c539 100644 --- a/commands/Owners Only/triggeregg.js +++ b/commands/Owners Only/triggeregg.js @@ -3,18 +3,7 @@ * TriggerEgg: Plugin for PokeBot that manages community events. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index c91b20e..e76c2a7 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -3,73 +3,57 @@ * Claim: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Only whitelisted servers can use this command. Sorry!'); + if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.'); - if (msg.channel.topic == 'Current Owner: *none*') { - let team; - if (msg.member.roles.find('name', 'Skull')) team = 'Skull'; - if (msg.member.roles.find('name', 'Flare')) team = 'Flare'; + + if (!bot.plugins.gyms.isOwned(msg.channel.topic)) { + const team = bot.plugins.gyms.getTeam(msg.member); if (!team) return msg.reply('You have to join a team before you can claim a gym.'); msg.reply('Alright, you have claimed this gym as yours! Be ready to battle anyone who approaches you'); - msg.channel.setTopic('Current Owner: ' + msg.author.id + '/' + msg.author.tag + '/' + team); - } - else { - let team; - if (msg.member.roles.find('name', 'Skull')) team = 'Skull'; - if (msg.member.roles.find('name', 'Flare')) team = 'Flare'; - if (!team) return msg.reply('You have to join a team before you can claim a gym.'); - const owner = msg.channel.topic.slice(15).substring(0, 18); - if (msg.guild.members.find('id', owner).roles.find('name', team)) return msg.reply('Don\'t try battling your own team. They won\'t like you.'); - if (bot.gyms.get(msg.channel.id) != null) return msg.reply('Nope, someone is already battling the gym.'); - msg.channel.send('<@' + owner + '>, come here as ' + msg.member.displayName + ' wants to battle you.'); - const func = async mess => { - if (mess.channel != msg.channel) return; - let field = mess.embeds[0]; - if (!field) return; - field = field.description; - if (!field) return; - field = field.split('\n')[0]; - if (!field) return; - field = field.split(' ')[0]; - if (field != undefined) { - const user = msg.guild.members.find(member => member.user.username === field); - if (user != undefined) { - if (user.id == owner) { - await msg.channel.send('The owner has not been defeated!'); - bot.gyms.set(msg.channel.id, null); - bot.removeListener('message', func); - } - if (user.id == msg.author.id) { - await msg.channel.send('The owner has been defeated! Transferring gym!'); - let recipientTeam; - if (msg.member.roles.find('name', 'Skull')) recipientTeam = 'Skull'; - if (msg.member.roles.find('name', 'Flare')) recipientTeam = 'Flare'; - await msg.channel.setTopic('Current Owner: ' + msg.member.id + '/' + msg.author.tag + '/' + recipientTeam); - bot.gyms.set(msg.channel.id, null); - bot.removeListener('message', func); - } - } - } - }; - bot.gyms.set(msg.channel.id, func); - bot.on('message', func); + return msg.channel.setTopic(bot.plugins.gyms.getGymString(bot, msg.member)); } + + const team = bot.plugins.gyms.getTeam(msg.member); + if (!team) return msg.reply('You have to join a team before you can claim a gym.'); + + const owner = bot.plugins.gyms.getOwnerId(msg.channel.topic); + if (msg.guild.members.find('id', owner).roles.find('name', team)) return msg.reply('Don\'t try battling your own team. They won\'t like you.'); + + if (bot.gyms.get(msg.channel.id) != null) return msg.reply('Nope, someone is already battling the gym.'); + + msg.channel.send('<@' + owner + '>, come here as ' + msg.member.displayName + ' wants to battle you.'); + + const func = async mess => { + if (mess.channel != msg.channel) return; + if (!mess.embeds[0] && + !mess.embeds[0].description && + !mess.embeds[0].description.split('\n')[0] && + !mess.embeds[0].description.split('\n')[0].split(' ')[0] + ) return; + + const field = mess.embeds[0].description.split('\n')[0].split(' ')[0]; + const user = msg.guild.members.find(member => member.user.username === field); + if (!user) return; + if (user.id == owner) { + await msg.channel.send('The owner has not been defeated!'); + } + else if (user.id == msg.author.id) { + await msg.channel.send('The owner has been defeated! Transferring gym!'); + await msg.channel.setTopic(bot.plugins.gyms.getGymString(bot, msg.member)); + } + else { return; } + bot.gyms.set(msg.channel.id, null); + bot.removeListener('message', func); + }; + bot.gyms.set(msg.channel.id, func); + bot.on('message', func); }; exports.conf = { diff --git a/commands/Pokemon/drop.js b/commands/Pokemon/drop.js index 1746898..3b2bf97 100644 --- a/commands/Pokemon/drop.js +++ b/commands/Pokemon/drop.js @@ -3,23 +3,13 @@ * Drop: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Only whitelisted servers can use this command. Sorry!'); if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.'); if (msg.channel.topic == 'Current Owner: *none*') { msg.reply('There is no owner for this gym. Claim it now with p:claim!'); diff --git a/commands/Pokemon/forcedrop.js b/commands/Pokemon/forcedrop.js index 2f68759..50a9acf 100644 --- a/commands/Pokemon/forcedrop.js +++ b/commands/Pokemon/forcedrop.js @@ -3,24 +3,14 @@ * Ban: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); - + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Only whitelisted servers can use this command. Sorry!'); + if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permssion to ban members.'); if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.'); if (msg.channel.topic == 'Current Owner: *none*') { diff --git a/commands/Pokemon/join.js b/commands/Pokemon/join.js index 506fabb..2187eef 100644 --- a/commands/Pokemon/join.js +++ b/commands/Pokemon/join.js @@ -3,23 +3,13 @@ * Join: Plugin for PokeBot that powers the PokeWorld team system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = async (bot, msg, args) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Only whitelisted servers can use this command. Sorry!'); if (args.length < 1) return msg.reply('Please choose a team to join'); @@ -68,5 +58,5 @@ exports.conf = { exports.help = { name: 'join', description: 'Join one of the teams!', - usage: '<aqua/rocket/magma>', + usage: '<flare/skull>', }; diff --git a/commands/Pokemon/leave.js b/commands/Pokemon/leave.js index 13ba141..813debe 100644 --- a/commands/Pokemon/leave.js +++ b/commands/Pokemon/leave.js @@ -3,23 +3,13 @@ * Leave: Plugin for PokeBot that powers the PokeWorld team system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Only whitelisted servers can use this command. Sorry!'); if (msg.member.roles.find('name', 'Skull')) { msg.member.removeRole(msg.guild.roles.find('name', 'Skull')); diff --git a/commands/Pokemon/lsitem.js b/commands/Pokemon/lsitem.js index fad8bb3..dd628ae 100644 --- a/commands/Pokemon/lsitem.js +++ b/commands/Pokemon/lsitem.js @@ -3,18 +3,7 @@ * LSItem: Plugin for lists an item for sale in the marketplace * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Pokemon/tradegym.js b/commands/Pokemon/tradegym.js index b9d590b..e195b62 100644 --- a/commands/Pokemon/tradegym.js +++ b/commands/Pokemon/tradegym.js @@ -3,23 +3,13 @@ * TradeGym: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Only whitelisted servers can use this command. Sorry!'); if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.'); let team; diff --git a/commands/Utility/character.js b/commands/Utility/character.js index 603571b..56d9bfb 100644 --- a/commands/Utility/character.js +++ b/commands/Utility/character.js @@ -1,20 +1,9 @@ /** ************************************** * - * Suggest: Plugin for PokeBot that allows users to suggest things. + * Character: Plugin for PokeBot that examines unicode character further. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Utility/git.js b/commands/Utility/git.js index a648995..67374bb 100644 --- a/commands/Utility/git.js +++ b/commands/Utility/git.js @@ -3,32 +3,20 @@ * Git: Plugin for PokeBot that provides gives the user information about the bot. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = (bot, msg) => { - msg.channel.send('The GitHub page for PokeBot can be found here: https://github.com/PokeWorld/PokeBot'); - }; - - exports.conf = { - aliases: [], - guildOnly: true, - }; - - exports.help = { - name: 'git', - description: 'Gives the user a link to the git.', - }; -
\ No newline at end of file + msg.channel.send('The GitHub page for PokeBot can be found here: https://github.com/UniverseDevGroup/PokeBot.'); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'git', + description: 'Gives the user a link to the git.', +}; diff --git a/commands/Utility/invite.js b/commands/Utility/invite.js index e602649..933e9ba 100644 --- a/commands/Utility/invite.js +++ b/commands/Utility/invite.js @@ -3,32 +3,20 @@ * Invite: Plugin for PokeBot that provides gives the user information about the bot. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = (bot, msg) => { msg.channel.send('You can invite me by visiting https://discordbots.org/bot/417096530596724737.'); }; - + exports.conf = { aliases: [], guildOnly: true, }; - + exports.help = { name: 'invite', description: 'Gives the user a link to invite the bot.', }; -
\ No newline at end of file diff --git a/commands/Utility/nick.js b/commands/Utility/nick.js index 0d7e79b..c84013b 100644 --- a/commands/Utility/nick.js +++ b/commands/Utility/nick.js @@ -3,18 +3,7 @@ * Nick: Plugin for PokeBot that changes the user's display name. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Utility/suggest.js b/commands/Utility/suggest.js index fae35db..f1b4206 100644 --- a/commands/Utility/suggest.js +++ b/commands/Utility/suggest.js @@ -3,18 +3,7 @@ * Suggest: Plugin for PokeBot that allows users to suggest things. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Utility/uptime.js b/commands/Utility/uptime.js index 86ae84d..8492df2 100644 --- a/commands/Utility/uptime.js +++ b/commands/Utility/uptime.js @@ -3,18 +3,7 @@ * Uptime: Plugin for PokeBot that provides diagnostic information. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Utility/userinfo.js b/commands/Utility/userinfo.js index 9716021..80844e1 100644 --- a/commands/Utility/userinfo.js +++ b/commands/Utility/userinfo.js @@ -3,18 +3,7 @@ * UserInfo: Plugin for PokeBot that gives the user information about themselves or another user. * Copyright (C) 2018 TheEdge, jtsshieh, Alee * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Licensed under the Open Software License version 3.0 * * *************************************/ |
