From 7fec21444528c73b45185df99e78d465fc1a5fa3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 28 Feb 2018 16:38:00 -0500 Subject: Fix --- commands/Getting Started/contribute.js | 33 +++++++++++++++++++ commands/Getting Started/gettingstarted.js | 43 +++++++++++++++++++++++++ commands/Getting Started/help.js | 51 ++++++++++++++++++++++++++++++ commands/Getting Started/ping.js | 33 +++++++++++++++++++ commands/Information/contribute.js | 33 ------------------- commands/Information/gettingstarted.js | 44 -------------------------- commands/Information/help.js | 51 ------------------------------ commands/Information/ping.js | 33 ------------------- 8 files changed, 160 insertions(+), 161 deletions(-) create mode 100644 commands/Getting Started/contribute.js create mode 100644 commands/Getting Started/gettingstarted.js create mode 100644 commands/Getting Started/help.js create mode 100644 commands/Getting Started/ping.js delete mode 100644 commands/Information/contribute.js delete mode 100644 commands/Information/gettingstarted.js delete mode 100644 commands/Information/help.js delete mode 100644 commands/Information/ping.js (limited to 'commands') diff --git a/commands/Getting Started/contribute.js b/commands/Getting Started/contribute.js new file mode 100644 index 0000000..0e1ae82 --- /dev/null +++ b/commands/Getting Started/contribute.js @@ -0,0 +1,33 @@ +/** ************************************** + * + * 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 . + * + * *************************************/ + +exports.run = (bot, msg) => { + msg.channel.send('Want to help the bot? Here you go: https://github.com/PokeWorld/PokeBot.'); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'contribute', + description: 'Contributing to the bot.', +}; diff --git a/commands/Getting Started/gettingstarted.js b/commands/Getting Started/gettingstarted.js new file mode 100644 index 0000000..b8b7fbe --- /dev/null +++ b/commands/Getting Started/gettingstarted.js @@ -0,0 +1,43 @@ +/** ************************************** + * + * 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 . + * + * *************************************/ + +exports.run = (bot, msg) => { + const { RichEmbed } = require('discord.js'); + if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + msg.channel.send( + new RichEmbed() + .setColor(0x00ae86) + .setTitle('Getting Started in PokeWorld') + .addField('PokeCord', 'First off, we need to get you up and running in PokeCord!\n\nFirst, make 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. Now, you can start claiming gyms. To do this, run `p:claim` in a gym channel. If noone owns it, the gym will now be yours. If it is not yours, 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 Beta') + ); +}; + +exports.conf = { + aliases: ['noobs', 'newcomers'], + guildOnly: true, +}; + +exports.help = { + name: 'start', + description: 'Introduces you to the PokeWorld server!', +}; diff --git a/commands/Getting Started/help.js b/commands/Getting Started/help.js new file mode 100644 index 0000000..c44424c --- /dev/null +++ b/commands/Getting Started/help.js @@ -0,0 +1,51 @@ +/** ************************************** + * + * 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 . + * + * *************************************/ + +exports.run = (bot, msg) => { + const { RichEmbed } = require('discord.js'); + const embed = new RichEmbed(); + embed + .setColor (0x00ae86) + .setDescription('Notice: When using a command do not include "<" and ">".\n(Example: p:suggest Test)') + .setFooter('PokeBot Beta'); + + const categories = Array.from(bot.categories.keys()); + categories.forEach(x => { + let cat = ''; + const commands = bot.categories.get(x); + commands.forEach(cmd => { + const command = bot.commands.get(x).get(cmd); + const usage = command.help.usage ? `*${command.help.usage}* ` : ''; + cat += `**p:${command.help.name}** ${usage}| ${command.help.description} \n`; + }); + embed.addField(`${x} |`, cat); + }); + msg.channel.send({ embed }); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'help', + description: 'Displays this help message.', +}; diff --git a/commands/Getting Started/ping.js b/commands/Getting Started/ping.js new file mode 100644 index 0000000..3de0479 --- /dev/null +++ b/commands/Getting Started/ping.js @@ -0,0 +1,33 @@ +/** ************************************** + * + * 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 . + * + * *************************************/ + +exports.run = (bot, msg) => { + msg.channel.send(':ping_pong: Pong! ' + Math.floor(bot.ping) + 'ms.'); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'ping', + description: 'Pings the bot and replies with the latency.', +}; diff --git a/commands/Information/contribute.js b/commands/Information/contribute.js deleted file mode 100644 index 0e1ae82..0000000 --- a/commands/Information/contribute.js +++ /dev/null @@ -1,33 +0,0 @@ -/** ************************************** - * - * 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 . - * - * *************************************/ - -exports.run = (bot, msg) => { - msg.channel.send('Want to help the bot? Here you go: https://github.com/PokeWorld/PokeBot.'); -}; - -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'contribute', - description: 'Contributing to the bot.', -}; diff --git a/commands/Information/gettingstarted.js b/commands/Information/gettingstarted.js deleted file mode 100644 index 6f916d2..0000000 --- a/commands/Information/gettingstarted.js +++ /dev/null @@ -1,44 +0,0 @@ -/** ************************************** - * - * 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 . - * - * *************************************/ - -exports.run = (bot, msg) => { - const { RichEmbed } = require('discord.js'); - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); - msg.channel.send( - new RichEmbed() - .setColor(0x00ae86) - .setTitle('Getting Started in PokeWorld') - .addField('PokeCord', 'First off, we need to get you up and running in PokeCord!\n\nFirst, make 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. Now, you can start claiming gyms. To do this, run `p:claim` in a gym channel. If noone owns it, the gym will now be yours. If it is not yours, 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 Beta') - ); - }; - - exports.conf = { - aliases: ['noobs', 'newcomers'], - guildOnly: true, - }; - - exports.help = { - name: 'gettingstarted', - description: 'Introduces you to the PokeWorld server!', - }; - \ No newline at end of file diff --git a/commands/Information/help.js b/commands/Information/help.js deleted file mode 100644 index c44424c..0000000 --- a/commands/Information/help.js +++ /dev/null @@ -1,51 +0,0 @@ -/** ************************************** - * - * 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 . - * - * *************************************/ - -exports.run = (bot, msg) => { - const { RichEmbed } = require('discord.js'); - const embed = new RichEmbed(); - embed - .setColor (0x00ae86) - .setDescription('Notice: When using a command do not include "<" and ">".\n(Example: p:suggest Test)') - .setFooter('PokeBot Beta'); - - const categories = Array.from(bot.categories.keys()); - categories.forEach(x => { - let cat = ''; - const commands = bot.categories.get(x); - commands.forEach(cmd => { - const command = bot.commands.get(x).get(cmd); - const usage = command.help.usage ? `*${command.help.usage}* ` : ''; - cat += `**p:${command.help.name}** ${usage}| ${command.help.description} \n`; - }); - embed.addField(`${x} |`, cat); - }); - msg.channel.send({ embed }); -}; - -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'help', - description: 'Displays this help message.', -}; diff --git a/commands/Information/ping.js b/commands/Information/ping.js deleted file mode 100644 index 3de0479..0000000 --- a/commands/Information/ping.js +++ /dev/null @@ -1,33 +0,0 @@ -/** ************************************** - * - * 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 . - * - * *************************************/ - -exports.run = (bot, msg) => { - msg.channel.send(':ping_pong: Pong! ' + Math.floor(bot.ping) + 'ms.'); -}; - -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'ping', - description: 'Pings the bot and replies with the latency.', -}; -- cgit v1.2.3