aboutsummaryrefslogtreecommitdiff
path: root/events
diff options
context:
space:
mode:
authorUnknown <jtsshieh@outlook.com>2018-03-02 16:15:35 -0500
committerUnknown <jtsshieh@outlook.com>2018-03-02 16:15:35 -0500
commitc038770139edc75eb067096688581baf98f8c00f (patch)
tree71b4c81c44037d1ff35b70b669260234ff054e20 /events
parent77ceb3c6853e8c2b7ff0121bdcc17bf2148783d0 (diff)
downloadPokeBot-c038770139edc75eb067096688581baf98f8c00f.tar.gz
PokeBot-c038770139edc75eb067096688581baf98f8c00f.tar.bz2
PokeBot-c038770139edc75eb067096688581baf98f8c00f.zip
documenting
Diffstat (limited to 'events')
-rw-r--r--events/channelCreate.js20
-rw-r--r--events/guildMemberAdd.js20
-rw-r--r--events/guildMemberRemove.js20
-rw-r--r--events/message.js20
-rw-r--r--events/messageDelete.js20
-rw-r--r--events/messageDeleteBulk.js20
-rw-r--r--events/messageUpdate.js20
-rw-r--r--events/ready.js20
8 files changed, 160 insertions, 0 deletions
diff --git a/events/channelCreate.js b/events/channelCreate.js
index 4319e3a..9dce088 100644
--- a/events/channelCreate.js
+++ b/events/channelCreate.js
@@ -1,3 +1,23 @@
+/** **************************************
+ *
+ * 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/>.
+ *
+ * *************************************/
+
module.exports = (bot, channel) => {
if (channel.name.startsWith('gym-')) {
channel.setTopic('Current Owner: *none*');
diff --git a/events/guildMemberAdd.js b/events/guildMemberAdd.js
index 4eb21c7..2c3d21f 100644
--- a/events/guildMemberAdd.js
+++ b/events/guildMemberAdd.js
@@ -1,3 +1,23 @@
+/** **************************************
+ *
+ * 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/>.
+ *
+ * *************************************/
+
module.exports = (bot, member) => {
const { RichEmbed } = require('discord.js');
bot.channels.find('name', 'welcome').send(`Welcome to the server **${member.user.tag}**! Make sure to read the rules! We now have ${member.guild.memberCount} members.`);
diff --git a/events/guildMemberRemove.js b/events/guildMemberRemove.js
index e346d3f..2fc1760 100644
--- a/events/guildMemberRemove.js
+++ b/events/guildMemberRemove.js
@@ -1,3 +1,23 @@
+/** **************************************
+ *
+ * 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/>.
+ *
+ * *************************************/
+
module.exports = (bot, member) => {
const { RichEmbed } = require('discord.js');
bot.channels.find('name', 'welcome').send(`**${member.user.tag}** just left. We now have ${member.guild.memberCount} members left. Aww man...`);
diff --git a/events/message.js b/events/message.js
index afd9d20..dfe7c72 100644
--- a/events/message.js
+++ b/events/message.js
@@ -1,3 +1,23 @@
+/** **************************************
+ *
+ * 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/>.
+ *
+ * *************************************/
+
module.exports = (bot, msg) => {
parseCommand(bot, msg);
diff --git a/events/messageDelete.js b/events/messageDelete.js
index 23c42de..627b2e0 100644
--- a/events/messageDelete.js
+++ b/events/messageDelete.js
@@ -1,3 +1,23 @@
+/** **************************************
+ *
+ * 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/>.
+ *
+ * *************************************/
+
module.exports = (bot, msg) => {
const { RichEmbed } = require('discord.js');
if(!msg.content) return;
diff --git a/events/messageDeleteBulk.js b/events/messageDeleteBulk.js
index 6d2de40..1a5d1d1 100644
--- a/events/messageDeleteBulk.js
+++ b/events/messageDeleteBulk.js
@@ -1,3 +1,23 @@
+/** **************************************
+ *
+ * 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/>.
+ *
+ * *************************************/
+
module.exports = (bot, msgs) => {
const { RichEmbed } = require('discord.js');
try {
diff --git a/events/messageUpdate.js b/events/messageUpdate.js
index 8be3f60..59133cb 100644
--- a/events/messageUpdate.js
+++ b/events/messageUpdate.js
@@ -1,3 +1,23 @@
+/** **************************************
+ *
+ * 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/>.
+ *
+ * *************************************/
+
module.exports = (bot, oldMsg, newMsg) => {
const { RichEmbed } = require('discord.js');
if (oldMsg.content == newMsg.content) return;
diff --git a/events/ready.js b/events/ready.js
index 5115690..71c037a 100644
--- a/events/ready.js
+++ b/events/ready.js
@@ -1,3 +1,23 @@
+/** **************************************
+ *
+ * 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/>.
+ *
+ * *************************************/
+
module.exports = (bot) => {
console.log('PokeBot has finished loading.');
bot.setInterval(function() {