diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-15 07:41:33 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-15 07:41:33 -0400 |
commit | 71d66837de247c9136291842702503a5834937a6 (patch) | |
tree | 913dd4db26f0630c6e59892d4031e7c9028c9ee7 /src | |
parent | 462c47184573527e048c29cb332b2d2a04626f61 (diff) | |
download | tanzanite-71d66837de247c9136291842702503a5834937a6.tar.gz tanzanite-71d66837de247c9136291842702503a5834937a6.tar.bz2 tanzanite-71d66837de247c9136291842702503a5834937a6.zip |
fix fr I hope
Diffstat (limited to 'src')
-rw-r--r-- | src/tasks/removeExpiredPunishements.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tasks/removeExpiredPunishements.ts b/src/tasks/removeExpiredPunishements.ts index 4ad1794..c079363 100644 --- a/src/tasks/removeExpiredPunishements.ts +++ b/src/tasks/removeExpiredPunishements.ts @@ -49,6 +49,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask { break; } case ActivePunishmentType.MUTE: { + if (!member) continue; const result = await member.unmute({ reason: 'Punishment expired.' }); if (['success', 'failed to dm'].includes(result)) await entry.destroy(); else throw new Error(result); @@ -56,6 +57,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask { break; } case ActivePunishmentType.ROLE: { + if (!member) continue; const role = guild?.roles?.cache?.get(entry.extraInfo); const result = await member.removeRole({ reason: 'Punishment expired.', |