diff options
Diffstat (limited to 'src/tasks/removeExpiredPunishements.ts')
-rw-r--r-- | src/tasks/removeExpiredPunishements.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tasks/removeExpiredPunishements.ts b/src/tasks/removeExpiredPunishements.ts index c079363..d787063 100644 --- a/src/tasks/removeExpiredPunishements.ts +++ b/src/tasks/removeExpiredPunishements.ts @@ -59,6 +59,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask { case ActivePunishmentType.ROLE: { if (!member) continue; const role = guild?.roles?.cache?.get(entry.extraInfo); + if (!role) throw new Error(`Cannot unmute ${member.user.tag} because I cannot find the mute role.`); const result = await member.removeRole({ reason: 'Punishment expired.', role: role, |