mirror of
https://github.com/kevinthedang/discord-ollama.git
synced 2025-12-14 04:16:07 -05:00
Upgrade Npm Packages (#159)
* Update: upgrade packages * Update: add in all packages * Update: fix whitespace in events --------- Co-authored-by: JT2M0L3Y <jtsmoley@icloud.com>
This commit is contained in:
@@ -6,15 +6,14 @@ 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
|
||||
if (!interaction.isCommand() || !interaction.isChatInputCommand()) return
|
||||
|
||||
log(`Interaction called \'${interaction.commandName}\' from ${interaction.user.tag}.`)
|
||||
log(`Interaction called \'${interaction.commandName}\' from ${interaction.user.tag}.`)
|
||||
|
||||
// ensure command exists, otherwise kill event
|
||||
const command = commands.find(command => command.name === interaction.commandName)
|
||||
if (!command) return
|
||||
// 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)
|
||||
}
|
||||
)
|
||||
// the command exists, execute it
|
||||
command.run(client, interaction)
|
||||
})
|
||||
Reference in New Issue
Block a user