debugging
This commit is contained in:
parent
c46d067c97
commit
5b4efc566f
@ -151,13 +151,17 @@ class CommandHandler extends Observer {
|
||||
|
||||
if (response instanceof Message) return;
|
||||
|
||||
if(response) {
|
||||
try { // Temporary -- trying to figure out why the bot sometimes errors with unknown interaction
|
||||
if (response) {
|
||||
if (response instanceof MessageEmbed) return invoker.reply({ embeds: [response] });
|
||||
if (typeof response === 'string') return invoker.reply({ content: response });
|
||||
if (typeof response === 'object') return invoker.reply(response);
|
||||
else if (typeof response === 'string') return invoker.reply({ content: response });
|
||||
else if (typeof response === 'object') return invoker.reply(response);
|
||||
}
|
||||
|
||||
if (!invoker.replied) return invoker.reply({ index: 'O_COMMANDHANDLER_COMMAND_NORESPONSE', ephemeral: !invoker.replied });
|
||||
} catch (err) {
|
||||
this.logger.error(`Error responding to ${invoker.command.name}:\n${err.stack}`);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user