Skip to content

Commit

Permalink
Log error when resetting group code (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
rorro authored Dec 10, 2023
1 parent 3a7fbca commit 7d804cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/instances/moderation/ResetGroupCodeCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ class ResetGroupCodeCommand extends Command {
throw new CommandError("Couldn't find that user.");
}

const sentDM = await user.send('Resetting group code...').catch(() => {
const sentDM = await user.send('Resetting group code...').catch(e => {
console.log(e);

throw new CommandError(
`Failed to send DM to ${user}. Please go into Privacy Settings and enable Direct Messages.`
);
Expand Down

0 comments on commit 7d804cb

Please sign in to comment.