|
@ -4,11 +4,17 @@ export const name = 'interactionCreate'; |
|
|
|
|
|
|
|
|
export const once = false; |
|
|
export const once = false; |
|
|
|
|
|
|
|
|
|
|
|
declare global { |
|
|
|
|
|
var client; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
export async function execute(interaction) { |
|
|
export async function execute(interaction) { |
|
|
const client = interaction.client; |
|
|
const client = interaction.client; |
|
|
|
|
|
|
|
|
if (!interaction.isCommand()) return; |
|
|
if (!interaction.isCommand()) return; |
|
|
|
|
|
|
|
|
const command = client.commands.get(interaction.commandName); |
|
|
const command = client.commands.get(interaction.commandName); |
|
|
|
|
|
|
|
|
if (!command) return; |
|
|
if (!command) return; |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
@ -18,4 +24,6 @@ export async function execute(interaction) { |
|
|
log({ logger: 'interaction', content: `Interaction ${interaction.name} failed!`, level: 'error' }); |
|
|
log({ logger: 'interaction', content: `Interaction ${interaction.name} failed!`, level: 'error' }); |
|
|
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true }); |
|
|
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true }); |
|
|
} |
|
|
} |
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
} |
|
|
} |