From 1559e0f70b32a524024a099723a79f8fadaff266 Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Sun, 12 Nov 2023 22:51:08 +0300 Subject: [PATCH] log commands --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.ts b/src/index.ts index fd08898..95fb7c4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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);