From e6f9453b475fe8a861f22ed2089e02c7264822cf Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Tue, 18 Sep 2018 21:30:00 +0200 Subject: [PATCH] Added event when people add bot forgot to add it before whoops --- events/guildCreate.js | 12 ++++++++++++ events/guildDelete.js | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 events/guildCreate.js create mode 100644 events/guildDelete.js diff --git a/events/guildCreate.js b/events/guildCreate.js new file mode 100644 index 00000000..d0c5f1e4 --- /dev/null +++ b/events/guildCreate.js @@ -0,0 +1,12 @@ +module.exports = (client) => { + console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}`); + const channel = client.channels.get(statsChannel); + const addEmbed = { + color: 0x008000, + title: 'Someone added the bot! :D YAY', + description: `${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}`, + timestamp: new Date(), + }; + + channel.send({ embed: addEmbed }); +}; \ No newline at end of file diff --git a/events/guildDelete.js b/events/guildDelete.js new file mode 100644 index 00000000..254419fb --- /dev/null +++ b/events/guildDelete.js @@ -0,0 +1,12 @@ +module.exports = (client) => { + console.log(`***BOT KICKED***\n${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}\n***BOT KICKED***`); + const channel = client.channels.get(statsChannel); + const kickEmbed = { + color: 0xFF0000, + title: 'Someone removed the bot :(', + description: `${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}`, + timestamp: new Date(), + }; + + channel.send({ embed: kickEmbed }); +}; \ No newline at end of file