aboutsummaryrefslogtreecommitdiff
path: root/bot/src/events/InteractionCreate.js
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-29 11:42:40 -0400
committerAndrew Lee <andrew@alee14.me>2025-03-29 11:42:40 -0400
commitf18f5fff1fd0b8336df464d6e6f62efbc29aa618 (patch)
treecc23d2aa33ccb9dcd67f6bda811e5f32b0edc766 /bot/src/events/InteractionCreate.js
parent879c2a05c86682564f1f68aa234fd8e5298e95f6 (diff)
downloadAleeBot-f18f5fff1fd0b8336df464d6e6f62efbc29aa618.tar.gz
AleeBot-f18f5fff1fd0b8336df464d6e6f62efbc29aa618.tar.bz2
AleeBot-f18f5fff1fd0b8336df464d6e6f62efbc29aa618.zip
Added analytics; try/catch for ready event
Diffstat (limited to 'bot/src/events/InteractionCreate.js')
-rw-r--r--bot/src/events/InteractionCreate.js3
1 files changed, 3 insertions, 0 deletions
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.](<https://github.com/Alee14/AleeBot/issues>)\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);