const api = require('../api'); module.exports = { name: 'inviteDelete', async execute(invite) { try { const guildId = invite.guild.id; const code = invite.code; // Remove from database await api.deleteInvite(guildId, code); // Publish SSE event for real-time frontend updates const bot = require('..'); if (bot && bot.publishEvent) { bot.publishEvent(guildId, 'inviteDeleted', { code: code }); } } catch (error) { console.error('Error handling inviteDelete:', error); } } };