Moderation Update
This commit is contained in:
15
discord-bot/events/guildDelete.js
Normal file
15
discord-bot/events/guildDelete.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const api = require('../api');
|
||||
|
||||
module.exports = {
|
||||
name: 'guildDelete',
|
||||
execute: async (guild, client) => {
|
||||
console.log(`Bot left guild: ${guild.name} (${guild.id})`);
|
||||
|
||||
try {
|
||||
// Publish SSE event for bot status change
|
||||
await api.publishEvent('*', 'botStatusUpdate', { guildId: guild.id, isBotInServer: false });
|
||||
} catch (error) {
|
||||
console.error('Error publishing bot leave event:', error);
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user