mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Omit catch block errors when not needed
This commit is contained in:
@@ -48,7 +48,7 @@ module.exports = class HelpCommand extends Command {
|
||||
msgs.push(await msg.direct({ embed }));
|
||||
if (msg.channel.type !== 'dm') msgs.push(await msg.say('📬 Sent you a DM with information.'));
|
||||
return msgs;
|
||||
} catch (err) {
|
||||
} catch {
|
||||
return msg.reply('Failed to send DM. You probably have DMs disabled.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ module.exports = class ReportCommand extends Command {
|
||||
try {
|
||||
const channel = await this.client.channels.fetch(REPORT_CHANNEL_ID);
|
||||
await channel.send({ embed });
|
||||
} catch (err) {
|
||||
} catch {
|
||||
await this.sendOwnerDM(embed);
|
||||
}
|
||||
} else {
|
||||
@@ -57,7 +57,7 @@ module.exports = class ReportCommand extends Command {
|
||||
for (const owner of this.client.owners) {
|
||||
try {
|
||||
await owner.send({ embed });
|
||||
} catch (err) {
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user