mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 06:28:54 +00:00
22 lines
524 B
TypeScript
22 lines
524 B
TypeScript
import { Events } from 'discord.js';
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
import loggerModule from '../../services/logger';
|
|
import { Logger } from 'pino';
|
|
|
|
module.exports = {
|
|
name: Events.Error,
|
|
isDebug: false,
|
|
once: false,
|
|
execute: async (error: Error) => {
|
|
const executionId: string = uuidv4();
|
|
const logger: Logger = loggerModule.child({
|
|
module: 'event',
|
|
name: 'clientError',
|
|
executionId: executionId
|
|
});
|
|
|
|
logger.error(error);
|
|
}
|
|
};
|