From dea2f8fcde7b1b19943345290cd0a2e55260b73f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sat, 8 Sep 2018 23:34:08 +0200 Subject: [PATCH] add messages when bot get kicked --- index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/index.js b/index.js index 53c4ca65..df5a8a36 100644 --- a/index.js +++ b/index.js @@ -44,6 +44,19 @@ client.registry channel.send({ embed: exampleEmbed }); }) + client.on("guildDelte", guild => { + console.log(`***BOT KICKED***\n${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}\n***BOT KICKED***`); + const channel = client.channels.get('487766113292124160'); + const exampleEmbed = { + color: 0x0099ff, + title: 'Someone kicked the bot :(', + description: `${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}`, + timestamp: new Date(), + }; + + channel.send({ embed: exampleEmbed }); + }) + // Auto respond to messages // client.on("message", (message) => { // if(responseObject[message.content]) {