/**
* interactionCreate event of the discord bot, trigerred when a new interaction is created
*/
module.exports = async (client, interaction) => {
if (!interaction.isCommand()) return
const command = client.slashCommands.get(interaction.commandName) // ths can be used to check if interaction is a commaand or not
try {
console.log("interaction created")
} catch (err) {
client.util.errorPrint(err, { description: `command error :: ${interaction.commandName} | ${interaction.guild.name} | ${interaction.channel.name} | ${interaction.user.tag}` })
}
}
discord js interaction create event
This code will log when an interaction is created.
Shortcut: discord.events.interactionCreate
0 Comments
Add Comment
Log in to add a comment