mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 22:16:13 +00:00
25 lines
701 B
TypeScript
25 lines
701 B
TypeScript
import { Events, Guild } from 'discord.js';
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
import loggerModule from '../../services/logger';
|
|
import { Logger } from 'pino';
|
|
|
|
module.exports = {
|
|
name: Events.GuildCreate,
|
|
isDebug: false,
|
|
once: false,
|
|
execute: async (guild: Guild) => {
|
|
const executionId: string = uuidv4();
|
|
const logger: Logger = loggerModule.child({
|
|
source: 'guildCreate.js',
|
|
module: 'event',
|
|
name: 'guildCreate',
|
|
executionId: executionId,
|
|
shardId: guild.shardId,
|
|
guildId: guild.id
|
|
});
|
|
|
|
logger.info(`Added to guild '${guild.id}' with ${guild.memberCount} members.`);
|
|
}
|
|
};
|