HUGE cleanup

This commit is contained in:
Unknown 2018-03-31 21:45:52 -04:00
parent 3941f5cbfe
commit ac6fc04fcf
64 changed files with 91 additions and 804 deletions

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

0
cd
View file

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/
const commandCooldown = new Set();

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* TLicensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* 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: '<channelID>',
};
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: '<channelID>',
};

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* 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.',
};
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.',
};

View file

@ -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 <http://www.gnu.org/licenses/>.
* 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.',
};

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

View file

@ -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 <http://www.gnu.org/licenses/>.
* Licensed under the Open Software License version 3.0
*
* *************************************/

0
ls
View file

View file

0
npm
View file

72
test.js
View file

@ -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');
});