diff options
| -rw-r--r-- | commands/Fun/8ball.js | 20 | ||||
| -rw-r--r-- | commands/Fun/cureboredom.js | 20 | ||||
| -rw-r--r-- | commands/Fun/og151.js | 20 | ||||
| -rw-r--r-- | commands/Fun/ship.js | 20 | ||||
| -rw-r--r-- | commands/Fun/story.js | 20 | ||||
| -rw-r--r-- | commands/Information/contribute.js | 20 | ||||
| -rw-r--r-- | commands/Information/help.js (renamed from commands/Getting Started/help.js) | 20 | ||||
| -rw-r--r-- | commands/Information/ping.js | 20 | ||||
| -rw-r--r-- | commands/Moderation/ban.js | 20 | ||||
| -rw-r--r-- | commands/Moderation/kick.js | 20 | ||||
| -rw-r--r-- | commands/Moderation/purge.js | 20 | ||||
| -rw-r--r-- | commands/Moderation/softban.js | 20 | ||||
| -rw-r--r-- | commands/Moderation/warn.js | 20 | ||||
| -rw-r--r-- | commands/Owners Only/eval.js | 20 | ||||
| -rw-r--r-- | commands/Owners Only/poweroff.js | 20 | ||||
| -rw-r--r-- | commands/Owners Only/say.js | 20 | ||||
| -rw-r--r-- | commands/Pokemon/claim.js | 20 | ||||
| -rw-r--r-- | commands/Pokemon/drop.js | 20 | ||||
| -rw-r--r-- | commands/Pokemon/join.js | 20 | ||||
| -rw-r--r-- | commands/Pokemon/leave.js | 20 | ||||
| -rw-r--r-- | commands/Pokemon/tradegym.js | 53 | ||||
| -rw-r--r-- | commands/Utility/suggest.js | 20 | ||||
| -rw-r--r-- | commands/Utility/uptime.js | 20 | ||||
| -rw-r--r-- | commands/Utility/userinfo.js | 20 |
24 files changed, 513 insertions, 0 deletions
diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 7432c63..28bf0e1 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg, args) => { if (args.length < 1) return msg.reply('You need to ask the 8-ball something for it to respond!'); diff --git a/commands/Fun/cureboredom.js b/commands/Fun/cureboredom.js index 9c38784..3b7cde5 100644 --- a/commands/Fun/cureboredom.js +++ b/commands/Fun/cureboredom.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = (bot, msg, args) => { const ideas = [ 'Pokemon Go to the polls :ballot_box:', diff --git a/commands/Fun/og151.js b/commands/Fun/og151.js index bda9059..2c789c7 100644 --- a/commands/Fun/og151.js +++ b/commands/Fun/og151.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = (bot, msg) => { const pokemon = [ 'Abra', diff --git a/commands/Fun/ship.js b/commands/Fun/ship.js index ed8cf69..ee218f8 100644 --- a/commands/Fun/ship.js +++ b/commands/Fun/ship.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = (bot, msg) => { msg.channel.send(msg.author.username + ' x ' + msg.guild.members.random().displayName + ' :cruise_ship:'); }; diff --git a/commands/Fun/story.js b/commands/Fun/story.js index dc2a674..0ee4b78 100644 --- a/commands/Fun/story.js +++ b/commands/Fun/story.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg) => { msg.guild.fetchMembers().then(guild => { diff --git a/commands/Information/contribute.js b/commands/Information/contribute.js index 6a578fe..7a0b4e4 100644 --- a/commands/Information/contribute.js +++ b/commands/Information/contribute.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = (bot, msg) => { msg.channel.send('Want to help the bot? Here you go: https://github.com/PokeWorld/PokeBot.'); }; diff --git a/commands/Getting Started/help.js b/commands/Information/help.js index 13ac206..9245963 100644 --- a/commands/Getting Started/help.js +++ b/commands/Information/help.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = (bot, msg) => { const { RichEmbed } = require('discord.js'); const embed = new RichEmbed(); diff --git a/commands/Information/ping.js b/commands/Information/ping.js index f4e50e4..ddc93b4 100644 --- a/commands/Information/ping.js +++ b/commands/Information/ping.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = (bot, msg) => { msg.channel.send(':ping_pong: Pong! ' + Math.floor(bot.ping) + 'ms.'); }; diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index 3582bc3..cbd8875 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg, args) => { if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permssion to ban members.'); if (!msg.guild.member(bot.user).hasPermission('BAN_MEMBERS')) return msg.reply('I don\'t have permssion to ban members.'); diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index 040abb5..4f01fd3 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg, args) => { if (!msg.member.hasPermission('KICK_MEMBERS')) return msg.reply('You don\'t have permssion to kick members.'); if (!msg.guild.member(bot.user).hasPermission('KICK_MEMBERS')) return msg.reply('I don\'t have permssion to kick members.'); diff --git a/commands/Moderation/purge.js b/commands/Moderation/purge.js index 0540bb3..aab8d59 100644 --- a/commands/Moderation/purge.js +++ b/commands/Moderation/purge.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg, args) => { if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permssion to manage messages.'); if (!msg.guild.member(bot.user).hasPermission('MANAGE_MESSAGES')) return msg.reply('I don\'t have permssion to manage messages.'); diff --git a/commands/Moderation/softban.js b/commands/Moderation/softban.js index f95e3b8..b91cadf 100644 --- a/commands/Moderation/softban.js +++ b/commands/Moderation/softban.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg, args) => { if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permssion to ban members.'); if (!msg.guild.member(bot.user).hasPermission('BAN_MEMBERS')) return msg.reply('I don\'t have permssion to ban members.'); diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 75d586c..19f61b5 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = (bot, msg, args) => { if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permssion to warn.'); args.shift(); diff --git a/commands/Owners Only/eval.js b/commands/Owners Only/eval.js index 8024f15..07f6a71 100644 --- a/commands/Owners Only/eval.js +++ b/commands/Owners Only/eval.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg, args) => { if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(msg.author.id)) return msg.reply('Nope! You need the person who created this bot to use this command.'); const { RichEmbed } = require('discord.js'); diff --git a/commands/Owners Only/poweroff.js b/commands/Owners Only/poweroff.js index ddd0c56..f047c59 100644 --- a/commands/Owners Only/poweroff.js +++ b/commands/Owners Only/poweroff.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + 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.'); diff --git a/commands/Owners Only/say.js b/commands/Owners Only/say.js index 0f8a6df..18cc5a6 100644 --- a/commands/Owners Only/say.js +++ b/commands/Owners Only/say.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + 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.'); diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index dbd2303..228e1c9 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg) => { 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/drop.js b/commands/Pokemon/drop.js index afe76df..6adf3d4 100644 --- a/commands/Pokemon/drop.js +++ b/commands/Pokemon/drop.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg) => { 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 39bdf90..c87e52d 100644 --- a/commands/Pokemon/join.js +++ b/commands/Pokemon/join.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg, args) => { if (args.length < 1) return msg.reply('Please choose a team to join'); diff --git a/commands/Pokemon/leave.js b/commands/Pokemon/leave.js index fb02e16..bd78a43 100644 --- a/commands/Pokemon/leave.js +++ b/commands/Pokemon/leave.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg) => { if (msg.member.roles.find('name', 'Aqua')) { msg.member.removeRole(msg.guild.roles.find('name', 'Aqua')); diff --git a/commands/Pokemon/tradegym.js b/commands/Pokemon/tradegym.js new file mode 100644 index 0000000..b3ccb0c --- /dev/null +++ b/commands/Pokemon/tradegym.js @@ -0,0 +1,53 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + +exports.run = async (bot, msg, args) => { + if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.'); + let team; + if (msg.member.roles.find('name', 'Aqua')) team = 'Aqua'; + if (msg.member.roles.find('name', 'Rocket')) team = 'Rocket'; + if (msg.member.roles.find('name', 'Magma')) team = 'Magma'; + if (msg.channel.topic == 'Current Owner: ' + msg.author.id + '/' + msg.author.tag + '/' + team) { + if (!msg.mentions.members.first()) return msg.reply('Sorry, you have to ping the recipient of the gym!'); + + + msg.reply('Trading gym to '+ msg.mentions.members.first()); + let recipientTeam; + if (msg.mentions.members.first.roles.find('name', 'Aqua')) recipientTeam = 'Aqua'; + if (msg.mentions.members.first.roles.find('name', 'Rocket')) recipientTeam = 'Rocket'; + if (msg.mentions.members.first().roles.find('name', 'Magma')) recipientTeam = 'Magma'; + msg.channel.setTopic('Current Owner: ' + msg.mentions.members.first().id + '/' + msg.mentions.members.first().tag + '/' + recipientTeam); + } + else { + msg.reply('You have to own the gym to be able to trade it!'); + }; + }; + + exports.conf = { + aliases: [], + guildOnly: true, + }; + + exports.help = { + name: 'tradegym', + description: 'Trade a gym to the pinged member.', + usage: '@user', + }; +
\ No newline at end of file diff --git a/commands/Utility/suggest.js b/commands/Utility/suggest.js index 72c2a02..0e09fea 100644 --- a/commands/Utility/suggest.js +++ b/commands/Utility/suggest.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = (bot, msg, args) => { const { RichEmbed } = require('discord.js'); bot.channels.find('name', 'suggestions').send( diff --git a/commands/Utility/uptime.js b/commands/Utility/uptime.js index bc9b1fa..6312014 100644 --- a/commands/Utility/uptime.js +++ b/commands/Utility/uptime.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = (bot, msg, args) => { let uptime = parseInt(bot.uptime); uptime = Math.floor(uptime / 1000); diff --git a/commands/Utility/userinfo.js b/commands/Utility/userinfo.js index 9862b1b..288ba72 100644 --- a/commands/Utility/userinfo.js +++ b/commands/Utility/userinfo.js @@ -1,3 +1,23 @@ +/**************************************** + * + * 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/>. + * + * *************************************/ + exports.run = async (bot, msg) => { const { RichEmbed } = require('discord.js'); let user; |
