Omit catch block errors when not needed

This commit is contained in:
Dragon Fire
2020-03-14 11:57:15 -04:00
parent 6794cbfdc9
commit e7dfa229f1
15 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -67,7 +67,7 @@ client.on('message', async msg => {
if (!call.active) return;
try {
await call.send(origin ? call.recipient : call.origin, msg);
} catch (err) {
} catch {
return; // eslint-disable-line no-useless-return
}
});
@@ -80,7 +80,7 @@ client.on('guildMemberRemove', async member => {
const leaveMsg = leaveMsgs[Math.floor(Math.random() * leaveMsgs.length)];
await channel.send(leaveMsg.replace(/{{user}}/gi, `**${member.user.tag}**`));
return null;
} catch (err) {
} catch {
return null;
}
});