mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
23 lines
688 B
TypeScript
23 lines
688 B
TypeScript
import { Events, Guild } from 'discord.js';
|
|
import { randomUUID as uuidv4 } from 'node:crypto';
|
|
import { Logger } from 'pino';
|
|
import loggerModule from '../../common/services/logger';
|
|
|
|
module.exports = {
|
|
name: Events.GuildDelete,
|
|
isDebug: false,
|
|
once: false,
|
|
execute: async (guild: Guild) => {
|
|
const executionId: string = uuidv4();
|
|
const logger: Logger = loggerModule.child({
|
|
module: 'event',
|
|
name: 'guildDelete',
|
|
executionId: executionId,
|
|
shardId: guild.shardId,
|
|
guildId: guild.id
|
|
});
|
|
|
|
logger.info(`Removed from guild '${guild.id}' with ${guild.memberCount} members.`);
|
|
}
|
|
};
|