From f18f5fff1fd0b8336df464d6e6f62efbc29aa618 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sat, 29 Mar 2025 11:42:40 -0400 Subject: Added analytics; try/catch for ready event --- bot/src/events/InteractionCreate.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bot/src/events/InteractionCreate.js') diff --git a/bot/src/events/InteractionCreate.js b/bot/src/events/InteractionCreate.js index ac979d2..777ce39 100644 --- a/bot/src/events/InteractionCreate.js +++ b/bot/src/events/InteractionCreate.js @@ -1,4 +1,5 @@ import { Events, MessageFlags } from 'discord.js'; +import { Analytics } from '../plugins/analytics.js'; function error(e) { return `Something went wrong. [Submit an issue at the AleeBot repository.]()\nMessage:\n\`\`\`js\n${e.stack}\`\`\``; @@ -14,6 +15,8 @@ export default { if (!command) return; try { + console.log(`[i] ${interaction.user.username} has executed ${command.data.name}`); + await Analytics(command, interaction); await command.execute(interaction); } catch (e) { console.error(e); -- cgit v1.2.3