|
@ -69,6 +69,7 @@ client.on("guildCreate", async guild => { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
client.on("guildDelete", async guild => { |
|
|
client.on("guildDelete", async guild => { |
|
|
|
|
|
// If the bot is removed from a guild or the guild is deleted, the bot deletes the old data
|
|
|
collection.deleteOne({ "guild_id": `${guild.id}` }, (error, result) => { |
|
|
collection.deleteOne({ "guild_id": `${guild.id}` }, (error, result) => { |
|
|
if (error) { |
|
|
if (error) { |
|
|
console.error; |
|
|
console.error; |
|
|