Skip to content

Commit

Permalink
feat(commands): Add channel info for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed Dec 10, 2019
1 parent 249e904 commit 5371ffc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/framework/services/Commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ export class CommandsService {
scope.setUser({ id: guild.id });
}
scope.setTag('command', cmd.name);
scope.setExtra('channel', channel.id);
scope.setExtra('message', message.content);
captureException(error);
});
Expand Down
2 changes: 1 addition & 1 deletion src/moderation/commands/mod/lockdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default class extends Command {
return;
}

// Get lowest role that has write permissions
const scheduledUnlockActions = await this.client.scheduler.getScheduledActionsOfType(
guild.id,
ScheduledActionType.unlock
Expand All @@ -75,6 +74,7 @@ export default class extends Command {
return;
}

// Get lowest role that has write permissions
let lowestRole: Role | null = null;
let lowestOverride: PermissionOverwrite | null = null;
for (const [id, value] of channel.permissionOverwrites) {
Expand Down

0 comments on commit 5371ffc

Please sign in to comment.