parent
cf3102cbc5
commit
5a116b0531
4 changed files with 17 additions and 15 deletions
|
@ -36,7 +36,7 @@ export default class CommandManager {
|
|||
color: 0xff0000,
|
||||
description: `Failed to perform interaction:\n\`${e}\``,
|
||||
}]
|
||||
}).catch(() => {/* GRACEFAIL: We're still logging the issue that happened to the console */});
|
||||
}).catch(() => {/* NOTE: We're still logging the issue that happened to the console */});
|
||||
console.error(`Failed to perform interaction: ${interaction.commandName}`);
|
||||
console.error(e);
|
||||
});
|
||||
|
@ -46,7 +46,10 @@ export default class CommandManager {
|
|||
const foundCommand = this.commands.find((command) => command.name === interaction.commandName );
|
||||
if (!foundCommand) throw new Error(`Unknown command received (${interaction.commandName}). Did you forgot to push updated commands?`);
|
||||
if (!foundCommand.autocomplete) return;
|
||||
foundCommand.autocomplete(interaction);
|
||||
foundCommand.autocomplete(interaction).catch(e => {
|
||||
console.error(`Failed to perform autocomplete interaction: ${interaction.commandName}`);
|
||||
console.error(e);
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue