log commands

This commit is contained in:
Jill 2023-11-12 22:51:08 +03:00
parent 77f6164e36
commit 1559e0f70b
Signed by: oat
GPG Key ID: 33489AA58A955108
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,7 @@ async function init() {
} catch (err) {
log.error('error: network hardware broken?', err);
log.error(`${chalk.bold('emergency mode could not be established.')} shutting down.`);
process.exit(1);
}
}
@ -58,6 +59,8 @@ bot.on(Events.InteractionCreate, async (interaction) => {
if (interaction.isCommand()) {
const command = interaction.client.commands.get(interaction.commandName);
if (!command) return;
log.nonsense(`/${command.data.name} ${interaction.options.data.map(opt => `${opt.name}:${opt.value || opt.user?.id || opt.role?.id || opt.message?.id || opt.member || opt.channel?.id || '?'}`)}`);
try {
await command.execute(interaction, interaction.member);