mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Catch errors
This commit is contained in:
@@ -46,7 +46,11 @@ module.exports = class ReportRespondCommand extends Command {
|
||||
.setFooter(`ID: ${msg.author.id}`)
|
||||
.setTimestamp()
|
||||
.setColor(typesColors[type]);
|
||||
await user.send('Your report has been evaluated with the following message:', { embed });
|
||||
return msg.say(`${displaytypes[type]} sent to ${user.tag}.`);
|
||||
try {
|
||||
await user.send('Your report has been evaluated with the following message:', { embed });
|
||||
return msg.say(`${displaytypes[type]} sent to ${user.tag}.`);
|
||||
} catch {
|
||||
return msg.say(`Could not send ${displaytypes[type]} to ${user.tag}. Probably blocked me.`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user