This commit is contained in:
parent
17c0da1582
commit
028afde436
@ -5,17 +5,7 @@ const conn = require('../../../database/db'); // Ajusta o caminho
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'interactionCreate',
|
name: 'interactionCreate',
|
||||||
async execute(interaction, client) {
|
async execute(interaction, client) {
|
||||||
if (interaction.isChatInputCommand()) {
|
|
||||||
const command = client.commands.get(interaction.commandName);
|
|
||||||
if (!command) return;
|
|
||||||
try {
|
|
||||||
await command.execute(interaction, client);
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
await interaction.reply({ content: '❌ Ocorreu um erro ao executar o comando.', flags: MessageFlags.Ephemeral });
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interaction.isAutocomplete()) {
|
if (interaction.isAutocomplete()) {
|
||||||
const focusedValue = interaction.options.getFocused();
|
const focusedValue = interaction.options.getFocused();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user