Moved all handlers into one file

This commit is contained in:
2023-11-21 13:21:40 +01:00
parent 926d1f01e8
commit 5962609e39
15 changed files with 52 additions and 133 deletions

View File

@@ -0,0 +1,22 @@
module.exports = {
name: "logBtnsCmds",
description: "Logs all button and command interactions",
type: "event",
event: "interactionCreate",
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
execute(interaction) {
if (interaction.isCommand()) {
console.log(interaction.user.username + "#" +
interaction.user.discriminator + " ran " +
interaction.commandName
);
} else if (interaction.isButton()) {
console.log(interaction.user.username + "#" +
interaction.user.discriminator + " clicked " +
interaction.customId
);
}
}
}