mirror of
https://github.com/nx-bat/pet-the-pond.git
synced 2026-09-22 10:29:11 -04:00
some logging for me.
This commit is contained in:
+10
-13
@@ -9,21 +9,18 @@ class ReadyEvent extends Event<CommandClient> {
|
||||
await context.deployCommands();
|
||||
context.setCustomActivity('Tracking your petting!');
|
||||
|
||||
context.on('error', async (error: string | Error, shard?: number | undefined) => {
|
||||
const _err = error as Error;
|
||||
await context.createMessage(process.env.LOGGING_CHANNEL, {
|
||||
embed: {
|
||||
color: 0x55ff55,
|
||||
|
||||
await context.createMessage('1548676420136599624', {
|
||||
embed: {
|
||||
color: 0xff5555,
|
||||
title: 'Bot Ready',
|
||||
|
||||
fields: [
|
||||
{ name: 'Message', value: _err.message, inline: false },
|
||||
{ name: 'Cause', value: `${_err.cause ?? 'N/A'}`, inline: false },
|
||||
{ name: 'Stack', value: `${_err.stack ?? 'N/A'}`, inline: false }
|
||||
]
|
||||
}
|
||||
});
|
||||
})
|
||||
fields: [
|
||||
{ name: 'Guilds', value: `${context.guilds.size}`, inline: true },
|
||||
{ name: 'Shards', value: `${context.shards.size}`, inline: true },
|
||||
]
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user