diff options
| author | TheEdgeNK <trey6979@gmail.com> | 2018-07-10 18:36:51 -0400 |
|---|---|---|
| committer | TheEdgeNK <trey6979@gmail.com> | 2018-07-10 18:36:51 -0400 |
| commit | 96bdf46414fe806a19fa5070148fc4925be007d8 (patch) | |
| tree | 137249477c654fce293554c9cc0c6387bc066701 /commands | |
| parent | c648f47f889ee2dbfae0c896493c13efcd295b99 (diff) | |
| download | PokeBot-96bdf46414fe806a19fa5070148fc4925be007d8.tar.gz PokeBot-96bdf46414fe806a19fa5070148fc4925be007d8.tar.bz2 PokeBot-96bdf46414fe806a19fa5070148fc4925be007d8.zip | |
hOLY
Diffstat (limited to 'commands')
| -rw-r--r-- | commands/Getting Started/contribute.js | 2 | ||||
| -rw-r--r-- | commands/Getting Started/help.js | 8 | ||||
| -rw-r--r-- | commands/Getting Started/ping.js | 2 | ||||
| -rw-r--r-- | commands/Owners Only/poweroff.js | 4 | ||||
| -rw-r--r-- | commands/Pokemon/claim.js | 67 | ||||
| -rw-r--r-- | commands/Pokemon/drop.js | 37 | ||||
| -rw-r--r-- | commands/Pokemon/forcedrop.js | 33 | ||||
| -rw-r--r-- | commands/Pokemon/joinalliance.js | 62 | ||||
| -rw-r--r-- | commands/Pokemon/leavealliance.js | 35 | ||||
| -rw-r--r-- | commands/Pokemon/lsitem.js | 41 | ||||
| -rw-r--r-- | commands/Pokemon/tradegym.js | 42 | ||||
| -rw-r--r-- | commands/Utility/git.js | 22 | ||||
| -rw-r--r-- | commands/Utility/nick.js | 2 | ||||
| -rw-r--r-- | commands/Utility/uptime.js | 2 | ||||
| -rw-r--r-- | commands/Utility/userinfo.js | 2 |
15 files changed, 11 insertions, 350 deletions
diff --git a/commands/Getting Started/contribute.js b/commands/Getting Started/contribute.js index 15204fd..1abacde 100644 --- a/commands/Getting Started/contribute.js +++ b/commands/Getting Started/contribute.js @@ -8,7 +8,7 @@ * *************************************/ exports.run = (bot, msg) => { - msg.channel.send('Want to help the bot? Here you go: https://github.com/UniverseDevGroup/PokeBot.'); + msg.channel.send('Want to help the bot? Here you go: https://github.com/UniverseDevGroup/GalaxyBot.'); }; exports.conf = { diff --git a/commands/Getting Started/help.js b/commands/Getting Started/help.js index 170076f..b1b9b57 100644 --- a/commands/Getting Started/help.js +++ b/commands/Getting Started/help.js @@ -13,8 +13,8 @@ exports.run = (bot, msg, args) => { const embed = new RichEmbed(); embed .setColor (0x36393e) - .setTitle('PokeBot Command Contents') - .setFooter('PokeBot 2.0 Alpha 1'); + .setTitle('Galaxy Command Contents') + .setFooter('Galaxy 2.0 Alpha 1'); const categories = Array.from(bot.categories.keys()); categories.forEach(x => { @@ -32,8 +32,8 @@ exports.run = (bot, msg, args) => { const embed = new RichEmbed(); embed .setColor (0x00ae86) - .setDescription('Notice: When using a command do not include "<" and ">".\n(Example: p:suggest Test)') - .setFooter('PokeBot 2.0 Alpha 1'); + .setDescription('Notice: When using a command do not include "<" and ">".\n(Example: g:suggest Test)') + .setFooter('Galaxy 2.0 Alpha 1'); const categories = Array.from(bot.categories.keys()); categories.forEach(x => { diff --git a/commands/Getting Started/ping.js b/commands/Getting Started/ping.js index 83b7c26..12afaa0 100644 --- a/commands/Getting Started/ping.js +++ b/commands/Getting Started/ping.js @@ -14,7 +14,7 @@ exports.run = (bot, msg) => { .setColor (0x00ae86) .setTitle(':computer: Bot Statistics') .setDescription('Showing bot statistics:') - .setFooter('Pokebot 2.0 Alpha 1'); + .setFooter('Galaxy 2.0 Alpha 1'); embed.addField('Client Heartbeat', Math.floor(bot.ping) + ' ms.'); diff --git a/commands/Owners Only/poweroff.js b/commands/Owners Only/poweroff.js index 4bd7f75..8fe2323 100644 --- a/commands/Owners Only/poweroff.js +++ b/commands/Owners Only/poweroff.js @@ -12,8 +12,8 @@ exports.run = async (bot, msg) => { msg.reply('Nope! You need the person who created this bot to use this command.'); } else { - await msg.reply(':warning: Pokebot is now powering off!'); - console.log('Pokebot is now powering off...'); + await msg.reply(':warning: Galaxy is now powering off!'); + console.log('Galaxy is now powering off...'); process.exit(0); } }; diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js deleted file mode 100644 index e76c2a7..0000000 --- a/commands/Pokemon/claim.js +++ /dev/null @@ -1,67 +0,0 @@ -/** ************************************** - * - * Claim: Plugin for PokeBot that powers the PokeWorld gym system. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = async (bot, msg) => { - 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 (!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'); - 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 = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'claim', - description: 'Claim a gym.', -}; diff --git a/commands/Pokemon/drop.js b/commands/Pokemon/drop.js deleted file mode 100644 index 3b2bf97..0000000 --- a/commands/Pokemon/drop.js +++ /dev/null @@ -1,37 +0,0 @@ -/** ************************************** - * - * Drop: Plugin for PokeBot that powers the PokeWorld gym system. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = async (bot, msg) => { - 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!'); - } - else { - const owner = msg.channel.topic.slice(15).substring(0, 18); - if (msg.author.id != owner) { - return msg.reply('You are not the owner of this gym.'); - } - else { - msg.channel.setTopic('Current Owner: *none*'); - msg.channel.send('You have dropped the gym.'); - } - } -}; - -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'drop', - description: 'Drop a gym.', -}; diff --git a/commands/Pokemon/forcedrop.js b/commands/Pokemon/forcedrop.js deleted file mode 100644 index 50a9acf..0000000 --- a/commands/Pokemon/forcedrop.js +++ /dev/null @@ -1,33 +0,0 @@ -/** ************************************** - * - * Ban: Plugin for PokeBot that powers the PokeWorld gym system. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = async (bot, msg) => { - 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*') { - msg.reply('This gym does not have an owner.'); - } - else { - msg.channel.setTopic('Current Owner: *none*'); - msg.channel.send('You have dropped the gym.'); - } -}; - -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'forcedrop', - description: 'Force a gym to have no owner.', -}; diff --git a/commands/Pokemon/joinalliance.js b/commands/Pokemon/joinalliance.js deleted file mode 100644 index e2d9940..0000000 --- a/commands/Pokemon/joinalliance.js +++ /dev/null @@ -1,62 +0,0 @@ -/** ************************************** - * - * Join: Plugin for PokeBot that powers the PokeWorld team system. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = async (bot, msg, args) => { - 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('You did not pick an existing alliance. The list of alliances are as follows:\nDarkSide, Skull'); - - const team = findTeam(msg, args[0]); - switch (args[0]) - { - case 'Skull': { - msg.member.addRole(msg.guild.roles.find('name', 'Skull')); - msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined the alliance 'Skull'.`); - break; - } - case 'DarkSide' : { - msg.member.addRole(msg.guild.roles.find('name', 'Dark Side')); - msg.reply(`Alright, ${team ? 'you have left team ' + team + ' and ' : 'you have '}joined the alliance 'Dark Side'.`); - break; - } - default : { - msg.reply('You did not pick an existing alliance. The list of alliances are as follows:\nDarkSide, Skull'); - break; - } - } -}; - -function findTeam(msg, team) { - - let oldTeam; - - if (msg.member.roles.find('name', 'Skull')) { - if (team == 'skull') return; - msg.member.removeRole(msg.guild.roles.find('name', 'Skull')); - oldTeam = 'Skull'; - } - else if (msg.member.roles.find('name', 'Dark Side')) { - if (team == 'DarkSide') return; - msg.member.removeRole(msg.guild.roles.find('name', 'DarkSide')); - oldTeam = 'DarkSide'; - } - return oldTeam; -} - -exports.conf = { - aliases: ['pick', 'choose'], - guildOnly: true, -}; - -exports.help = { - name: 'joinalliance', - description: 'Join one of the alliances!', - usage: '<alliance name>', -}; diff --git a/commands/Pokemon/leavealliance.js b/commands/Pokemon/leavealliance.js deleted file mode 100644 index dd511c7..0000000 --- a/commands/Pokemon/leavealliance.js +++ /dev/null @@ -1,35 +0,0 @@ -/** ************************************** - * - * Leave: Plugin for PokeBot that powers the PokeWorld team system. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = async (bot, msg) => { - 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')); - msg.reply('Alright, you are not longer in the alliance `Skull`.'); - } - else if (msg.member.roles.find('name', 'Dark Side')) { - msg.member.removeRole(msg.guild.roles.find('name', 'Dark Side')); - msg.reply('Alright, you are not longer in the alliance `Dark Side`.'); - } - else { - msg.reply('You are not in a team.'); - } -}; - -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'leavealliance', - description: 'Leave the alliance you currently are in.', -}; diff --git a/commands/Pokemon/lsitem.js b/commands/Pokemon/lsitem.js deleted file mode 100644 index dd628ae..0000000 --- a/commands/Pokemon/lsitem.js +++ /dev/null @@ -1,41 +0,0 @@ -/** ************************************** - * - * LSItem: Plugin for lists an item for sale in the marketplace - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * 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 { RichEmbed } = require('discord.js'); - const data = args.join(' ').split('|'); - const msgs = await bot.channels.find('id', '428738848420397057').fetchMessages({ limit: 10 }); - const mess = msgs.first(); - if (!mess.embeds) return; - const id = parseInt(mess.embeds[0].author.name.split(':')[1]) + 1; - - bot.channels.find('id', '428738848420397057').send( - new RichEmbed() - .setTitle('A new pokemon is up for sale!') - .setAuthor('ID: ' + id) - .addField('Starting Price', data[1], true) - .addField('Pokemon', data[0], true) - .addField('Other', data[2], true) - .addField('Seller', `<@${msg.author.id}>`, true) - .addField('How to bid', 'DM the seller for the pokemon giving them the id, ' + id) - ); -}; - -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'lsitem', - description: 'List an item to the marketplace.', - usage: '<pokemon>|<credits>|<other>', -}; diff --git a/commands/Pokemon/tradegym.js b/commands/Pokemon/tradegym.js deleted file mode 100644 index e195b62..0000000 --- a/commands/Pokemon/tradegym.js +++ /dev/null @@ -1,42 +0,0 @@ -/** ************************************** - * - * TradeGym: Plugin for PokeBot that powers the PokeWorld gym system. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = async (bot, msg) => { - 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; - if (msg.member.roles.find('name', 'Skull')) team = 'Skull'; - if (msg.member.roles.find('name', 'Flare')) team = 'Flare'; - 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!'); - const recipient = msg.mentions.members.first(); - - msg.reply('Trading gym to ' + recipient); - let recipientTeam; - if (recipient.roles.find('name', 'Skull')) recipientTeam = 'Skull'; - if (recipient.roles.find('name', 'Flare')) recipientTeam = 'Flare'; - msg.channel.setTopic('Current Owner: ' + recipient.id + '/' + recipient.user.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', -}; diff --git a/commands/Utility/git.js b/commands/Utility/git.js deleted file mode 100644 index 67374bb..0000000 --- a/commands/Utility/git.js +++ /dev/null @@ -1,22 +0,0 @@ -/** ************************************** - * - * Git: Plugin for PokeBot that provides gives the user information about the bot. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * 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/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/nick.js b/commands/Utility/nick.js index bec9578..46f2d8a 100644 --- a/commands/Utility/nick.js +++ b/commands/Utility/nick.js @@ -23,7 +23,7 @@ exports.run = async (bot, msg, args) => { .setDescription(`*${msg.author.tag}* changed their nickname`) .addField('New Nickname', msg.member.displayName, true) .setTimestamp() - .setFooter('PokeBot v1.0') + .setFooter('Galaxy v2.0 Alpha 1') ); }; diff --git a/commands/Utility/uptime.js b/commands/Utility/uptime.js index 8492df2..1519504 100644 --- a/commands/Utility/uptime.js +++ b/commands/Utility/uptime.js @@ -21,7 +21,7 @@ exports.run = (bot, msg, args) => { if (args[0] === 'ms') return msg.channel.send(bot.uptime + ' ms.'); if (args[0] === 's') return msg.channel.send(uptimeSeconds + ' seconds.'); if (args[0] === 'min') return msg.channel.send(Math.floor(uptime / 60) + ' minutes ' + uptimeSeconds + ' seconds.'); - msg.channel.send(':clock3: Pokebot has been up for ' + hours + ' hours, ' + uptimeMinutes + ' minutes, and ' + uptimeSeconds + ' seconds.'); + msg.channel.send(':clock3: Galaxy has been online for ' + hours + ' hours, ' + uptimeMinutes + ' minutes, and ' + uptimeSeconds + ' seconds.'); }; diff --git a/commands/Utility/userinfo.js b/commands/Utility/userinfo.js index 80844e1..666b48f 100644 --- a/commands/Utility/userinfo.js +++ b/commands/Utility/userinfo.js @@ -23,7 +23,7 @@ exports.run = async (bot, msg) => { .addField('Account Creation Date', user.user.createdAt) .addField('Join Guild Date', user.joinedAt) .addField('Names', 'Display Name: ' + user.displayName + `\nUsername: ${user.user.tag}`) - .setFooter('PokeBot v1.0') + .setFooter('Galaxy v2.0 Alpha 1') ); }; |
