Skip to content

Commit

Permalink
Added catch to user DMs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbarrow committed Aug 28, 2022
1 parent 1e9f1e9 commit ee2dc62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/ban.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async function banHandler(interaction) {

await member.send({
embeds: sendMemberEmbeds
});
}).catch(() => console.log('Failed to DM user'));

await member.ban({
reason
Expand Down
2 changes: 1 addition & 1 deletion src/commands/kick.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ async function kickHandler(interaction) {

await member.send({
embeds: sendMemberEmbeds
});
}).catch(() => console.log('Failed to DM user'));

if (isKick) {
await member.kick(reason);
Expand Down
4 changes: 2 additions & 2 deletions src/commands/warn.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async function warnHandler(interaction) {

await member.send({
embeds: [punishmentEmbed, pastWarningsEmbed]
});
}).catch(() => console.log('Failed to DM user'));

if (isKick) {
await member.kick(reason);
Expand Down Expand Up @@ -240,7 +240,7 @@ async function warnHandler(interaction) {

await member.send({
embeds: [punishmentEmbed]
});
}).catch(() => console.log('Failed to DM user'));
}

await Warnings.create({
Expand Down

0 comments on commit ee2dc62

Please sign in to comment.