[Snyk] Upgrade discord.js from 14.16.3 to 14.17.3 (#155)

This commit is contained in:
Jonathan Smoley
2025-01-31 16:23:31 -08:00
committed by GitHub
parent 2a39e20fee
commit 5b542aca1a
23 changed files with 324 additions and 316 deletions

View File

@@ -6,14 +6,15 @@ import commands from '../commands/index.js'
* @param interaction the interaction received from the server
*/
export default event(Events.InteractionCreate, async ({ log, client }, interaction) => {
if (!interaction.isCommand() || !interaction.isChatInputCommand()) return
log(`Interaction called \'${interaction.commandName}\' from ${interaction.user.tag}.`)
if (!interaction.isCommand() || !interaction.isChatInputCommand()) return
// ensure command exists, otherwise kill event
const command = commands.find(command => command.name === interaction.commandName)
if (!command) return
log(`Interaction called \'${interaction.commandName}\' from ${interaction.user.tag}.`)
// the command exists, execute it
command.run(client, interaction)
})
// ensure command exists, otherwise kill event
const command = commands.find(command => command.name === interaction.commandName)
if (!command) return
// the command exists, execute it
command.run(client, interaction)
}
)