Added logging of subcommands as well

This commit is contained in:
2023-12-05 14:30:37 +01:00
parent 9f5280d902
commit b0732bdaab

View File

@@ -8,10 +8,16 @@ module.exports = {
execute(interaction) { execute(interaction) {
if (interaction.isCommand()) { if (interaction.isCommand()) {
console.log(interaction.user.username + "#" + try {
interaction.user.discriminator + " ran " + console.log(interaction.user.username + " ran " +
interaction.commandName interaction.commandName + " " +
) interaction.options.getSubcommand()
)
} catch {
console.log(interaction.user.username + " ran " +
interaction.commandName
)
}
} else if (interaction.isButton()) { } else if (interaction.isButton()) {
console.log(interaction.user.username + "#" + console.log(interaction.user.username + "#" +
interaction.user.discriminator + " clicked " + interaction.user.discriminator + " clicked " +