mirror of
https://github.com/kevinthedang/discord-ollama.git
synced 2025-12-13 12:06:06 -05:00
[Snyk] Upgrade discord.js from 14.16.3 to 14.17.3 (#155)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user