From d330bbf25a7a9bb48eaef4f717ce243e065f85b8 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 30 Mar 2018 21:13:41 -0400 Subject: whitelist --- Plugins/whitelist.js | 39 +++++++++++++++++++++++++++++++++++++++ commands/Pokemon/claim.js | 3 ++- commands/Pokemon/drop.js | 3 ++- commands/Pokemon/forcedrop.js | 5 +++-- commands/Pokemon/join.js | 3 ++- commands/Pokemon/leave.js | 3 ++- commands/Pokemon/tradegym.js | 3 ++- 7 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 Plugins/whitelist.js diff --git a/Plugins/whitelist.js b/Plugins/whitelist.js new file mode 100644 index 0000000..4c7dd8b --- /dev/null +++ b/Plugins/whitelist.js @@ -0,0 +1,39 @@ +/** ************************************** + * + * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. + * 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 . + * + * *************************************/ + +const db = require('quick.db'); +exports.whitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, true); +}; + +exports.unwhitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, false); +}; + +exports.checkWhitelist = async (guildID) => { + const value = await db.fetch(`whitelist_${guildID}`); + if (value) { + return value; + } + else { + await db.set(`whitelist_${guildID}`, false); + return await db.fetch(`whitelist_${guildID}`); + } +}; diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index c91b20e..3f9ba6c 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -19,7 +19,8 @@ * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); + if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. 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*') { let team; diff --git a/commands/Pokemon/drop.js b/commands/Pokemon/drop.js index 1746898..a6ff953 100644 --- a/commands/Pokemon/drop.js +++ b/commands/Pokemon/drop.js @@ -19,7 +19,8 @@ * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); + if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. 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!'); diff --git a/commands/Pokemon/forcedrop.js b/commands/Pokemon/forcedrop.js index 2f68759..da06f5d 100644 --- a/commands/Pokemon/forcedrop.js +++ b/commands/Pokemon/forcedrop.js @@ -19,8 +19,9 @@ * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); - + const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); + if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. 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*') { diff --git a/commands/Pokemon/join.js b/commands/Pokemon/join.js index 506fabb..bae820a 100644 --- a/commands/Pokemon/join.js +++ b/commands/Pokemon/join.js @@ -19,7 +19,8 @@ * *************************************/ exports.run = async (bot, msg, args) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); + if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); 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 13ba141..5682d8e 100644 --- a/commands/Pokemon/leave.js +++ b/commands/Pokemon/leave.js @@ -19,7 +19,8 @@ * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); + if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); if (msg.member.roles.find('name', 'Skull')) { msg.member.removeRole(msg.guild.roles.find('name', 'Skull')); diff --git a/commands/Pokemon/tradegym.js b/commands/Pokemon/tradegym.js index b9d590b..fd08147 100644 --- a/commands/Pokemon/tradegym.js +++ b/commands/Pokemon/tradegym.js @@ -19,7 +19,8 @@ * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); + if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.'); let team; -- cgit v1.2.3 From fa64165ef9e62c5fddab5fd92382d27078b793c0 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 30 Mar 2018 21:14:15 -0400 Subject: whoops --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 7e50eec..dea745d 100644 --- a/bot.js +++ b/bot.js @@ -9,7 +9,7 @@ bot.commands = new Discord.Collection(); bot.aliases = new Discord.Collection(); bot.categories = new Discord.Collection(); bot.queue = new Discord.Collection(); -bot.plugins = { music : require('./Plugins/Music.js') , economy : require('./Plugins/Economy.js'), settings : require('./Plugins/settings.js')}; +bot.plugins = { music : require('./Plugins/Music.js') , economy : require('./Plugins/Economy.js'), settings : require('./Plugins/settings.js'), whitelist: require('./Plugins/whitelist.js')}; cmdLoader(); bot.Raven = require('raven'); -- cgit v1.2.3 From d9d41aa8a2593d9e9171af9de93c043fe96ea5e6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 30 Mar 2018 21:17:46 -0400 Subject: whoops --- Plugins/whitelist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/whitelist.js b/Plugins/whitelist.js index 4c7dd8b..ff102aa 100644 --- a/Plugins/whitelist.js +++ b/Plugins/whitelist.js @@ -27,7 +27,7 @@ exports.unwhitelist = async (guildID) => { await db.set(`whitelist_${guildID}`, false); }; -exports.checkWhitelist = async (guildID) => { +exports.isWhitelist = async (guildID) => { const value = await db.fetch(`whitelist_${guildID}`); if (value) { return value; -- cgit v1.2.3 From b4e267a6bc456e4b72602966011a18e21559ac8e Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 30 Mar 2018 21:20:03 -0400 Subject: i can feel the day where i don't need to test anything --- commands/Pokemon/claim.js | 4 ++-- commands/Pokemon/drop.js | 4 ++-- commands/Pokemon/forcedrop.js | 4 ++-- commands/Pokemon/join.js | 4 ++-- commands/Pokemon/leave.js | 4 ++-- commands/Pokemon/tradegym.js | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index 3f9ba6c..4ad8a78 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -19,8 +19,8 @@ * *************************************/ exports.run = async (bot, msg) => { - const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); - if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. 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*') { let team; diff --git a/commands/Pokemon/drop.js b/commands/Pokemon/drop.js index a6ff953..9f6747d 100644 --- a/commands/Pokemon/drop.js +++ b/commands/Pokemon/drop.js @@ -19,8 +19,8 @@ * *************************************/ exports.run = async (bot, msg) => { - const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); - if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. 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!'); diff --git a/commands/Pokemon/forcedrop.js b/commands/Pokemon/forcedrop.js index da06f5d..b2fae13 100644 --- a/commands/Pokemon/forcedrop.js +++ b/commands/Pokemon/forcedrop.js @@ -19,8 +19,8 @@ * *************************************/ exports.run = async (bot, msg) => { - const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); - if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. 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.'); diff --git a/commands/Pokemon/join.js b/commands/Pokemon/join.js index bae820a..9b4a304 100644 --- a/commands/Pokemon/join.js +++ b/commands/Pokemon/join.js @@ -19,8 +19,8 @@ * *************************************/ exports.run = async (bot, msg, args) => { - const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); - if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); 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 5682d8e..716608b 100644 --- a/commands/Pokemon/leave.js +++ b/commands/Pokemon/leave.js @@ -19,8 +19,8 @@ * *************************************/ exports.run = async (bot, msg) => { - const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); - if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); if (msg.member.roles.find('name', 'Skull')) { msg.member.removeRole(msg.guild.roles.find('name', 'Skull')); diff --git a/commands/Pokemon/tradegym.js b/commands/Pokemon/tradegym.js index fd08147..f19fdce 100644 --- a/commands/Pokemon/tradegym.js +++ b/commands/Pokemon/tradegym.js @@ -19,8 +19,8 @@ * *************************************/ exports.run = async (bot, msg) => { - const isWhitelist = await bot.plugins.isWhitelist(msg.guild.id); - if (isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + const isWhitelist = await bot.plugins.whitelist.isWhitelist(msg.guild.id); + if (!isWhitelist) return msg.reply ('This is a Whiltelisted command. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.'); let team; -- cgit v1.2.3 From 8233f42ffdeb7097e045922d6bde1fa905ad9fed Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 30 Mar 2018 21:42:02 -0400 Subject: okay more typos --- commands/Pokemon/claim.js | 2 +- commands/Pokemon/drop.js | 2 +- commands/Pokemon/forcedrop.js | 2 +- commands/Pokemon/join.js | 2 +- commands/Pokemon/leave.js | 2 +- commands/Pokemon/tradegym.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index 4ad8a78..1d2f881 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -20,7 +20,7 @@ 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. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + 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*') { let team; diff --git a/commands/Pokemon/drop.js b/commands/Pokemon/drop.js index 9f6747d..fb58184 100644 --- a/commands/Pokemon/drop.js +++ b/commands/Pokemon/drop.js @@ -20,7 +20,7 @@ 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. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + 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!'); diff --git a/commands/Pokemon/forcedrop.js b/commands/Pokemon/forcedrop.js index b2fae13..4f6003b 100644 --- a/commands/Pokemon/forcedrop.js +++ b/commands/Pokemon/forcedrop.js @@ -20,7 +20,7 @@ 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. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + 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.'); diff --git a/commands/Pokemon/join.js b/commands/Pokemon/join.js index 9b4a304..09b5e11 100644 --- a/commands/Pokemon/join.js +++ b/commands/Pokemon/join.js @@ -20,7 +20,7 @@ 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. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + 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('Please choose a team to join'); diff --git a/commands/Pokemon/leave.js b/commands/Pokemon/leave.js index 716608b..24405cf 100644 --- a/commands/Pokemon/leave.js +++ b/commands/Pokemon/leave.js @@ -20,7 +20,7 @@ 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. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + 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')); diff --git a/commands/Pokemon/tradegym.js b/commands/Pokemon/tradegym.js index f19fdce..f38d2ab 100644 --- a/commands/Pokemon/tradegym.js +++ b/commands/Pokemon/tradegym.js @@ -20,7 +20,7 @@ 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. Get your server whitelisted by joining our server at https://discord.me/thedigitalregion and asking in the general channel. Sorry!'); + 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; -- cgit v1.2.3 From 477d721f9fefcf07b9608f451af7529784a73919 Mon Sep 17 00:00:00 2001 From: Trey <32907415+TheEdgeNK@users.noreply.github.com> Date: Fri, 30 Mar 2018 21:48:31 -0400 Subject: New readme --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2a0908f..d6515bc 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,25 @@ GitHub commits (since latest release) Travis CI Circle CI - Discord Bot List + Discord Bot List

-Formerly-exclusive bot for gym management, moderation, and more on the PokeWorld discord. +This is PokeBot! PokeBot is a utility bot with fun and music functionality! For more info, continue to read below! + +## What can I expect to see in PokeBot? +* Custom Log Channels +* Fun Games to keep you engaged +* Logs to enhance the experience of you and your users +* Warning logging system with a database to keep track of moderative actions +* User info command to see information of suspicious members +* and more! + +## Issue Reporting and Feature Suggestions + +If you would like to suggest a feature, or report a bug, please be sure to checkout our GitHub page! This will allow you to submit issues, and assign them to developers of the project. + +## Code Contribution + +If you would like to add some code to PokeBot, please also visit the GitHub repository and submit a **pull request**. These are very easy to do, and if you do not know how to do one, it is an easy Google search. -- cgit v1.2.3 From 3941f5cbfe47a632f7cd64f9cdec80cfeee9b015 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 30 Mar 2018 21:57:11 -0400 Subject: remove travis and circle --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index d6515bc..b399e6c 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,7 @@

PokeWorld Discord GitHub commits (since latest release) - Travis CI - Circle CI - Discord Bot List + Discord Bot List

-- cgit v1.2.3 From 67865266f3ed2341039811adfdb890525f8b85b3 Mon Sep 17 00:00:00 2001 From: Trey <32907415+TheEdgeNK@users.noreply.github.com> Date: Sat, 31 Mar 2018 11:06:58 -0400 Subject: readme makes more sense now --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b399e6c..3605693 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ This is PokeBot! PokeBot is a utility bot with fun and music functionality! For ## Issue Reporting and Feature Suggestions -If you would like to suggest a feature, or report a bug, please be sure to checkout our GitHub page! This will allow you to submit issues, and assign them to developers of the project. +If you would like to suggest a feature, or report a bug, please be sure to checkout the Issue page here on Github! This will allow you to submit issues, and assign them to developers of the project. ## Code Contribution -If you would like to add some code to PokeBot, please also visit the GitHub repository and submit a **pull request**. These are very easy to do, and if you do not know how to do one, it is an easy Google search. +If you would like to add some code to PokeBot, please submit a **pull request**. These are very easy to do, and if you do not know how to do one, it is an easy Google search. -- cgit v1.2.3 From f14a32689705f5c35e0ba990c3e7773821b7d929 Mon Sep 17 00:00:00 2001 From: Trey <32907415+TheEdgeNK@users.noreply.github.com> Date: Sat, 31 Mar 2018 18:42:55 -0400 Subject: Delete CONTRIBUTING.md --- CONTRIBUTING.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 003aeb8..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,5 +0,0 @@ -# Contributing to PokeBot -## Direct Code -First off, you need to have experience with Discord.js, and Node. If you know how to do that, then this type of contributing should be easy. Just submit a pull request, and be on your way. -## Issues -Report bugs in the bot using issues. Simple, submit an issue and tag some devs. We will work hard to fix it right away! -- cgit v1.2.3 From d2e555d026cdbf7caba383776173a7dc746210dc Mon Sep 17 00:00:00 2001 From: Trey <32907415+TheEdgeNK@users.noreply.github.com> Date: Sat, 31 Mar 2018 18:43:21 -0400 Subject: new contributing guide --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0489ecb --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,12 @@ +# Contributing to PokeBot: +There are many ways to contribute to PokeBot. Here are the ones we are accepting: +## Suggestions and Bug Reports +GitHub's Issue system is great for this, which is why we use it. Submitting a bug report? Tag it with bug? Something else? Find a related tag. You can even style the posts with markdown. How neat. +## Code Contribution +If you would rather add code to the project, you can do that as well! Since we are open-source, you can always submit a pull request! +For pull request criteria, look below: +* Make sure to learn how to use our custom command handler first before submitting a code contribution. +* If you are fixing a bug, state what bug you are fixing in the pull request. +* Do not write messy code. This is Trey's job and Justin cleans up after him enough. We don't want to raise his salary. + +That's it! We hope you enjoy contributing to our project! -- cgit v1.2.3 From 6f44ff4764d6d71cfe2a1a826986f014aa34fd86 Mon Sep 17 00:00:00 2001 From: Trey <32907415+TheEdgeNK@users.noreply.github.com> Date: Sat, 31 Mar 2018 18:44:15 -0400 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3605693..88da587 100644 --- a/README.md +++ b/README.md @@ -28,4 +28,4 @@ If you would like to suggest a feature, or report a bug, please be sure to check ## Code Contribution -If you would like to add some code to PokeBot, please submit a **pull request**. These are very easy to do, and if you do not know how to do one, it is an easy Google search. +If you would like to add some code to PokeBot, please submit a **pull request**. These are very easy to do, and if you do not know how to do one, it is an easy Google search. For our custom criteria, see **CONTRIBUTING.md** in the root of this repository. -- cgit v1.2.3 From 140c8981666a03fd7df0a258118ff9d0f6d5a0ba Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Sat, 31 Mar 2018 21:31:14 -0400 Subject: Update LICENSE.md --- LICENSE.md | 847 +++++++++++++------------------------------------------------ 1 file changed, 172 insertions(+), 675 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 9a5549b..16bef83 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,675 +1,172 @@ - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - PokeBot Copyright (C) 2018 TheEdge, jtsshieh, Alee - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +Open Software License ("OSL") v 3.0 + +This Open Software License (the "License") applies to any original work of +authorship (the "Original Work") whose owner (the "Licensor") has placed the +following licensing notice adjacent to the copyright notice for the Original +Work: + +Licensed under the Open Software License version 3.0 + +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, +non-exclusive, sublicensable license, for the duration of the copyright, to do +the following: + + a) to reproduce the Original Work in copies, either alone or as part of a + collective work; + + b) to translate, adapt, alter, transform, modify, or arrange the Original + Work, thereby creating derivative works ("Derivative Works") based upon the + Original Work; + + c) to distribute or communicate copies of the Original Work and Derivative + Works to the public, with the proviso that copies of Original Work or + Derivative Works that You distribute or communicate shall be licensed under + this Open Software License; + + d) to perform the Original Work publicly; and + + e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, +non-exclusive, sublicensable license, under patent claims owned or controlled +by the Licensor that are embodied in the Original Work as furnished by the +Licensor, for the duration of the patents, to make, use, sell, offer for sale, +have made, and import the Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred +form of the Original Work for making modifications to it and all available +documentation describing how to modify the Original Work. Licensor agrees to +provide a machine-readable copy of the Source Code of the Original Work along +with each copy of the Original Work that Licensor distributes. Licensor +reserves the right to satisfy this obligation by placing a machine-readable +copy of the Source Code in an information repository reasonably calculated to +permit inexpensive and convenient access by You for as long as Licensor +continues to distribute the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor the names +of any contributors to the Original Work, nor any of their trademarks or +service marks, may be used to endorse or promote products derived from this +Original Work without express prior permission of the Licensor. Except as +expressly stated herein, nothing in this License grants any license to +Licensor's trademarks, copyrights, patents, trade secrets or any other +intellectual property. No patent license is granted to make, use, sell, offer +for sale, have made, or import embodiments of any patent claims other than the +licensed claims defined in Section 2. No license is granted to the trademarks +of Licensor even if such marks are included in the Original Work. Nothing in +this License shall be interpreted to prohibit Licensor from licensing under +terms different from this License any Original Work that Licensor otherwise +would have a right to license. + +5) External Deployment. The term "External Deployment" means the use, +distribution, or communication of the Original Work or Derivative Works in any +way such that the Original Work or Derivative Works may be used by anyone +other than You, whether those works are distributed or communicated to those +persons or made available as an application intended for use over a network. +As an express condition for the grants of license hereunder, You must treat +any External Deployment by You of the Original Work or a Derivative Work as a +distribution under section 1(c). + +6) Attribution Rights. You must retain, in the Source Code of any Derivative +Works that You create, all copyright, patent, or trademark notices from the +Source Code of the Original Work, as well as any notices of licensing and any +descriptive text identified therein as an "Attribution Notice." You must cause +the Source Code for any Derivative Works that You create to carry a prominent +Attribution Notice reasonably calculated to inform recipients that You have +modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that +the copyright in and to the Original Work and the patent rights granted herein +by Licensor are owned by the Licensor or are sublicensed to You under the +terms of this License with the permission of the contributor(s) of those +copyrights and patent rights. Except as expressly stated in the immediately +preceding sentence, the Original Work is provided under this License on an "AS +IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without +limitation, the warranties of non-infringement, merchantability or fitness for +a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK +IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this +License. No license to the Original Work is granted by this License except +under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, +whether in tort (including negligence), contract, or otherwise, shall the +Licensor be liable to anyone for any indirect, special, incidental, or +consequential damages of any character arising as a result of this License or +the use of the Original Work including, without limitation, damages for loss +of goodwill, work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses. This limitation of liability shall not +apply to the extent applicable law prohibits such limitation. + +9) Acceptance and Termination. If, at any time, You expressly assented to this +License, that assent indicates your clear and irrevocable acceptance of this +License and all of its terms and conditions. If You distribute or communicate +copies of the Original Work or a Derivative Work, You must make a reasonable +effort under the circumstances to obtain the express assent of recipients to +the terms of this License. This License conditions your rights to undertake +the activities listed in Section 1, including your right to create Derivative +Works based upon the Original Work, and doing so without honoring these terms +and conditions is prohibited by copyright law and international treaty. +Nothing in this License is intended to affect copyright exceptions and +limitations (including "fair use" or "fair dealing"). This License shall +terminate immediately and You may no longer exercise any of the rights granted +to You by this License upon your failure to honor the conditions in Section +1(c). + +10) Termination for Patent Action. This License shall terminate automatically +and You may no longer exercise any of the rights granted to You by this +License as of the date You commence an action, including a cross-claim or +counterclaim, against Licensor or any licensee alleging that the Original Work +infringes a patent. This termination provision shall not apply for an action +alleging patent infringement by combinations of the Original Work with other +software or hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this +License may be brought only in the courts of a jurisdiction wherein the +Licensor resides or in which Licensor conducts its primary business, and under +the laws of that jurisdiction excluding its conflict-of-law provisions. The +application of the United Nations Convention on Contracts for the +International Sale of Goods is expressly excluded. Any use of the Original +Work outside the scope of this License or after its termination shall be +subject to the requirements and penalties of copyright or patent law in the +appropriate jurisdiction. This section shall survive the termination of this +License. + +12) Attorneys' Fees. In any action to enforce the terms of this License or +seeking damages relating thereto, the prevailing party shall be entitled to +recover its costs and expenses, including, without limitation, reasonable +attorneys' fees and costs incurred in connection with such action, including +any appeal of such action. This section shall survive the termination of this +License. + +13) Miscellaneous. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent necessary +to make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, +whether in upper or lower case, means an individual or a legal entity +exercising rights under, and complying with all of the terms of, this License. +For legal entities, "You" includes any entity that controls, is controlled by, +or is under common control with you. For purposes of this definition, +"control" means (i) the power, direct or indirect, to cause the direction or +management of such entity, whether by contract or otherwise, or (ii) ownership +of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise +restricted or conditioned by this License or by law, and Licensor promises not +to interfere with or be responsible for such uses by You. + +16) Modification of This License. This License is Copyright © 2005 Lawrence +Rosen. Permission is granted to copy, distribute, or communicate this License +without modification. Nothing in this License permits You to modify this +License as applied to the Original Work or to Derivative Works. However, You +may modify the text of this License and copy, distribute or communicate your +modified version (the "Modified License") and apply it to other original works +of authorship subject to the following conditions: (i) You may not indicate in +any way that your Modified License is the "Open Software License" or "OSL" and +you may not use those names in the name of your Modified License; (ii) You +must replace the notice specified in the first paragraph above with the notice +"Licensed under " or with a notice of your own +that is not confusingly similar to the notice in this License; and (iii) You +may not claim that your original works are open source software unless your +Modified License has been approved by Open Source Initiative (OSI) and You +comply with its license review and certification process. -- cgit v1.2.3 From e0836aece3377d37972e34e6117d1364b3fa4584 Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Sat, 31 Mar 2018 21:31:35 -0400 Subject: Update LICENSE.md --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 16bef83..d875044 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -165,7 +165,7 @@ of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice -"Licensed under " or with a notice of your own +"Licensed under Universe" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You -- cgit v1.2.3 From ac6fc04fcf61c7e8dbc13a9de15595ebbd27126d Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:45:52 -0400 Subject: HUGE cleanup --- Plugins/Music.js | 13 +----- Plugins/economy.js | 13 +----- Plugins/settings.js | 13 +----- Plugins/whitelist.js | 13 +----- canvas@2.0.0-alpha.11 | 0 cd | 0 commands/Fun/8ball.js | 13 +----- commands/Fun/balance.js | 13 +----- commands/Fun/cureboredom.js | 13 +----- commands/Fun/findmyphone.js | 13 +----- commands/Fun/getcredits.js | 13 +----- commands/Fun/og151.js | 13 +----- commands/Fun/ship.js | 13 +----- commands/Fun/slots.js | 13 +----- commands/Fun/story.js | 13 +----- commands/Getting Started/contribute.js | 13 +----- commands/Getting Started/help.js | 13 +----- commands/Getting Started/ping.js | 13 +----- commands/Getting Started/start.js | 13 +----- commands/Moderation/ban.js | 13 +----- commands/Moderation/interrogate.js | 13 +----- commands/Moderation/jail.js | 13 +----- commands/Moderation/kick.js | 13 +----- commands/Moderation/lswarns.js | 13 +----- commands/Moderation/purge.js | 13 +----- commands/Moderation/setLogs.js | 13 +----- commands/Moderation/setSuggestions.js | 44 ++++++++------------- commands/Moderation/softban.js | 13 +----- commands/Moderation/timeout.js | 13 +----- commands/Moderation/warn.js | 13 +----- commands/Music/play.js | 13 +----- commands/Music/skip.js | 13 +----- commands/Owners Only/eval.js | 13 +----- commands/Owners Only/modifycredits.js | 13 +----- commands/Owners Only/poweroff.js | 13 +----- commands/Owners Only/say.js | 13 +----- commands/Owners Only/testingcredits.js | 13 +----- commands/Owners Only/triggeregg.js | 13 +----- commands/Pokemon/claim.js | 13 +----- commands/Pokemon/drop.js | 13 +----- commands/Pokemon/forcedrop.js | 13 +----- commands/Pokemon/join.js | 13 +----- commands/Pokemon/leave.js | 13 +----- commands/Pokemon/lsitem.js | 13 +----- commands/Pokemon/tradegym.js | 13 +----- commands/Utility/character.js | 15 +------ commands/Utility/git.js | 38 ++++++------------ commands/Utility/invite.js | 18 ++------- commands/Utility/nick.js | 13 +----- commands/Utility/suggest.js | 13 +----- commands/Utility/uptime.js | 13 +----- commands/Utility/userinfo.js | 13 +----- events/channelCreate.js | 13 +----- events/guildMemberAdd.js | 13 +----- events/guildMemberRemove.js | 13 +----- events/message.js | 13 +----- events/messageDelete.js | 15 +------ events/messageDeleteBulk.js | 15 +------ events/messageUpdate.js | 15 +------ events/ready.js | 13 +----- ls | 0 node-pre-gyp | 0 npm | 0 test.js | 72 ---------------------------------- 64 files changed, 91 insertions(+), 804 deletions(-) delete mode 100644 canvas@2.0.0-alpha.11 delete mode 100644 cd delete mode 100644 ls delete mode 100644 node-pre-gyp delete mode 100644 npm delete mode 100644 test.js diff --git a/Plugins/Music.js b/Plugins/Music.js index 25164b7..2dbabda 100644 --- a/Plugins/Music.js +++ b/Plugins/Music.js @@ -3,18 +3,7 @@ * Music: Plugin for PokeBot that interacts with the Lavalink API. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/Plugins/economy.js b/Plugins/economy.js index aa0bb24..3658ce8 100644 --- a/Plugins/economy.js +++ b/Plugins/economy.js @@ -3,18 +3,7 @@ * Economy: Plugin for PokeBot that enables economy features. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/Plugins/settings.js b/Plugins/settings.js index d458c9c..bfa15d5 100644 --- a/Plugins/settings.js +++ b/Plugins/settings.js @@ -3,18 +3,7 @@ * Settings: Plugin for PokeBot that enables settings features. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/Plugins/whitelist.js b/Plugins/whitelist.js index ff102aa..41b4398 100644 --- a/Plugins/whitelist.js +++ b/Plugins/whitelist.js @@ -3,18 +3,7 @@ * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/canvas@2.0.0-alpha.11 b/canvas@2.0.0-alpha.11 deleted file mode 100644 index e69de29..0000000 diff --git a/cd b/cd deleted file mode 100644 index e69de29..0000000 diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 16d5d24..48f53e0 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/balance.js b/commands/Fun/balance.js index 6bfd2b0..afe094e 100644 --- a/commands/Fun/balance.js +++ b/commands/Fun/balance.js @@ -3,18 +3,7 @@ * Get Credits: Plugin for PokeBot that gives you credits. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/cureboredom.js b/commands/Fun/cureboredom.js index 1b7913c..4b99406 100644 --- a/commands/Fun/cureboredom.js +++ b/commands/Fun/cureboredom.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/findmyphone.js b/commands/Fun/findmyphone.js index 1575917..135d449 100644 --- a/commands/Fun/findmyphone.js +++ b/commands/Fun/findmyphone.js @@ -3,18 +3,7 @@ * FindMyPhone: Plugin for PokeBot that "helps you find your phone". * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/getcredits.js b/commands/Fun/getcredits.js index f52ee38..1d8b79b 100644 --- a/commands/Fun/getcredits.js +++ b/commands/Fun/getcredits.js @@ -3,18 +3,7 @@ * Get Credits: Plugin for PokeBot that gives you credits. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ const commandCooldown = new Set(); diff --git a/commands/Fun/og151.js b/commands/Fun/og151.js index aa9a288..d2b3ccf 100644 --- a/commands/Fun/og151.js +++ b/commands/Fun/og151.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/ship.js b/commands/Fun/ship.js index fdf9e3e..ba31db5 100644 --- a/commands/Fun/ship.js +++ b/commands/Fun/ship.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/slots.js b/commands/Fun/slots.js index b3295b4..ddd6757 100644 --- a/commands/Fun/slots.js +++ b/commands/Fun/slots.js @@ -3,18 +3,7 @@ * Slots: Plugin for PokeBot that allows you to gamble. * 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 . + * TLicensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Fun/story.js b/commands/Fun/story.js index 538bade..c35e3e7 100644 --- a/commands/Fun/story.js +++ b/commands/Fun/story.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Getting Started/contribute.js b/commands/Getting Started/contribute.js index 0e1ae82..2530058 100644 --- a/commands/Getting Started/contribute.js +++ b/commands/Getting Started/contribute.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Getting Started/help.js b/commands/Getting Started/help.js index 457e6ec..94a2128 100644 --- a/commands/Getting Started/help.js +++ b/commands/Getting Started/help.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Getting Started/ping.js b/commands/Getting Started/ping.js index 3de0479..365c9f4 100644 --- a/commands/Getting Started/ping.js +++ b/commands/Getting Started/ping.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Getting Started/start.js b/commands/Getting Started/start.js index c31ff1c..9da8be7 100644 --- a/commands/Getting Started/start.js +++ b/commands/Getting Started/start.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index 5974c53..545618c 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/interrogate.js b/commands/Moderation/interrogate.js index 8fa9708..a8fc250 100644 --- a/commands/Moderation/interrogate.js +++ b/commands/Moderation/interrogate.js @@ -3,18 +3,7 @@ * Interrogate: Plugin for PokeBot that allows the staff to investigate the fish :cod: * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/jail.js b/commands/Moderation/jail.js index 9923540..3388663 100644 --- a/commands/Moderation/jail.js +++ b/commands/Moderation/jail.js @@ -3,18 +3,7 @@ * Jail: Plugin for PokeBot that punishes bad boys.. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index c9d1d24..3a8c597 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/lswarns.js b/commands/Moderation/lswarns.js index 7d03c12..0a165b3 100644 --- a/commands/Moderation/lswarns.js +++ b/commands/Moderation/lswarns.js @@ -3,18 +3,7 @@ * List Warns: 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/purge.js b/commands/Moderation/purge.js index 256dca8..6ce557c 100644 --- a/commands/Moderation/purge.js +++ b/commands/Moderation/purge.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/setLogs.js b/commands/Moderation/setLogs.js index a354085..8ae50ea 100644 --- a/commands/Moderation/setLogs.js +++ b/commands/Moderation/setLogs.js @@ -3,18 +3,7 @@ * Set Log: 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/setSuggestions.js b/commands/Moderation/setSuggestions.js index 2fcd880..2a9d1bd 100644 --- a/commands/Moderation/setSuggestions.js +++ b/commands/Moderation/setSuggestions.js @@ -3,35 +3,23 @@ * Set Suggestions: 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = async (bot, msg, args) => { - if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permission to manage messages.'); - bot.plugins.settings.setStr('suggestions', args[0], msg.guild.id); - msg.reply('Alright, I have set the suggestions channel to ' + args[0]); - }; - - exports.conf = { - aliases: [], - guildOnly: true, - }; - - exports.help = { - name: 'setSuggestions', - description: 'Set\'s the Suggestions Channel.', - usage: '', - }; - \ No newline at end of file + if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permission to manage messages.'); + bot.plugins.settings.setStr('suggestions', args[0], msg.guild.id); + msg.reply('Alright, I have set the suggestions channel to ' + args[0]); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'setSuggestions', + description: 'Set\'s the Suggestions Channel.', + usage: '', +}; diff --git a/commands/Moderation/softban.js b/commands/Moderation/softban.js index 2db58ec..a97f8a6 100644 --- a/commands/Moderation/softban.js +++ b/commands/Moderation/softban.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/timeout.js b/commands/Moderation/timeout.js index af9c713..2e479ac 100644 --- a/commands/Moderation/timeout.js +++ b/commands/Moderation/timeout.js @@ -3,18 +3,7 @@ * Time Out: Plugin for PokeBot that punishes bad boys.. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 2599c0f..1dd0410 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Music/play.js b/commands/Music/play.js index cd22057..c494ea2 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -3,18 +3,7 @@ * Play: Plugin for PokeBot that performs music player 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Music/skip.js b/commands/Music/skip.js index 09ab165..96cecf6 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -3,18 +3,7 @@ * Skip: Plugin for PokeBot that performs music player 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/eval.js b/commands/Owners Only/eval.js index a6a6916..09aac08 100644 --- a/commands/Owners Only/eval.js +++ b/commands/Owners Only/eval.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/modifycredits.js b/commands/Owners Only/modifycredits.js index 69da668..6401d85 100644 --- a/commands/Owners Only/modifycredits.js +++ b/commands/Owners Only/modifycredits.js @@ -3,18 +3,7 @@ * Modify Credits: Plugin for PokeBot that modifies economy features. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/poweroff.js b/commands/Owners Only/poweroff.js index 0facc66..4bd7f75 100644 --- a/commands/Owners Only/poweroff.js +++ b/commands/Owners Only/poweroff.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/say.js b/commands/Owners Only/say.js index 95f6c53..3085d53 100644 --- a/commands/Owners Only/say.js +++ b/commands/Owners Only/say.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/testingcredits.js b/commands/Owners Only/testingcredits.js index 01d4934..bee93b2 100644 --- a/commands/Owners Only/testingcredits.js +++ b/commands/Owners Only/testingcredits.js @@ -3,18 +3,7 @@ * Testing Credits: Plugin for PokeBot that modifies economy features. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Owners Only/triggeregg.js b/commands/Owners Only/triggeregg.js index 45da516..c65c539 100644 --- a/commands/Owners Only/triggeregg.js +++ b/commands/Owners Only/triggeregg.js @@ -3,18 +3,7 @@ * TriggerEgg: Plugin for PokeBot that manages community events. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index 1d2f881..9bba3ec 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Pokemon/drop.js b/commands/Pokemon/drop.js index fb58184..3b2bf97 100644 --- a/commands/Pokemon/drop.js +++ b/commands/Pokemon/drop.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Pokemon/forcedrop.js b/commands/Pokemon/forcedrop.js index 4f6003b..50a9acf 100644 --- a/commands/Pokemon/forcedrop.js +++ b/commands/Pokemon/forcedrop.js @@ -3,18 +3,7 @@ * Ban: 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Pokemon/join.js b/commands/Pokemon/join.js index 09b5e11..91c6c7e 100644 --- a/commands/Pokemon/join.js +++ b/commands/Pokemon/join.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Pokemon/leave.js b/commands/Pokemon/leave.js index 24405cf..813debe 100644 --- a/commands/Pokemon/leave.js +++ b/commands/Pokemon/leave.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Pokemon/lsitem.js b/commands/Pokemon/lsitem.js index fad8bb3..dd628ae 100644 --- a/commands/Pokemon/lsitem.js +++ b/commands/Pokemon/lsitem.js @@ -3,18 +3,7 @@ * LSItem: Plugin for lists an item for sale in the marketplace * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Pokemon/tradegym.js b/commands/Pokemon/tradegym.js index f38d2ab..e195b62 100644 --- a/commands/Pokemon/tradegym.js +++ b/commands/Pokemon/tradegym.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Utility/character.js b/commands/Utility/character.js index 603571b..56d9bfb 100644 --- a/commands/Utility/character.js +++ b/commands/Utility/character.js @@ -1,20 +1,9 @@ /** ************************************** * - * Suggest: Plugin for PokeBot that allows users to suggest things. + * Character: Plugin for PokeBot that examines unicode character further. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Utility/git.js b/commands/Utility/git.js index a648995..f5113a2 100644 --- a/commands/Utility/git.js +++ b/commands/Utility/git.js @@ -3,32 +3,20 @@ * Git: Plugin for PokeBot that provides gives the user information about 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 . + * 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/PokeWorld/PokeBot'); - }; - - exports.conf = { - aliases: [], - guildOnly: true, - }; - - exports.help = { - name: 'git', - description: 'Gives the user a link to the git.', - }; - \ No newline at end of file + msg.channel.send('The GitHub page for PokeBot can be found here: https://github.com/PokeWorld/PokeBot'); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'git', + description: 'Gives the user a link to the git.', +}; diff --git a/commands/Utility/invite.js b/commands/Utility/invite.js index e602649..933e9ba 100644 --- a/commands/Utility/invite.js +++ b/commands/Utility/invite.js @@ -3,32 +3,20 @@ * Invite: Plugin for PokeBot that provides gives the user information about 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ exports.run = (bot, msg) => { msg.channel.send('You can invite me by visiting https://discordbots.org/bot/417096530596724737.'); }; - + exports.conf = { aliases: [], guildOnly: true, }; - + exports.help = { name: 'invite', description: 'Gives the user a link to invite the bot.', }; - \ No newline at end of file diff --git a/commands/Utility/nick.js b/commands/Utility/nick.js index 9701a3c..44ab7f5 100644 --- a/commands/Utility/nick.js +++ b/commands/Utility/nick.js @@ -3,18 +3,7 @@ * Nick: Plugin for PokeBot that changes the user's display name. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Utility/suggest.js b/commands/Utility/suggest.js index fae35db..f1b4206 100644 --- a/commands/Utility/suggest.js +++ b/commands/Utility/suggest.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Utility/uptime.js b/commands/Utility/uptime.js index 86ae84d..8492df2 100644 --- a/commands/Utility/uptime.js +++ b/commands/Utility/uptime.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/commands/Utility/userinfo.js b/commands/Utility/userinfo.js index 9716021..80844e1 100644 --- a/commands/Utility/userinfo.js +++ b/commands/Utility/userinfo.js @@ -3,18 +3,7 @@ * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/events/channelCreate.js b/events/channelCreate.js index 9dce088..339a3b5 100644 --- a/events/channelCreate.js +++ b/events/channelCreate.js @@ -3,18 +3,7 @@ * ChannelCreate: Plugin for PokeBot that setups gyms when they are created. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/events/guildMemberAdd.js b/events/guildMemberAdd.js index 57ff757..63081b1 100644 --- a/events/guildMemberAdd.js +++ b/events/guildMemberAdd.js @@ -3,18 +3,7 @@ * GuildMemberAdd: Plugin for PokeBot that setups up and welcomes any new 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/events/guildMemberRemove.js b/events/guildMemberRemove.js index 9d38180..001f2ec 100644 --- a/events/guildMemberRemove.js +++ b/events/guildMemberRemove.js @@ -3,18 +3,7 @@ * GuildMemberRemove: Plugin for PokeBot that waves bye to a user who leaves. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/events/message.js b/events/message.js index 4154536..238d95e 100644 --- a/events/message.js +++ b/events/message.js @@ -3,18 +3,7 @@ * Message/CommandHandler: Plugin for PokeBot that processes and parses command. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/events/messageDelete.js b/events/messageDelete.js index 2823e7f..95c3718 100644 --- a/events/messageDelete.js +++ b/events/messageDelete.js @@ -1,20 +1,9 @@ /** ************************************** * - * messageDelete: Plugin for PokeBot that handles deleted messages. + * MessageDelete: Plugin for PokeBot that handles deleted messages. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/events/messageDeleteBulk.js b/events/messageDeleteBulk.js index 0d0c345..3d84e4d 100644 --- a/events/messageDeleteBulk.js +++ b/events/messageDeleteBulk.js @@ -1,20 +1,9 @@ /** ************************************** * - * messagesDeleteBulk: Plugin for PokeBot that handles many messages being deleted at once. + * MessagesDeleteBulk: Plugin for PokeBot that handles many messages being deleted at once. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/events/messageUpdate.js b/events/messageUpdate.js index ed0565b..0baa08c 100644 --- a/events/messageUpdate.js +++ b/events/messageUpdate.js @@ -1,20 +1,9 @@ /** ************************************** * - * messageUpdate: Plugin for PokeBot that handles edited messages. + * MessageUpdate: Plugin for PokeBot that handles edited messages. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/events/ready.js b/events/ready.js index 8b7a61b..9c30717 100644 --- a/events/ready.js +++ b/events/ready.js @@ -3,18 +3,7 @@ * Ready: Plugin for PokeBot that setups up pokebot for production. * 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 . + * Licensed under the Open Software License version 3.0 * * *************************************/ diff --git a/ls b/ls deleted file mode 100644 index e69de29..0000000 diff --git a/node-pre-gyp b/node-pre-gyp deleted file mode 100644 index e69de29..0000000 diff --git a/npm b/npm deleted file mode 100644 index e69de29..0000000 diff --git a/test.js b/test.js deleted file mode 100644 index 69b8e71..0000000 --- a/test.js +++ /dev/null @@ -1,72 +0,0 @@ -const Discord = require('discord.js'); -const bot = new Discord.Client(); -const fs = require('fs'); - -bot.commands = new Discord.Collection(); -bot.aliases = new Discord.Collection(); -bot.categories = new Discord.Collection(); -bot.queue = new Discord.Collection(); -bot.plugins = { music : require('./Plugins/Music.js') }; -cmdLoader(); - -async function cmdLoader() { - const categories = await fs.readdirSync('./commands'); - console.log(`Loading ${categories.length} categories(s) into memory\n`); - categories.forEach(x => { - loadGroup(x); - }); -} -async function loadGroup(name) { - const files = await fs.readdirSync(`./commands/${name}`); - - console.log(`Loading the category '${name}' into memory with a total of ${files.length} command(s)`); - - bot.commands.set(name, new Map()); - bot.aliases.set(name, new Map()); - - const commands = []; - files.forEach(x => { - loadCmd(name, x); - commands.push(x.split('.')[0]); - }); - - bot.categories.set(name, commands); - console.log(`The category ${name} has been loaded.\n`); -} - -async function loadCmd(category, cmd) { - try { - console.log(`Loading the Command ${cmd.split('.')[0]}`); - const command = require(`./commands/${category}/${cmd}`); - bot.commands.get(category).set(command.help.name, command); - command.conf.aliases.forEach(alias => { - console.log(`Loading the alias ${alias} for the command ${command.help.name}`); - bot.aliases.get(category).set(alias, command.help.name); - }); - } - catch (err) { - console.log(`An error has occured trying to load the command '${cmd.split('.')[0]}'`); - console.log(err.stack); - } -} - - -fs.readdir('./events', (err, files) => { - if (err) console.error(err); - console.log(`Attempting to load a total of ${files.length} events into the memory.`); - files.forEach(file => { - try { - const eventName = file.split('.')[0]; - const event = require(`./events/${file}`); - console.log(`Attempting to load the event "${eventName}".`); - bot.on(eventName, event.bind(null, bot)); - delete require.cache[require.resolve(`./events/${file}`)]; - } - catch (err) { - console.log('An error has occured trying to load a event. Here is the error.'); - console.log(err.stack); - } - }); - console.log('Event Loading complete!'); - console.log('\n'); -}); -- cgit v1.2.3 From c14f020b6c10061f5e75774ba7aabd979d377bc3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:46:43 -0400 Subject: more cleanup --- .circleci/config.yml | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 767aa9c..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-javascript/ for more details -# -version: 2 -jobs: - build: - docker: - # specify the version you desire here - - image: circleci/node:7.10 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/mongo:3.4.4 - - working_directory: ~/repo - - steps: - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: yarn install - - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - # run tests! - - run: npm test -- cgit v1.2.3 From 23cb4cea6cc818080964e2eabc29df7e8c031e19 Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Sat, 31 Mar 2018 21:47:03 -0400 Subject: Rename Music.js to music.js --- Plugins/Music.js | 59 -------------------------------------------------------- Plugins/music.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 Plugins/Music.js create mode 100644 Plugins/music.js diff --git a/Plugins/Music.js b/Plugins/Music.js deleted file mode 100644 index 2dbabda..0000000 --- a/Plugins/Music.js +++ /dev/null @@ -1,59 +0,0 @@ -/** ************************************** - * - * Music: Plugin for PokeBot that interacts with the Lavalink API. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.resolveTrack = async (term, sc) => { - const fetch = require('snekfetch'); - let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); - if (!track.body[0]) { - const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; - track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); - } - return track.body[0]; -}; - -exports.play = async (bot, msg, track) => { - const player = await bot.player.join({ - d: { - guild_id: msg.guild.id, - channel_id: msg.member.voiceChannelID, - }, - host: 'localhost', - }); - if (!bot.queue.has(msg.guild.id)) { - bot.queue.set(msg.guild.id, []); - bot.queue.get(msg.guild.id).push(track); - player.play(bot.queue.get(msg.guild.id).shift()); - player.on('end', () => { - if (bot.queue.get(msg.guild.id)[0]) { - player.play(bot.queue.get(msg.guild.id).shift()); - } - else { - bot.player.leave(msg.guild.id); - } - }); - } - else { - bot.queue.get(msg.guild.id).push(track); - } -}; - -exports.skip = async (bot, msg) => { - const player = await bot.player.join({ - guild: msg.guild.id, - channel: msg.member.voiceChannelID, - host: 'localhost', - }); - if (bot.queue.has(msg.guild.id)) { - player.stop(); - player.emit('end'); - } - else { - return msg.channel.send('There is nothing playing.'); - } -}; diff --git a/Plugins/music.js b/Plugins/music.js new file mode 100644 index 0000000..2dbabda --- /dev/null +++ b/Plugins/music.js @@ -0,0 +1,59 @@ +/** ************************************** + * + * Music: Plugin for PokeBot that interacts with the Lavalink API. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +exports.resolveTrack = async (term, sc) => { + const fetch = require('snekfetch'); + let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); + if (!track.body[0]) { + const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; + track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); + } + return track.body[0]; +}; + +exports.play = async (bot, msg, track) => { + const player = await bot.player.join({ + d: { + guild_id: msg.guild.id, + channel_id: msg.member.voiceChannelID, + }, + host: 'localhost', + }); + if (!bot.queue.has(msg.guild.id)) { + bot.queue.set(msg.guild.id, []); + bot.queue.get(msg.guild.id).push(track); + player.play(bot.queue.get(msg.guild.id).shift()); + player.on('end', () => { + if (bot.queue.get(msg.guild.id)[0]) { + player.play(bot.queue.get(msg.guild.id).shift()); + } + else { + bot.player.leave(msg.guild.id); + } + }); + } + else { + bot.queue.get(msg.guild.id).push(track); + } +}; + +exports.skip = async (bot, msg) => { + const player = await bot.player.join({ + guild: msg.guild.id, + channel: msg.member.voiceChannelID, + host: 'localhost', + }); + if (bot.queue.has(msg.guild.id)) { + player.stop(); + player.emit('end'); + } + else { + return msg.channel.send('There is nothing playing.'); + } +}; -- cgit v1.2.3 From 7d2830b1934a9cddd0fac4e65642d259fc31e528 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:48:49 -0400 Subject: test --- Plugins/Music.js | 59 ---------------------------------------------------- Plugins/economy.js | 40 ----------------------------------- Plugins/settings.js | 54 ----------------------------------------------- Plugins/whitelist.js | 28 ------------------------- test/economy.js | 40 +++++++++++++++++++++++++++++++++++ test/music.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ test/settings.js | 54 +++++++++++++++++++++++++++++++++++++++++++++++ test/whitelist.js | 28 +++++++++++++++++++++++++ 8 files changed, 181 insertions(+), 181 deletions(-) delete mode 100644 Plugins/Music.js delete mode 100644 Plugins/economy.js delete mode 100644 Plugins/settings.js delete mode 100644 Plugins/whitelist.js create mode 100644 test/economy.js create mode 100644 test/music.js create mode 100644 test/settings.js create mode 100644 test/whitelist.js diff --git a/Plugins/Music.js b/Plugins/Music.js deleted file mode 100644 index 2dbabda..0000000 --- a/Plugins/Music.js +++ /dev/null @@ -1,59 +0,0 @@ -/** ************************************** - * - * Music: Plugin for PokeBot that interacts with the Lavalink API. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.resolveTrack = async (term, sc) => { - const fetch = require('snekfetch'); - let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); - if (!track.body[0]) { - const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; - track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); - } - return track.body[0]; -}; - -exports.play = async (bot, msg, track) => { - const player = await bot.player.join({ - d: { - guild_id: msg.guild.id, - channel_id: msg.member.voiceChannelID, - }, - host: 'localhost', - }); - if (!bot.queue.has(msg.guild.id)) { - bot.queue.set(msg.guild.id, []); - bot.queue.get(msg.guild.id).push(track); - player.play(bot.queue.get(msg.guild.id).shift()); - player.on('end', () => { - if (bot.queue.get(msg.guild.id)[0]) { - player.play(bot.queue.get(msg.guild.id).shift()); - } - else { - bot.player.leave(msg.guild.id); - } - }); - } - else { - bot.queue.get(msg.guild.id).push(track); - } -}; - -exports.skip = async (bot, msg) => { - const player = await bot.player.join({ - guild: msg.guild.id, - channel: msg.member.voiceChannelID, - host: 'localhost', - }); - if (bot.queue.has(msg.guild.id)) { - player.stop(); - player.emit('end'); - } - else { - return msg.channel.send('There is nothing playing.'); - } -}; diff --git a/Plugins/economy.js b/Plugins/economy.js deleted file mode 100644 index 3658ce8..0000000 --- a/Plugins/economy.js +++ /dev/null @@ -1,40 +0,0 @@ -/** ************************************** - * - * Economy: Plugin for PokeBot that enables economy features. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.get = async (userid) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - return amount; - } - else { - await db.set(`money_${userid}`, 0); - return await db.fetch(`money_${userid}`); - } -}; - -exports.add = async (userid, money) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - await db.set(`money_${userid}`, amount + money); - } - else { - await db.set(`money_${userid}`, money); - } -}; - -exports.subtract = async (userid, money) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - await db.set(`money_${userid}`, amount - money); - } - else { - await db.set(`money_${userid}`, 0 - money); - } -}; diff --git a/Plugins/settings.js b/Plugins/settings.js deleted file mode 100644 index bfa15d5..0000000 --- a/Plugins/settings.js +++ /dev/null @@ -1,54 +0,0 @@ -/** ************************************** - * - * Settings: Plugin for PokeBot that enables settings features. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.getInt = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, 0); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.getStr = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, ''); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.getBool = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, false); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.setInt = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, parseInt(value)); -}; - -exports.setStr = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, value); -}; - -exports.setBool = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, (value == true)); -}; diff --git a/Plugins/whitelist.js b/Plugins/whitelist.js deleted file mode 100644 index 41b4398..0000000 --- a/Plugins/whitelist.js +++ /dev/null @@ -1,28 +0,0 @@ -/** ************************************** - * - * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.whitelist = async (guildID) => { - await db.set(`whitelist_${guildID}`, true); -}; - -exports.unwhitelist = async (guildID) => { - await db.set(`whitelist_${guildID}`, false); -}; - -exports.isWhitelist = async (guildID) => { - const value = await db.fetch(`whitelist_${guildID}`); - if (value) { - return value; - } - else { - await db.set(`whitelist_${guildID}`, false); - return await db.fetch(`whitelist_${guildID}`); - } -}; diff --git a/test/economy.js b/test/economy.js new file mode 100644 index 0000000..3658ce8 --- /dev/null +++ b/test/economy.js @@ -0,0 +1,40 @@ +/** ************************************** + * + * Economy: Plugin for PokeBot that enables economy features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.get = async (userid) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + return amount; + } + else { + await db.set(`money_${userid}`, 0); + return await db.fetch(`money_${userid}`); + } +}; + +exports.add = async (userid, money) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + await db.set(`money_${userid}`, amount + money); + } + else { + await db.set(`money_${userid}`, money); + } +}; + +exports.subtract = async (userid, money) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + await db.set(`money_${userid}`, amount - money); + } + else { + await db.set(`money_${userid}`, 0 - money); + } +}; diff --git a/test/music.js b/test/music.js new file mode 100644 index 0000000..2dbabda --- /dev/null +++ b/test/music.js @@ -0,0 +1,59 @@ +/** ************************************** + * + * Music: Plugin for PokeBot that interacts with the Lavalink API. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +exports.resolveTrack = async (term, sc) => { + const fetch = require('snekfetch'); + let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); + if (!track.body[0]) { + const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; + track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); + } + return track.body[0]; +}; + +exports.play = async (bot, msg, track) => { + const player = await bot.player.join({ + d: { + guild_id: msg.guild.id, + channel_id: msg.member.voiceChannelID, + }, + host: 'localhost', + }); + if (!bot.queue.has(msg.guild.id)) { + bot.queue.set(msg.guild.id, []); + bot.queue.get(msg.guild.id).push(track); + player.play(bot.queue.get(msg.guild.id).shift()); + player.on('end', () => { + if (bot.queue.get(msg.guild.id)[0]) { + player.play(bot.queue.get(msg.guild.id).shift()); + } + else { + bot.player.leave(msg.guild.id); + } + }); + } + else { + bot.queue.get(msg.guild.id).push(track); + } +}; + +exports.skip = async (bot, msg) => { + const player = await bot.player.join({ + guild: msg.guild.id, + channel: msg.member.voiceChannelID, + host: 'localhost', + }); + if (bot.queue.has(msg.guild.id)) { + player.stop(); + player.emit('end'); + } + else { + return msg.channel.send('There is nothing playing.'); + } +}; diff --git a/test/settings.js b/test/settings.js new file mode 100644 index 0000000..bfa15d5 --- /dev/null +++ b/test/settings.js @@ -0,0 +1,54 @@ +/** ************************************** + * + * Settings: Plugin for PokeBot that enables settings features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.getInt = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, 0); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.getStr = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, ''); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.getBool = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, false); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.setInt = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, parseInt(value)); +}; + +exports.setStr = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, value); +}; + +exports.setBool = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, (value == true)); +}; diff --git a/test/whitelist.js b/test/whitelist.js new file mode 100644 index 0000000..41b4398 --- /dev/null +++ b/test/whitelist.js @@ -0,0 +1,28 @@ +/** ************************************** + * + * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.whitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, true); +}; + +exports.unwhitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, false); +}; + +exports.isWhitelist = async (guildID) => { + const value = await db.fetch(`whitelist_${guildID}`); + if (value) { + return value; + } + else { + await db.set(`whitelist_${guildID}`, false); + return await db.fetch(`whitelist_${guildID}`); + } +}; -- cgit v1.2.3 From bdef4a086948d9d55d672c8fdcac62d45b8e8ade Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:48:49 -0400 Subject: Revert "test" This reverts commit 7d2830b1934a9cddd0fac4e65642d259fc31e528. --- Plugins/Music.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Plugins/economy.js | 40 +++++++++++++++++++++++++++++++++++ Plugins/settings.js | 54 +++++++++++++++++++++++++++++++++++++++++++++++ Plugins/whitelist.js | 28 +++++++++++++++++++++++++ test/economy.js | 40 ----------------------------------- test/music.js | 59 ---------------------------------------------------- test/settings.js | 54 ----------------------------------------------- test/whitelist.js | 28 ------------------------- 8 files changed, 181 insertions(+), 181 deletions(-) create mode 100644 Plugins/Music.js create mode 100644 Plugins/economy.js create mode 100644 Plugins/settings.js create mode 100644 Plugins/whitelist.js delete mode 100644 test/economy.js delete mode 100644 test/music.js delete mode 100644 test/settings.js delete mode 100644 test/whitelist.js diff --git a/Plugins/Music.js b/Plugins/Music.js new file mode 100644 index 0000000..2dbabda --- /dev/null +++ b/Plugins/Music.js @@ -0,0 +1,59 @@ +/** ************************************** + * + * Music: Plugin for PokeBot that interacts with the Lavalink API. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +exports.resolveTrack = async (term, sc) => { + const fetch = require('snekfetch'); + let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); + if (!track.body[0]) { + const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; + track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); + } + return track.body[0]; +}; + +exports.play = async (bot, msg, track) => { + const player = await bot.player.join({ + d: { + guild_id: msg.guild.id, + channel_id: msg.member.voiceChannelID, + }, + host: 'localhost', + }); + if (!bot.queue.has(msg.guild.id)) { + bot.queue.set(msg.guild.id, []); + bot.queue.get(msg.guild.id).push(track); + player.play(bot.queue.get(msg.guild.id).shift()); + player.on('end', () => { + if (bot.queue.get(msg.guild.id)[0]) { + player.play(bot.queue.get(msg.guild.id).shift()); + } + else { + bot.player.leave(msg.guild.id); + } + }); + } + else { + bot.queue.get(msg.guild.id).push(track); + } +}; + +exports.skip = async (bot, msg) => { + const player = await bot.player.join({ + guild: msg.guild.id, + channel: msg.member.voiceChannelID, + host: 'localhost', + }); + if (bot.queue.has(msg.guild.id)) { + player.stop(); + player.emit('end'); + } + else { + return msg.channel.send('There is nothing playing.'); + } +}; diff --git a/Plugins/economy.js b/Plugins/economy.js new file mode 100644 index 0000000..3658ce8 --- /dev/null +++ b/Plugins/economy.js @@ -0,0 +1,40 @@ +/** ************************************** + * + * Economy: Plugin for PokeBot that enables economy features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.get = async (userid) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + return amount; + } + else { + await db.set(`money_${userid}`, 0); + return await db.fetch(`money_${userid}`); + } +}; + +exports.add = async (userid, money) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + await db.set(`money_${userid}`, amount + money); + } + else { + await db.set(`money_${userid}`, money); + } +}; + +exports.subtract = async (userid, money) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + await db.set(`money_${userid}`, amount - money); + } + else { + await db.set(`money_${userid}`, 0 - money); + } +}; diff --git a/Plugins/settings.js b/Plugins/settings.js new file mode 100644 index 0000000..bfa15d5 --- /dev/null +++ b/Plugins/settings.js @@ -0,0 +1,54 @@ +/** ************************************** + * + * Settings: Plugin for PokeBot that enables settings features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.getInt = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, 0); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.getStr = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, ''); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.getBool = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, false); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.setInt = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, parseInt(value)); +}; + +exports.setStr = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, value); +}; + +exports.setBool = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, (value == true)); +}; diff --git a/Plugins/whitelist.js b/Plugins/whitelist.js new file mode 100644 index 0000000..41b4398 --- /dev/null +++ b/Plugins/whitelist.js @@ -0,0 +1,28 @@ +/** ************************************** + * + * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.whitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, true); +}; + +exports.unwhitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, false); +}; + +exports.isWhitelist = async (guildID) => { + const value = await db.fetch(`whitelist_${guildID}`); + if (value) { + return value; + } + else { + await db.set(`whitelist_${guildID}`, false); + return await db.fetch(`whitelist_${guildID}`); + } +}; diff --git a/test/economy.js b/test/economy.js deleted file mode 100644 index 3658ce8..0000000 --- a/test/economy.js +++ /dev/null @@ -1,40 +0,0 @@ -/** ************************************** - * - * Economy: Plugin for PokeBot that enables economy features. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.get = async (userid) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - return amount; - } - else { - await db.set(`money_${userid}`, 0); - return await db.fetch(`money_${userid}`); - } -}; - -exports.add = async (userid, money) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - await db.set(`money_${userid}`, amount + money); - } - else { - await db.set(`money_${userid}`, money); - } -}; - -exports.subtract = async (userid, money) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - await db.set(`money_${userid}`, amount - money); - } - else { - await db.set(`money_${userid}`, 0 - money); - } -}; diff --git a/test/music.js b/test/music.js deleted file mode 100644 index 2dbabda..0000000 --- a/test/music.js +++ /dev/null @@ -1,59 +0,0 @@ -/** ************************************** - * - * Music: Plugin for PokeBot that interacts with the Lavalink API. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.resolveTrack = async (term, sc) => { - const fetch = require('snekfetch'); - let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); - if (!track.body[0]) { - const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; - track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); - } - return track.body[0]; -}; - -exports.play = async (bot, msg, track) => { - const player = await bot.player.join({ - d: { - guild_id: msg.guild.id, - channel_id: msg.member.voiceChannelID, - }, - host: 'localhost', - }); - if (!bot.queue.has(msg.guild.id)) { - bot.queue.set(msg.guild.id, []); - bot.queue.get(msg.guild.id).push(track); - player.play(bot.queue.get(msg.guild.id).shift()); - player.on('end', () => { - if (bot.queue.get(msg.guild.id)[0]) { - player.play(bot.queue.get(msg.guild.id).shift()); - } - else { - bot.player.leave(msg.guild.id); - } - }); - } - else { - bot.queue.get(msg.guild.id).push(track); - } -}; - -exports.skip = async (bot, msg) => { - const player = await bot.player.join({ - guild: msg.guild.id, - channel: msg.member.voiceChannelID, - host: 'localhost', - }); - if (bot.queue.has(msg.guild.id)) { - player.stop(); - player.emit('end'); - } - else { - return msg.channel.send('There is nothing playing.'); - } -}; diff --git a/test/settings.js b/test/settings.js deleted file mode 100644 index bfa15d5..0000000 --- a/test/settings.js +++ /dev/null @@ -1,54 +0,0 @@ -/** ************************************** - * - * Settings: Plugin for PokeBot that enables settings features. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.getInt = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, 0); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.getStr = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, ''); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.getBool = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, false); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.setInt = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, parseInt(value)); -}; - -exports.setStr = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, value); -}; - -exports.setBool = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, (value == true)); -}; diff --git a/test/whitelist.js b/test/whitelist.js deleted file mode 100644 index 41b4398..0000000 --- a/test/whitelist.js +++ /dev/null @@ -1,28 +0,0 @@ -/** ************************************** - * - * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.whitelist = async (guildID) => { - await db.set(`whitelist_${guildID}`, true); -}; - -exports.unwhitelist = async (guildID) => { - await db.set(`whitelist_${guildID}`, false); -}; - -exports.isWhitelist = async (guildID) => { - const value = await db.fetch(`whitelist_${guildID}`); - if (value) { - return value; - } - else { - await db.set(`whitelist_${guildID}`, false); - return await db.fetch(`whitelist_${guildID}`); - } -}; -- cgit v1.2.3 From 56f29e5b75f35722c69bb64f3f3b7c8be14cbbb8 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:49:22 -0400 Subject: Auto stash before revert of "test" --- Plugins/music.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Plugins/music.js diff --git a/Plugins/music.js b/Plugins/music.js new file mode 100644 index 0000000..2dbabda --- /dev/null +++ b/Plugins/music.js @@ -0,0 +1,59 @@ +/** ************************************** + * + * Music: Plugin for PokeBot that interacts with the Lavalink API. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +exports.resolveTrack = async (term, sc) => { + const fetch = require('snekfetch'); + let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); + if (!track.body[0]) { + const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; + track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); + } + return track.body[0]; +}; + +exports.play = async (bot, msg, track) => { + const player = await bot.player.join({ + d: { + guild_id: msg.guild.id, + channel_id: msg.member.voiceChannelID, + }, + host: 'localhost', + }); + if (!bot.queue.has(msg.guild.id)) { + bot.queue.set(msg.guild.id, []); + bot.queue.get(msg.guild.id).push(track); + player.play(bot.queue.get(msg.guild.id).shift()); + player.on('end', () => { + if (bot.queue.get(msg.guild.id)[0]) { + player.play(bot.queue.get(msg.guild.id).shift()); + } + else { + bot.player.leave(msg.guild.id); + } + }); + } + else { + bot.queue.get(msg.guild.id).push(track); + } +}; + +exports.skip = async (bot, msg) => { + const player = await bot.player.join({ + guild: msg.guild.id, + channel: msg.member.voiceChannelID, + host: 'localhost', + }); + if (bot.queue.has(msg.guild.id)) { + player.stop(); + player.emit('end'); + } + else { + return msg.channel.send('There is nothing playing.'); + } +}; -- cgit v1.2.3 From 308808907e28a90747d6b218866560c7cc9986c6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:49:29 -0400 Subject: test --- Plugins/music.js | 59 -------------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 Plugins/music.js diff --git a/Plugins/music.js b/Plugins/music.js deleted file mode 100644 index 2dbabda..0000000 --- a/Plugins/music.js +++ /dev/null @@ -1,59 +0,0 @@ -/** ************************************** - * - * Music: Plugin for PokeBot that interacts with the Lavalink API. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.resolveTrack = async (term, sc) => { - const fetch = require('snekfetch'); - let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); - if (!track.body[0]) { - const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; - track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); - } - return track.body[0]; -}; - -exports.play = async (bot, msg, track) => { - const player = await bot.player.join({ - d: { - guild_id: msg.guild.id, - channel_id: msg.member.voiceChannelID, - }, - host: 'localhost', - }); - if (!bot.queue.has(msg.guild.id)) { - bot.queue.set(msg.guild.id, []); - bot.queue.get(msg.guild.id).push(track); - player.play(bot.queue.get(msg.guild.id).shift()); - player.on('end', () => { - if (bot.queue.get(msg.guild.id)[0]) { - player.play(bot.queue.get(msg.guild.id).shift()); - } - else { - bot.player.leave(msg.guild.id); - } - }); - } - else { - bot.queue.get(msg.guild.id).push(track); - } -}; - -exports.skip = async (bot, msg) => { - const player = await bot.player.join({ - guild: msg.guild.id, - channel: msg.member.voiceChannelID, - host: 'localhost', - }); - if (bot.queue.has(msg.guild.id)) { - player.stop(); - player.emit('end'); - } - else { - return msg.channel.send('There is nothing playing.'); - } -}; -- cgit v1.2.3 From f5cdce9c53e3b1b21727c987510bd5522f0d5fb1 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:50:10 -0400 Subject: Auto stash before revert of "test" --- Plugins/Music.js | 59 ---------------------------------------------------- Plugins/economy.js | 40 ----------------------------------- Plugins/settings.js | 54 ----------------------------------------------- Plugins/whitelist.js | 28 ------------------------- test/economy.js | 40 +++++++++++++++++++++++++++++++++++ test/music.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ test/settings.js | 54 +++++++++++++++++++++++++++++++++++++++++++++++ test/whitelist.js | 28 +++++++++++++++++++++++++ 8 files changed, 181 insertions(+), 181 deletions(-) delete mode 100644 Plugins/Music.js delete mode 100644 Plugins/economy.js delete mode 100644 Plugins/settings.js delete mode 100644 Plugins/whitelist.js create mode 100644 test/economy.js create mode 100644 test/music.js create mode 100644 test/settings.js create mode 100644 test/whitelist.js diff --git a/Plugins/Music.js b/Plugins/Music.js deleted file mode 100644 index 2dbabda..0000000 --- a/Plugins/Music.js +++ /dev/null @@ -1,59 +0,0 @@ -/** ************************************** - * - * Music: Plugin for PokeBot that interacts with the Lavalink API. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.resolveTrack = async (term, sc) => { - const fetch = require('snekfetch'); - let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); - if (!track.body[0]) { - const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; - track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); - } - return track.body[0]; -}; - -exports.play = async (bot, msg, track) => { - const player = await bot.player.join({ - d: { - guild_id: msg.guild.id, - channel_id: msg.member.voiceChannelID, - }, - host: 'localhost', - }); - if (!bot.queue.has(msg.guild.id)) { - bot.queue.set(msg.guild.id, []); - bot.queue.get(msg.guild.id).push(track); - player.play(bot.queue.get(msg.guild.id).shift()); - player.on('end', () => { - if (bot.queue.get(msg.guild.id)[0]) { - player.play(bot.queue.get(msg.guild.id).shift()); - } - else { - bot.player.leave(msg.guild.id); - } - }); - } - else { - bot.queue.get(msg.guild.id).push(track); - } -}; - -exports.skip = async (bot, msg) => { - const player = await bot.player.join({ - guild: msg.guild.id, - channel: msg.member.voiceChannelID, - host: 'localhost', - }); - if (bot.queue.has(msg.guild.id)) { - player.stop(); - player.emit('end'); - } - else { - return msg.channel.send('There is nothing playing.'); - } -}; diff --git a/Plugins/economy.js b/Plugins/economy.js deleted file mode 100644 index 3658ce8..0000000 --- a/Plugins/economy.js +++ /dev/null @@ -1,40 +0,0 @@ -/** ************************************** - * - * Economy: Plugin for PokeBot that enables economy features. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.get = async (userid) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - return amount; - } - else { - await db.set(`money_${userid}`, 0); - return await db.fetch(`money_${userid}`); - } -}; - -exports.add = async (userid, money) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - await db.set(`money_${userid}`, amount + money); - } - else { - await db.set(`money_${userid}`, money); - } -}; - -exports.subtract = async (userid, money) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - await db.set(`money_${userid}`, amount - money); - } - else { - await db.set(`money_${userid}`, 0 - money); - } -}; diff --git a/Plugins/settings.js b/Plugins/settings.js deleted file mode 100644 index bfa15d5..0000000 --- a/Plugins/settings.js +++ /dev/null @@ -1,54 +0,0 @@ -/** ************************************** - * - * Settings: Plugin for PokeBot that enables settings features. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.getInt = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, 0); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.getStr = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, ''); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.getBool = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, false); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.setInt = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, parseInt(value)); -}; - -exports.setStr = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, value); -}; - -exports.setBool = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, (value == true)); -}; diff --git a/Plugins/whitelist.js b/Plugins/whitelist.js deleted file mode 100644 index 41b4398..0000000 --- a/Plugins/whitelist.js +++ /dev/null @@ -1,28 +0,0 @@ -/** ************************************** - * - * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.whitelist = async (guildID) => { - await db.set(`whitelist_${guildID}`, true); -}; - -exports.unwhitelist = async (guildID) => { - await db.set(`whitelist_${guildID}`, false); -}; - -exports.isWhitelist = async (guildID) => { - const value = await db.fetch(`whitelist_${guildID}`); - if (value) { - return value; - } - else { - await db.set(`whitelist_${guildID}`, false); - return await db.fetch(`whitelist_${guildID}`); - } -}; diff --git a/test/economy.js b/test/economy.js new file mode 100644 index 0000000..3658ce8 --- /dev/null +++ b/test/economy.js @@ -0,0 +1,40 @@ +/** ************************************** + * + * Economy: Plugin for PokeBot that enables economy features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.get = async (userid) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + return amount; + } + else { + await db.set(`money_${userid}`, 0); + return await db.fetch(`money_${userid}`); + } +}; + +exports.add = async (userid, money) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + await db.set(`money_${userid}`, amount + money); + } + else { + await db.set(`money_${userid}`, money); + } +}; + +exports.subtract = async (userid, money) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + await db.set(`money_${userid}`, amount - money); + } + else { + await db.set(`money_${userid}`, 0 - money); + } +}; diff --git a/test/music.js b/test/music.js new file mode 100644 index 0000000..2dbabda --- /dev/null +++ b/test/music.js @@ -0,0 +1,59 @@ +/** ************************************** + * + * Music: Plugin for PokeBot that interacts with the Lavalink API. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +exports.resolveTrack = async (term, sc) => { + const fetch = require('snekfetch'); + let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); + if (!track.body[0]) { + const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; + track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); + } + return track.body[0]; +}; + +exports.play = async (bot, msg, track) => { + const player = await bot.player.join({ + d: { + guild_id: msg.guild.id, + channel_id: msg.member.voiceChannelID, + }, + host: 'localhost', + }); + if (!bot.queue.has(msg.guild.id)) { + bot.queue.set(msg.guild.id, []); + bot.queue.get(msg.guild.id).push(track); + player.play(bot.queue.get(msg.guild.id).shift()); + player.on('end', () => { + if (bot.queue.get(msg.guild.id)[0]) { + player.play(bot.queue.get(msg.guild.id).shift()); + } + else { + bot.player.leave(msg.guild.id); + } + }); + } + else { + bot.queue.get(msg.guild.id).push(track); + } +}; + +exports.skip = async (bot, msg) => { + const player = await bot.player.join({ + guild: msg.guild.id, + channel: msg.member.voiceChannelID, + host: 'localhost', + }); + if (bot.queue.has(msg.guild.id)) { + player.stop(); + player.emit('end'); + } + else { + return msg.channel.send('There is nothing playing.'); + } +}; diff --git a/test/settings.js b/test/settings.js new file mode 100644 index 0000000..bfa15d5 --- /dev/null +++ b/test/settings.js @@ -0,0 +1,54 @@ +/** ************************************** + * + * Settings: Plugin for PokeBot that enables settings features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.getInt = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, 0); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.getStr = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, ''); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.getBool = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, false); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.setInt = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, parseInt(value)); +}; + +exports.setStr = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, value); +}; + +exports.setBool = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, (value == true)); +}; diff --git a/test/whitelist.js b/test/whitelist.js new file mode 100644 index 0000000..41b4398 --- /dev/null +++ b/test/whitelist.js @@ -0,0 +1,28 @@ +/** ************************************** + * + * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.whitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, true); +}; + +exports.unwhitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, false); +}; + +exports.isWhitelist = async (guildID) => { + const value = await db.fetch(`whitelist_${guildID}`); + if (value) { + return value; + } + else { + await db.set(`whitelist_${guildID}`, false); + return await db.fetch(`whitelist_${guildID}`); + } +}; -- cgit v1.2.3 From 14ad6e923ca71674f7a37b04b3a36bc1030e9d93 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:50:28 -0400 Subject: more stuff --- plugins/economy.js | 40 +++++++++++++++++++++++++++++++++++ plugins/music.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/settings.js | 54 +++++++++++++++++++++++++++++++++++++++++++++++ plugins/whitelist.js | 28 +++++++++++++++++++++++++ test/economy.js | 40 ----------------------------------- test/music.js | 59 ---------------------------------------------------- test/settings.js | 54 ----------------------------------------------- test/whitelist.js | 28 ------------------------- 8 files changed, 181 insertions(+), 181 deletions(-) create mode 100644 plugins/economy.js create mode 100644 plugins/music.js create mode 100644 plugins/settings.js create mode 100644 plugins/whitelist.js delete mode 100644 test/economy.js delete mode 100644 test/music.js delete mode 100644 test/settings.js delete mode 100644 test/whitelist.js diff --git a/plugins/economy.js b/plugins/economy.js new file mode 100644 index 0000000..3658ce8 --- /dev/null +++ b/plugins/economy.js @@ -0,0 +1,40 @@ +/** ************************************** + * + * Economy: Plugin for PokeBot that enables economy features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.get = async (userid) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + return amount; + } + else { + await db.set(`money_${userid}`, 0); + return await db.fetch(`money_${userid}`); + } +}; + +exports.add = async (userid, money) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + await db.set(`money_${userid}`, amount + money); + } + else { + await db.set(`money_${userid}`, money); + } +}; + +exports.subtract = async (userid, money) => { + const amount = await db.fetch(`money_${userid}`); + if (amount) { + await db.set(`money_${userid}`, amount - money); + } + else { + await db.set(`money_${userid}`, 0 - money); + } +}; diff --git a/plugins/music.js b/plugins/music.js new file mode 100644 index 0000000..2dbabda --- /dev/null +++ b/plugins/music.js @@ -0,0 +1,59 @@ +/** ************************************** + * + * Music: Plugin for PokeBot that interacts with the Lavalink API. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +exports.resolveTrack = async (term, sc) => { + const fetch = require('snekfetch'); + let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); + if (!track.body[0]) { + const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; + track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); + } + return track.body[0]; +}; + +exports.play = async (bot, msg, track) => { + const player = await bot.player.join({ + d: { + guild_id: msg.guild.id, + channel_id: msg.member.voiceChannelID, + }, + host: 'localhost', + }); + if (!bot.queue.has(msg.guild.id)) { + bot.queue.set(msg.guild.id, []); + bot.queue.get(msg.guild.id).push(track); + player.play(bot.queue.get(msg.guild.id).shift()); + player.on('end', () => { + if (bot.queue.get(msg.guild.id)[0]) { + player.play(bot.queue.get(msg.guild.id).shift()); + } + else { + bot.player.leave(msg.guild.id); + } + }); + } + else { + bot.queue.get(msg.guild.id).push(track); + } +}; + +exports.skip = async (bot, msg) => { + const player = await bot.player.join({ + guild: msg.guild.id, + channel: msg.member.voiceChannelID, + host: 'localhost', + }); + if (bot.queue.has(msg.guild.id)) { + player.stop(); + player.emit('end'); + } + else { + return msg.channel.send('There is nothing playing.'); + } +}; diff --git a/plugins/settings.js b/plugins/settings.js new file mode 100644 index 0000000..bfa15d5 --- /dev/null +++ b/plugins/settings.js @@ -0,0 +1,54 @@ +/** ************************************** + * + * Settings: Plugin for PokeBot that enables settings features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.getInt = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, 0); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.getStr = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, ''); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.getBool = async (key, guildID) => { + const value = await db.fetch(`settings_${guildID}_${key}`); + if (value) { + return value; + } + else { + await db.set(`settings_${guildID}_${key}`, false); + return await db.fetch(`settings_${guildID}_${key}`); + } +}; + +exports.setInt = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, parseInt(value)); +}; + +exports.setStr = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, value); +}; + +exports.setBool = async (key, value, guildID) => { + await db.set(`settings_${guildID}_${key}`, (value == true)); +}; diff --git a/plugins/whitelist.js b/plugins/whitelist.js new file mode 100644 index 0000000..41b4398 --- /dev/null +++ b/plugins/whitelist.js @@ -0,0 +1,28 @@ +/** ************************************** + * + * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +const db = require('quick.db'); +exports.whitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, true); +}; + +exports.unwhitelist = async (guildID) => { + await db.set(`whitelist_${guildID}`, false); +}; + +exports.isWhitelist = async (guildID) => { + const value = await db.fetch(`whitelist_${guildID}`); + if (value) { + return value; + } + else { + await db.set(`whitelist_${guildID}`, false); + return await db.fetch(`whitelist_${guildID}`); + } +}; diff --git a/test/economy.js b/test/economy.js deleted file mode 100644 index 3658ce8..0000000 --- a/test/economy.js +++ /dev/null @@ -1,40 +0,0 @@ -/** ************************************** - * - * Economy: Plugin for PokeBot that enables economy features. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.get = async (userid) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - return amount; - } - else { - await db.set(`money_${userid}`, 0); - return await db.fetch(`money_${userid}`); - } -}; - -exports.add = async (userid, money) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - await db.set(`money_${userid}`, amount + money); - } - else { - await db.set(`money_${userid}`, money); - } -}; - -exports.subtract = async (userid, money) => { - const amount = await db.fetch(`money_${userid}`); - if (amount) { - await db.set(`money_${userid}`, amount - money); - } - else { - await db.set(`money_${userid}`, 0 - money); - } -}; diff --git a/test/music.js b/test/music.js deleted file mode 100644 index 2dbabda..0000000 --- a/test/music.js +++ /dev/null @@ -1,59 +0,0 @@ -/** ************************************** - * - * Music: Plugin for PokeBot that interacts with the Lavalink API. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.resolveTrack = async (term, sc) => { - const fetch = require('snekfetch'); - let track = await fetch.get('http://localhost:2344/loadtracks?identifier=' + term, { headers: { Authorization: 'iamaverysecurepassword' } }); - if (!track.body[0]) { - const search = 'http://localhost:2344/loadtracks?identifier=' + (sc ? 'scsearch:' : 'ytsearch:') + term; - track = await fetch.get(search, { headers: { Authorization: 'iamaverysecurepassword' } }); - } - return track.body[0]; -}; - -exports.play = async (bot, msg, track) => { - const player = await bot.player.join({ - d: { - guild_id: msg.guild.id, - channel_id: msg.member.voiceChannelID, - }, - host: 'localhost', - }); - if (!bot.queue.has(msg.guild.id)) { - bot.queue.set(msg.guild.id, []); - bot.queue.get(msg.guild.id).push(track); - player.play(bot.queue.get(msg.guild.id).shift()); - player.on('end', () => { - if (bot.queue.get(msg.guild.id)[0]) { - player.play(bot.queue.get(msg.guild.id).shift()); - } - else { - bot.player.leave(msg.guild.id); - } - }); - } - else { - bot.queue.get(msg.guild.id).push(track); - } -}; - -exports.skip = async (bot, msg) => { - const player = await bot.player.join({ - guild: msg.guild.id, - channel: msg.member.voiceChannelID, - host: 'localhost', - }); - if (bot.queue.has(msg.guild.id)) { - player.stop(); - player.emit('end'); - } - else { - return msg.channel.send('There is nothing playing.'); - } -}; diff --git a/test/settings.js b/test/settings.js deleted file mode 100644 index bfa15d5..0000000 --- a/test/settings.js +++ /dev/null @@ -1,54 +0,0 @@ -/** ************************************** - * - * Settings: Plugin for PokeBot that enables settings features. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.getInt = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, 0); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.getStr = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, ''); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.getBool = async (key, guildID) => { - const value = await db.fetch(`settings_${guildID}_${key}`); - if (value) { - return value; - } - else { - await db.set(`settings_${guildID}_${key}`, false); - return await db.fetch(`settings_${guildID}_${key}`); - } -}; - -exports.setInt = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, parseInt(value)); -}; - -exports.setStr = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, value); -}; - -exports.setBool = async (key, value, guildID) => { - await db.set(`settings_${guildID}_${key}`, (value == true)); -}; diff --git a/test/whitelist.js b/test/whitelist.js deleted file mode 100644 index 41b4398..0000000 --- a/test/whitelist.js +++ /dev/null @@ -1,28 +0,0 @@ -/** ************************************** - * - * Whittelist: Plugin for PokeBot that let's the owners whitelist servers. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -const db = require('quick.db'); -exports.whitelist = async (guildID) => { - await db.set(`whitelist_${guildID}`, true); -}; - -exports.unwhitelist = async (guildID) => { - await db.set(`whitelist_${guildID}`, false); -}; - -exports.isWhitelist = async (guildID) => { - const value = await db.fetch(`whitelist_${guildID}`); - if (value) { - return value; - } - else { - await db.set(`whitelist_${guildID}`, false); - return await db.fetch(`whitelist_${guildID}`); - } -}; -- cgit v1.2.3 From 9741a0d662f16b2a24ef57a57328b2061d06e5d7 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:51:43 -0400 Subject: more cleanup --- runbeta.cmd | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 runbeta.cmd diff --git a/runbeta.cmd b/runbeta.cmd deleted file mode 100644 index 82c8938..0000000 --- a/runbeta.cmd +++ /dev/null @@ -1,24 +0,0 @@ -@echo off - -title PokeBot Beta Console - -echo Welcome to the PokeBot Beta Console. -echo If you want to self-host this bot, please continue by executing the following steps: -echo 1. You may need to go into the code and comment out anything that relates to Discord Bot List, as this will cause errors when self-hosting. -echo 2. Create a config.json file and include the token of your bot user so that the bot does not error out when connecting to Discord Servers. -echo 3. You will need to edit this file that you ran, and remove the 'git pull' line. This causes errors as it will try to pull from the PokeBot git. -echo 4. Finally, you must credit the developers (Universe Development Group or PokeWorld Administrators will work fine). -echo -------------------------------------------------------------------------------- -echo To start the bot when you are ready, type in 'Yes'. -set /p start= - -if %start% == Yes goto a - -echo Exiting... -pause -exit - -:a -git pull -node test.js -goto a -- cgit v1.2.3 From 8252c0a76dc252f224014016cc6cdd2189536a10 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Mar 2018 21:55:38 -0400 Subject: even more cleanup --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index dea745d..c22345d 100644 --- a/bot.js +++ b/bot.js @@ -9,7 +9,7 @@ bot.commands = new Discord.Collection(); bot.aliases = new Discord.Collection(); bot.categories = new Discord.Collection(); bot.queue = new Discord.Collection(); -bot.plugins = { music : require('./Plugins/Music.js') , economy : require('./Plugins/Economy.js'), settings : require('./Plugins/settings.js'), whitelist: require('./Plugins/whitelist.js')}; +bot.plugins = { music : require('./plugins/music.js') , economy : require('./plugins/Economy.js'), settings : require('./plugins/settings.js'), whitelist: require('./plugins/whitelist.js')}; cmdLoader(); bot.Raven = require('raven'); -- cgit v1.2.3 From d96bcd385096f3a24f30dbdd47b9a565dc4dc8db Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Sat, 31 Mar 2018 22:00:32 -0400 Subject: Update LICENSE.md --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index d875044..4ddc0a2 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -165,7 +165,7 @@ of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice -"Licensed under Universe" or with a notice of your own +"Licensed under Universe Development Group" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You -- cgit v1.2.3 From fa1efca8c0cea6f67afefc02873ddfd8a0423664 Mon Sep 17 00:00:00 2001 From: Trey <32907415+TheEdgeNK@users.noreply.github.com> Date: Tue, 3 Apr 2018 15:00:12 -0400 Subject: new domain --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 88da587..dd98356 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

- PokeBot + PokeBot


-- cgit v1.2.3 From 168fa2191af0b187894b408f0ee8715526369931 Mon Sep 17 00:00:00 2001 From: Trey <32907415+TheEdgeNK@users.noreply.github.com> Date: Tue, 3 Apr 2018 15:01:17 -0400 Subject: .net, not .com --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd98356..afc285a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@


- PokeBot + PokeBot


-- cgit v1.2.3 From 202ad77ee9a4977c0ead27c59fee7e8a4cb64a6e Mon Sep 17 00:00:00 2001 From: Trey <32907415+TheEdgeNK@users.noreply.github.com> Date: Tue, 3 Apr 2018 15:02:03 -0400 Subject: mmm --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index afc285a..750f2e4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@


- PokeBot + PokeBot


-- cgit v1.2.3 From 25a77ee0dab23409516ce4f87c3b72600d3118f4 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 3 Apr 2018 18:49:13 -0400 Subject: last changes --- commands/Getting Started/start.js | 2 +- commands/Pokemon/join.js | 2 +- events/guildMemberAdd.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/Getting Started/start.js b/commands/Getting Started/start.js index 9da8be7..e24ca70 100644 --- a/commands/Getting Started/start.js +++ b/commands/Getting Started/start.js @@ -15,7 +15,7 @@ exports.run = (bot, msg) => { .setColor(0x00ae86) .setTitle('Getting Started in PokeWorld') .addField('PokeCord', 'First off, we need to get you up and running in PokeCord!\n\nMake 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 followed by the team you want to join. You can join `aqua`, `magma`, and `rocket`. Now, you can start claiming gyms. To do this, run `p:claim` in a gym channel. If no one owns it, the gym will now be yours. However if someone does own it, 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('Teams // Gyms', 'Next, you may join a team using PokeBot. To do this, run the `join` command followed by the team you want to join. You can join `flare` or `skull`. Now, you can start claiming gyms. To do this, run `p:claim` in a gym channel. If no one owns it, the gym will now be yours. However if someone does own it, 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 v1.0') ); diff --git a/commands/Pokemon/join.js b/commands/Pokemon/join.js index 91c6c7e..2187eef 100644 --- a/commands/Pokemon/join.js +++ b/commands/Pokemon/join.js @@ -58,5 +58,5 @@ exports.conf = { exports.help = { name: 'join', description: 'Join one of the teams!', - usage: '', + usage: '', }; diff --git a/events/guildMemberAdd.js b/events/guildMemberAdd.js index 63081b1..11c0c18 100644 --- a/events/guildMemberAdd.js +++ b/events/guildMemberAdd.js @@ -33,7 +33,7 @@ module.exports = async (bot, member) => { bot.channels.get('426829685289123850').setName('Member Count: ' + (member.guild.memberCount - botCount)); bot.channels.get('426829838238613504').setName('Bot Count: ' + botCount); bot.channels.get('417100669980508160').send(`Welcome to the server **${member.user.tag}**! Make sure to read the rules! We now have ${member.guild.memberCount} members.`); - bot.channels.get('417088992329334794').send('Welcome to the server <@' + member.id + '>. Be sure to join a team: `p:join `'); + bot.channels.get('417088992329334794').send('Welcome to the server <@' + member.id + '>. Be sure to join a team: `p:join `. Also, make sure to read our introduction: `p:start`.'); const role = member.guild.roles.find('name', 'Trainers'); member.addRole(role); }; -- cgit v1.2.3 From d0879c5f8b04d678318ef6138734689a76fc4269 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 3 Apr 2018 18:50:16 -0400 Subject: jk, now last fixes --- commands/Getting Started/help.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/Getting Started/help.js b/commands/Getting Started/help.js index 94a2128..1f6cf44 100644 --- a/commands/Getting Started/help.js +++ b/commands/Getting Started/help.js @@ -14,7 +14,7 @@ exports.run = (bot, msg, args) => { embed .setColor (0x36393e) .setTitle('PokeBot Command List') - .setDescription('Full help contents can be found at http://www.digitalregion.ml/pokeworld/pokebot/commands/') + .setDescription('Full help contents can be found at http://universedevgroup.net/pokeworld/pokebot/commands/') .setFooter('PokeBot v1.0'); const categories = Array.from(bot.categories.keys()); -- cgit v1.2.3 From 8186a6af44384b8782f72a4dd7dd3f2d51188bfe Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 3 Apr 2018 22:02:33 -0400 Subject: change in repo --- README.md | 2 +- commands/Getting Started/contribute.js | 2 +- commands/Utility/git.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 750f2e4..6d07b76 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

PokeWorld Discord - GitHub commits (since latest release) + GitHub commits (since latest release) Discord Bot List

diff --git a/commands/Getting Started/contribute.js b/commands/Getting Started/contribute.js index 2530058..15204fd 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/PokeWorld/PokeBot.'); + msg.channel.send('Want to help the bot? Here you go: https://github.com/UniverseDevGroup/PokeBot.'); }; exports.conf = { diff --git a/commands/Utility/git.js b/commands/Utility/git.js index f5113a2..67374bb 100644 --- a/commands/Utility/git.js +++ b/commands/Utility/git.js @@ -8,7 +8,7 @@ * *************************************/ exports.run = (bot, msg) => { - msg.channel.send('The GitHub page for PokeBot can be found here: https://github.com/PokeWorld/PokeBot'); + msg.channel.send('The GitHub page for PokeBot can be found here: https://github.com/UniverseDevGroup/PokeBot.'); }; exports.conf = { -- cgit v1.2.3 From 777355db9cd0121fc41e554906ebaca049fe66ad Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 5 Apr 2018 19:17:23 -0400 Subject: cleanup --- commands/Fun/getcredits.js | 17 +++++++++-------- commands/Moderation/ban.js | 10 +++++++--- commands/Moderation/interrogate.js | 2 +- commands/Moderation/jail.js | 2 +- commands/Moderation/kick.js | 2 +- commands/Moderation/lswarns.js | 4 ++-- commands/Moderation/softban.js | 16 +++++++++++++--- commands/Owners Only/modifycredits.js | 2 +- 8 files changed, 35 insertions(+), 20 deletions(-) diff --git a/commands/Fun/getcredits.js b/commands/Fun/getcredits.js index 1d8b79b..66ba282 100644 --- a/commands/Fun/getcredits.js +++ b/commands/Fun/getcredits.js @@ -6,21 +6,22 @@ * Licensed under the Open Software License version 3.0 * * *************************************/ -const commandCooldown = new Set(); +const cooldown = new Set(); exports.run = (bot, msg) => { - if (commandCooldown.has(msg.author.id)) return msg.reply('You have claimed credits too recently'); + if (cooldown.has(msg.author.id)) return msg.reply('You have claimed credits too recently'); if (bot.dbl.hasVoted(msg.author.id)) { bot.plugins.economy.add(msg.author.id, 100); - return msg.reply('Since you upvoted the bot, here is 100 credits.'); + msg.reply('Since you upvoted the bot, here is 100 credits.'); } - bot.plugins.economy.add(msg.author.id, 25); - msg.reply('Added 25 credits.'); - - commandCooldown.add(msg.author.id); + else { + bot.plugins.economy.add(msg.author.id, 25); + msg.reply('Added 25 credits.'); + } + cooldown.add(msg.author.id); setTimeout(() => { - commandCooldown.delete(msg.author.id); + cooldown.delete(msg.author.id); }, 3600000); }; diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index 545618c..b9ffa4d 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -12,12 +12,16 @@ exports.run = async (bot, msg, args) => { if (!msg.guild.member(bot.user).hasPermission('BAN_MEMBERS')) return msg.reply('I don\'t have permission to ban members.'); const member = msg.mentions.members.first(); - if (!member) return await msg.reply('Who am I gonna ban?'); + if (!member) return await msg.reply('Who am I gonna ban? (Remember to @mention them)'); const reason = args.join(' ').slice(3 + member.user.id.length); await member.ban({ days: 7, reason: msg.author.tag + (reason ? ': ' + reason : '') }) - .catch(err => { msg.reply('There was an error.'); console.error(err.stack);}); - msg.channel.send(`Alright, I banned **${member.user.tag}**${(reason ? ` for the reason **${reason}**.` : '.')}`); + .catch(err => { + msg.reply('There was an error.'); return console.error(err.stack); + }) + .then(() => { + msg.channel.send(`Alright, I banned **${member.user.tag}**${(reason ? ` for the reason **${reason}**.` : '.')}`); + }); const { RichEmbed } = require('discord.js'); try { diff --git a/commands/Moderation/interrogate.js b/commands/Moderation/interrogate.js index a8fc250..821c93a 100644 --- a/commands/Moderation/interrogate.js +++ b/commands/Moderation/interrogate.js @@ -14,7 +14,7 @@ exports.run = async (bot, msg) => { if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot interrogate anyone.'); const member = msg.mentions.members.first(); - if (!member) return await msg.reply('Who do I interrogate?'); + if (!member) return await msg.reply('Who shall I interrogate? (Remember to @mention them)'); member.addRole(msg.guild.roles.find('name', 'Interrogation')); diff --git a/commands/Moderation/jail.js b/commands/Moderation/jail.js index 3388663..2dc50cf 100644 --- a/commands/Moderation/jail.js +++ b/commands/Moderation/jail.js @@ -14,7 +14,7 @@ exports.run = async (bot, msg) => { if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot put anyone in jail.'); const member = msg.mentions.members.first(); - if (!member) return await msg.reply('Who do I put in jail?'); + if (!member) return await msg.reply('Who do I put in jail? (Remember to @mention them)'); member.addRole(msg.guild.roles.find('name', 'Jail')); diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index 3a8c597..174e867 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -12,7 +12,7 @@ exports.run = async (bot, msg, args) => { if (!msg.guild.member(bot.user).hasPermission('KICK_MEMBERS')) return msg.reply('I don\'t have permission to kick members.'); const member = msg.mentions.members.first(); - if (!member) return await msg.reply('Who am I gonna kick?'); + if (!member) return await msg.reply('Who am I gonna kick? (Remember to @mention them)'); const reason = args.join(' ').slice(3 + member.user.id.length); await member.kick(msg.author.tag + ': ' + (reason ? ': ' + reason : '')) diff --git a/commands/Moderation/lswarns.js b/commands/Moderation/lswarns.js index 0a165b3..732184d 100644 --- a/commands/Moderation/lswarns.js +++ b/commands/Moderation/lswarns.js @@ -12,11 +12,11 @@ exports.run = async (bot, msg) => { const { RichEmbed } = require('discord.js'); const warns = await db.fetch(`warns_${msg.guild.id}_${msg.author.id}`); - if (!warns) return await msg.reply('Yay! You have no warns.'); + if (!warns) return await msg.reply('You don\'t have any warnings in this server.'); const embed = new RichEmbed() .setTitle('Warns'); for (let i = 0; i < warns.count; i++) { - embed.addField('Warning #' + i+1, warns.reasons[i]); + embed.addField('Warning #' + i + 1, warns.reasons[i]); } msg.channel.send({ embed }); }; diff --git a/commands/Moderation/softban.js b/commands/Moderation/softban.js index a97f8a6..dd5b4a9 100644 --- a/commands/Moderation/softban.js +++ b/commands/Moderation/softban.js @@ -16,9 +16,19 @@ exports.run = async (bot, msg, args) => { const reason = args.join(' ').slice(3 + member.user.id.length); await member.ban({ days: 7, reason: msg.author.tag + ': ' + (reason ? reason : '') }) - .catch(err => { msg.reply('There was an error.'); console.error(err.stack);}); - await msg.guild.unban(member.user.id).catch(msg.reply('There was an error.')); - msg.channel.send(`Alright, I softbanned **${member.user.tag}**${(reason ? ` for the reason **${reason}**.` : '.')}`); + .catch(err => { + msg.reply('There was an error.'); + return console.error(err.stack); + }) + .then(() => { + msg.channel.send(`Alright, I softbanned **${member.user.tag}**${(reason ? ` for the reason **${reason}**.` : '.')}`); + }); + await msg.guild.unban(member.user.id) + .catch(err => { + msg.reply('There was an error.'); + return console.error(err.stack); + }); + const { RichEmbed } = require('discord.js'); try { const embed = new RichEmbed() diff --git a/commands/Owners Only/modifycredits.js b/commands/Owners Only/modifycredits.js index 6401d85..050d74d 100644 --- a/commands/Owners Only/modifycredits.js +++ b/commands/Owners Only/modifycredits.js @@ -17,7 +17,7 @@ exports.run = async (bot, msg) => { user = msg.mentions.users.first(); } - var oldbal = bot.plugins.economy.get(user.id); + const oldbal = bot.plugins.economy.get(user.id); bot.plugins.economy.subtract(user.id, oldbal); -- cgit v1.2.3 From b41df418dcaa114a173b0eec234b4b71f91b7318 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 5 Apr 2018 20:18:43 -0400 Subject: gyms system --- bot.js | 6 +++- commands/Pokemon/claim.js | 87 ++++++++++++++++++++++------------------------- plugins/gyms.js | 34 ++++++++++++++++++ 3 files changed, 80 insertions(+), 47 deletions(-) create mode 100644 plugins/gyms.js diff --git a/bot.js b/bot.js index c22345d..4962977 100644 --- a/bot.js +++ b/bot.js @@ -9,7 +9,11 @@ bot.commands = new Discord.Collection(); bot.aliases = new Discord.Collection(); bot.categories = new Discord.Collection(); bot.queue = new Discord.Collection(); -bot.plugins = { music : require('./plugins/music.js') , economy : require('./plugins/Economy.js'), settings : require('./plugins/settings.js'), whitelist: require('./plugins/whitelist.js')}; +bot.plugins = { music : require('./plugins/music.js') , + economy : require('./plugins/Economy.js'), + settings : require('./plugins/settings.js'), + whitelist: require('./plugins/whitelist.js'), + gyms : require('./plugins/gyms.js')}; cmdLoader(); bot.Raven = require('raven'); diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index 9bba3ec..40edf49 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -10,56 +10,51 @@ 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*') { - let team; - if (msg.member.roles.find('name', 'Skull')) team = 'Skull'; - if (msg.member.roles.find('name', 'Flare')) team = 'Flare'; + + if (bot.plugins.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'); - msg.channel.setTopic('Current Owner: ' + msg.author.id + '/' + msg.author.tag + '/' + team); - } - else { - let team; - if (msg.member.roles.find('name', 'Skull')) team = 'Skull'; - if (msg.member.roles.find('name', 'Flare')) team = 'Flare'; - if (!team) return msg.reply('You have to join a team before you can claim a gym.'); - const owner = msg.channel.topic.slice(15).substring(0, 18); - 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; - let field = mess.embeds[0]; - if (!field) return; - field = field.description; - if (!field) return; - field = field.split('\n')[0]; - if (!field) return; - field = field.split(' ')[0]; - if (field != undefined) { - const user = msg.guild.members.find(member => member.user.username === field); - if (user != undefined) { - if (user.id == owner) { - await msg.channel.send('The owner has not been defeated!'); - bot.gyms.set(msg.channel.id, null); - bot.removeListener('message', func); - } - if (user.id == msg.author.id) { - await msg.channel.send('The owner has been defeated! Transferring gym!'); - let recipientTeam; - if (msg.member.roles.find('name', 'Skull')) recipientTeam = 'Skull'; - if (msg.member.roles.find('name', 'Flare')) recipientTeam = 'Flare'; - await msg.channel.setTopic('Current Owner: ' + msg.member.id + '/' + msg.author.tag + '/' + recipientTeam); - bot.gyms.set(msg.channel.id, null); - bot.removeListener('message', func); - } - } - } - }; - bot.gyms.set(msg.channel.id, func); - bot.on('message', func); + 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.plguins.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!'); + bot.gyms.getTeam(mess.member); + await msg.channel.setTopic(bot.plugins.gyms.getGymString(bot, mess.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 = { diff --git a/plugins/gyms.js b/plugins/gyms.js new file mode 100644 index 0000000..d4b1afe --- /dev/null +++ b/plugins/gyms.js @@ -0,0 +1,34 @@ +/** ************************************** + * + * Gyms: Plugin for PokeBot that enables gym features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +exports.isTeam = (member) => { + let team; + if (member.roles.find('name', 'Skull')) team = 'Skull'; + if (member.roles.find('name', 'Flare')) team = 'Flare'; + return team ? true : false; +}; + +exports.getTeam = (member) => { + let team; + if (member.roles.find('name', 'Skull')) team = 'Skull'; + if (member.roles.find('name', 'Flare')) team = 'Flare'; + return team; +}; + +exports.getOwnerId = (title) => { + return title.slice(15).substring(0, 18); +}; + +exports.getGymString = (bot, member) => { + return 'Current Owner: ' + member.id + '/' + member.user.tag + '/' + bot.plugins.gyms.getTeam(member); +}; + +exports.isOwned = (title) => { + return title != 'Current Owner: *none*'; +}; -- cgit v1.2.3 From 878d7d60331e5fa7f0bd54b4dba6e9427be82f0c Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 5 Apr 2018 20:25:05 -0400 Subject: more stuff --- commands/Pokemon/claim.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index 40edf49..00a9188 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -13,7 +13,7 @@ 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 (bot.plugins.isOwned(msg.channel.topic)) { + 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'); -- cgit v1.2.3 From 0e5738a216d7eceb7655039d5320a922aec270e2 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 5 Apr 2018 20:26:21 -0400 Subject: bugs --- plugins/gyms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gyms.js b/plugins/gyms.js index d4b1afe..3f1ce29 100644 --- a/plugins/gyms.js +++ b/plugins/gyms.js @@ -30,5 +30,5 @@ exports.getGymString = (bot, member) => { }; exports.isOwned = (title) => { - return title != 'Current Owner: *none*'; + return title == 'Current Owner: *none*'; }; -- cgit v1.2.3 From addf70683d681cd357133f93218b7a9b7a99fbe3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 5 Apr 2018 20:31:07 -0400 Subject: bugs --- commands/Pokemon/claim.js | 2 +- plugins/gyms.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index 00a9188..f3d836e 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -13,7 +13,7 @@ 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 (bot.plugins.gyms.isOwned(msg.channel.topic)) { + 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'); diff --git a/plugins/gyms.js b/plugins/gyms.js index 3f1ce29..d4b1afe 100644 --- a/plugins/gyms.js +++ b/plugins/gyms.js @@ -30,5 +30,5 @@ exports.getGymString = (bot, member) => { }; exports.isOwned = (title) => { - return title == 'Current Owner: *none*'; + return title != 'Current Owner: *none*'; }; -- cgit v1.2.3 From a7efea09713e1c545412b56538dfe1511ab9afee Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 5 Apr 2018 20:32:27 -0400 Subject: typo --- commands/Pokemon/claim.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index f3d836e..c468025 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -23,7 +23,7 @@ exports.run = async (bot, msg) => { 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.plguins.gyms.getOwnerId(msg.channel.topic); + 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.'); -- cgit v1.2.3 From e39d116465334ce84ee06267e8defb6007dddf22 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 5 Apr 2018 20:35:37 -0400 Subject: bugs --- commands/Pokemon/claim.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index c468025..e76c2a7 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -46,8 +46,7 @@ exports.run = async (bot, msg) => { } else if (user.id == msg.author.id) { await msg.channel.send('The owner has been defeated! Transferring gym!'); - bot.gyms.getTeam(mess.member); - await msg.channel.setTopic(bot.plugins.gyms.getGymString(bot, mess.member)); + await msg.channel.setTopic(bot.plugins.gyms.getGymString(bot, msg.member)); } else { return; } bot.gyms.set(msg.channel.id, null); -- cgit v1.2.3