diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-02-25 21:58:31 -0500 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-02-25 21:58:31 -0500 |
| commit | 2b83e842fea1c9cab7abbe45154a1f140e26f990 (patch) | |
| tree | d5632015dbc0f28a56ee1295d0d32d92378b6204 /commands | |
| parent | 6d17517b4543afbf5100b55619efc8a6d8f3c754 (diff) | |
| download | PokeBot-2b83e842fea1c9cab7abbe45154a1f140e26f990.tar.gz PokeBot-2b83e842fea1c9cab7abbe45154a1f140e26f990.tar.bz2 PokeBot-2b83e842fea1c9cab7abbe45154a1f140e26f990.zip | |
Basic music commands
Diffstat (limited to 'commands')
28 files changed, 185 insertions, 113 deletions
diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 28bf0e1..16d5d24 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * 8ball: Plugin for PokeBot that allows users to use an 8ball. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Fun/cureboredom.js b/commands/Fun/cureboredom.js index 3b7cde5..1b7913c 100644 --- a/commands/Fun/cureboredom.js +++ b/commands/Fun/cureboredom.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * CureBoredom: Plugin for PokeBot that "cures" your boredom. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Fun/findmyphone.js b/commands/Fun/findmyphone.js index 482ceb3..1575917 100644 --- a/commands/Fun/findmyphone.js +++ b/commands/Fun/findmyphone.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * FindMyPhone: Plugin for PokeBot that "helps you find your phone". * Copyright (C) 2018 TheEdge, jtsshieh, Alee @@ -19,30 +19,29 @@ * *************************************/ exports.run = (bot, msg) => { - const cities = [ - 'Aurora', - 'Montgomery', - 'Chandler', - 'Boise', - 'Fresno', - 'Lubbock', - 'Miami', - 'Stockton', - 'Colorado Springs', - 'Portland', - 'Cincinnati', - ]; + const cities = [ + 'Aurora', + 'Montgomery', + 'Chandler', + 'Boise', + 'Fresno', + 'Lubbock', + 'Miami', + 'Stockton', + 'Colorado Springs', + 'Portland', + 'Cincinnati', + ]; - msg.channel.send(cities[Math.floor(Math.random() * cities.length)]); - }; - - exports.conf = { - aliases: ['findphone', 'findmyiphone', 'findmyandroid', 'findmyandroidphone'], - guildOnly: true, - }; - - exports.help = { - name: 'findmyphone', - description: 'Find your phone. Not just a random list of cities being randomly picked.', - }; -
\ No newline at end of file + msg.channel.send(cities[Math.floor(Math.random() * cities.length)]); +}; + +exports.conf = { + aliases: ['findphone', 'findmyiphone', 'findmyandroid', 'findmyandroidphone'], + guildOnly: true, +}; + +exports.help = { + name: 'findmyphone', + description: 'Find your phone. Not just a random list of cities being randomly picked.', +}; diff --git a/commands/Fun/og151.js b/commands/Fun/og151.js index 2c789c7..aa9a288 100644 --- a/commands/Fun/og151.js +++ b/commands/Fun/og151.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * og151: Plugin for PokeBot that randomly picks 1 out of the original 151 Pokemon. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Fun/ship.js b/commands/Fun/ship.js index ee218f8..fdf9e3e 100644 --- a/commands/Fun/ship.js +++ b/commands/Fun/ship.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Ship: Plugin for PokeBot that ships the user with someone else. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Fun/story.js b/commands/Fun/story.js index 2faf510..de5a6ff 100644 --- a/commands/Fun/story.js +++ b/commands/Fun/story.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Story: Plugin for PokeBot that tells the user a story. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Information/contribute.js b/commands/Information/contribute.js index 7a0b4e4..0e1ae82 100644 --- a/commands/Information/contribute.js +++ b/commands/Information/contribute.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Contribute: Plugin for PokeBot that redirects users to the proper place to contribute. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Information/help.js b/commands/Information/help.js index 9245963..c44424c 100644 --- a/commands/Information/help.js +++ b/commands/Information/help.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Help: Plugin for PokeBot that guides the user on how to use the bot. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Information/ping.js b/commands/Information/ping.js index ddc93b4..3de0479 100644 --- a/commands/Information/ping.js +++ b/commands/Information/ping.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Ping: Plugin for PokeBot that provides diagnostic information. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index cbd8875..29cd566 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Ban: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index 4f01fd3..ee7bf99 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Kick: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Moderation/purge.js b/commands/Moderation/purge.js index aab8d59..fbb381d 100644 --- a/commands/Moderation/purge.js +++ b/commands/Moderation/purge.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Purge: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Moderation/softban.js b/commands/Moderation/softban.js index b91cadf..69a7fd3 100644 --- a/commands/Moderation/softban.js +++ b/commands/Moderation/softban.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * SoftBan: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 19f61b5..b47fa3f 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Warn: Plugin for PokeBot that performs moderation actions. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Music/play.js b/commands/Music/play.js new file mode 100644 index 0000000..8c93c59 --- /dev/null +++ b/commands/Music/play.js @@ -0,0 +1,41 @@ +/** ************************************** + * + * Play: 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) => { + const music = bot.plugins.music; + if (args[0] == 'sc') { + args.shift(); + const track = await music.resolveTrack(args.join(' '), true); + return music.play(bot, msg, track.track); + } + const track = await music.resolveTrack(args.join(' ')); + return music.play(bot, msg, track.track); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'play', + description: 'Plays a song for you. If sc is not chosen, it\'ll be yt', + usage : '<sc> <search>', +}; diff --git a/commands/Music/skip.js b/commands/Music/skip.js new file mode 100644 index 0000000..435aacb --- /dev/null +++ b/commands/Music/skip.js @@ -0,0 +1,34 @@ +/** ************************************** + * + * Skip: 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) => { + const music = bot.plugins.music; + music.skip(bot, msg); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'skip', + description: 'Skip a song in the queue.', +}; diff --git a/commands/Owners Only/eval.js b/commands/Owners Only/eval.js index 07f6a71..a6a6916 100644 --- a/commands/Owners Only/eval.js +++ b/commands/Owners Only/eval.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Eval / Exec: Plugin for PokeBot that provides diagnostic information. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Owners Only/poweroff.js b/commands/Owners Only/poweroff.js index f047c59..0facc66 100644 --- a/commands/Owners Only/poweroff.js +++ b/commands/Owners Only/poweroff.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Poweroff: Plugin for PokeBot that remotely exits the process. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Owners Only/say.js b/commands/Owners Only/say.js index 18cc5a6..51de21d 100644 --- a/commands/Owners Only/say.js +++ b/commands/Owners Only/say.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Say: Plugin for PokeBot that sends a message with the provided content. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index 228e1c9..f9e71ee 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Claim: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Pokemon/drop.js b/commands/Pokemon/drop.js index 6adf3d4..6b10ace 100644 --- a/commands/Pokemon/drop.js +++ b/commands/Pokemon/drop.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Drop: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Pokemon/join.js b/commands/Pokemon/join.js index c87e52d..01af694 100644 --- a/commands/Pokemon/join.js +++ b/commands/Pokemon/join.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Join: Plugin for PokeBot that powers the PokeWorld team system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Pokemon/leave.js b/commands/Pokemon/leave.js index bd78a43..d2ca96c 100644 --- a/commands/Pokemon/leave.js +++ b/commands/Pokemon/leave.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Leave: Plugin for PokeBot that powers the PokeWorld team system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Pokemon/tradegym.js b/commands/Pokemon/tradegym.js index 17ca6f4..f10e3fa 100644 --- a/commands/Pokemon/tradegym.js +++ b/commands/Pokemon/tradegym.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * TradeGym: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee @@ -18,37 +18,36 @@ * * *************************************/ -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!'); - const recipient = msg.mentions.members.first(); - - msg.reply('Trading gym to ' + recipient); - let recipientTeam; - if (recipient.roles.find('name', 'Aqua')) recipientTeam = 'Aqua'; - if (recipient.roles.find('name', 'Rocket')) recipientTeam = 'Rocket'; - if (recipient.roles.find('name', 'Magma')) recipientTeam = 'Magma'; - 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', - }; -
\ No newline at end of file +exports.run = async (bot, msg) => { + + 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!'); + const recipient = msg.mentions.members.first(); + + msg.reply('Trading gym to ' + recipient); + let recipientTeam; + if (recipient.roles.find('name', 'Aqua')) recipientTeam = 'Aqua'; + if (recipient.roles.find('name', 'Rocket')) recipientTeam = 'Rocket'; + if (recipient.roles.find('name', 'Magma')) recipientTeam = 'Magma'; + 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/nick.js b/commands/Utility/nick.js index 896af27..e652087 100644 --- a/commands/Utility/nick.js +++ b/commands/Utility/nick.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Nick: Plugin for PokeBot that changes the user's display name. * Copyright (C) 2018 TheEdge, jtsshieh, Alee @@ -19,31 +19,30 @@ * *************************************/ exports.run = async (bot, msg, args) => { - const { RichEmbed } = require('discord.js'); - - msg.member.setNickname(args.join(' '), 'Requested by bot'); - msg.channel.send('Changed nickname to: ' + args.join(' ')); - setTimeout(null, 3000); - bot.channels.find('name', 'logs').send( - new RichEmbed() - .setColor(0x00ae86) - .setTitle(`Nickname: ${msg.author.tag}`) - .setDescription(`*${msg.author.tag}* changed their nickname`) - .addField('New Nickname', msg.member.displayName, true) - .setTimestamp() - .setFooter('PokeBot Beta') - ); + const { RichEmbed } = require('discord.js'); - }; - - exports.conf = { - aliases: ['nickname'], - guildOnly: true, - }; - - exports.help = { - name: 'nick', - description: 'Change your nickname.', - usage: '<...new nick>', - }; -
\ No newline at end of file + msg.member.setNickname(args.join(' '), 'Requested by bot'); + msg.channel.send('Changed nickname to: ' + args.join(' ')); + setTimeout(null, 3000); + bot.channels.find('name', 'logs').send( + new RichEmbed() + .setColor(0x00ae86) + .setTitle(`Nickname: ${msg.author.tag}`) + .setDescription(`*${msg.author.tag}* changed their nickname`) + .addField('New Nickname', msg.member.displayName, true) + .setTimestamp() + .setFooter('PokeBot Beta') + ); + +}; + +exports.conf = { + aliases: ['nickname'], + guildOnly: true, +}; + +exports.help = { + name: 'nick', + description: 'Change your nickname.', + usage: '<...new nick>', +}; diff --git a/commands/Utility/suggest.js b/commands/Utility/suggest.js index 0e09fea..80017d7 100644 --- a/commands/Utility/suggest.js +++ b/commands/Utility/suggest.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Suggest: Plugin for PokeBot that allows users to suggest things. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Utility/uptime.js b/commands/Utility/uptime.js index 6312014..86ae84d 100644 --- a/commands/Utility/uptime.js +++ b/commands/Utility/uptime.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Uptime: Plugin for PokeBot that provides diagnostic information. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Utility/userinfo.js b/commands/Utility/userinfo.js index 288ba72..59ef68f 100644 --- a/commands/Utility/userinfo.js +++ b/commands/Utility/userinfo.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * UserInfo: Plugin for PokeBot that gives the user information about themselves or another user. * Copyright (C) 2018 TheEdge, jtsshieh, Alee |
