diff options
| author | pokesudenk <thisis@notarealema.il> | 2018-02-25 13:08:19 -0500 |
|---|---|---|
| committer | pokesudenk <thisis@notarealema.il> | 2018-02-25 13:08:19 -0500 |
| commit | 060792543b25e8194d9a5687392a743fae5c5f6d (patch) | |
| tree | 5b583cb6988107ddc406d91568c2c90d993225ee /commands/Pokemon | |
| parent | 815230a264de36f692a5754ccd00054ff48347d9 (diff) | |
| download | PokeBot-060792543b25e8194d9a5687392a743fae5c5f6d.tar.gz PokeBot-060792543b25e8194d9a5687392a743fae5c5f6d.tar.bz2 PokeBot-060792543b25e8194d9a5687392a743fae5c5f6d.zip | |
TradeGym plugin + license info
Diffstat (limited to 'commands/Pokemon')
| -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 |
5 files changed, 133 insertions, 0 deletions
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 |
