Skip to content

Commit

Permalink
Merge pull request #525 from aternosorg/command-errors
Browse files Browse the repository at this point in the history
fix error handling for select menus, modals and other interactions wi…
  • Loading branch information
JulianVennen authored Nov 2, 2022
2 parents dfe2c12 + 277d450 commit 98bfdab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/CommandManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ export class CommandManager {
*/
async handleCommandError(interaction, error) {
const name = [
interaction.commandName,
interaction.options.getSubcommandGroup(false),
interaction.options.getSubcommand(false)
interaction.commandName ?? interaction.customId,
interaction.options?.getSubcommandGroup(false),
interaction.options?.getSubcommand(false)
].filter(v => !!v).join(' ');
await logger.error(`Failed to execute command '${name}': ${error.name}`, error);
let message = 'An error occurred while executing this command. ';
Expand Down

0 comments on commit 98bfdab

Please sign in to comment.