diff options
Diffstat (limited to 'src/tasks/removeExpiredPunishements.ts')
-rw-r--r-- | src/tasks/removeExpiredPunishements.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tasks/removeExpiredPunishements.ts b/src/tasks/removeExpiredPunishements.ts index 7b27b07..394d866 100644 --- a/src/tasks/removeExpiredPunishements.ts +++ b/src/tasks/removeExpiredPunishements.ts @@ -34,7 +34,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask { switch (entry.type) { case ActivePunishmentType.BAN: { assert(user); - const result = await guild.bushUnban({ user: user, reason: 'Punishment expired.' }); + const result = await guild.bushUnban({ user: user, reason: 'Punishment expired' }); if (['success', 'user not banned'].includes(result)) await entry.destroy(); else throw new Error(result); void client.logger.verbose(`removeExpiredPunishments`, `Unbanned ${entry.user}.`); @@ -45,7 +45,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask { await entry.destroy(); // channel overrides are removed when the member leaves the guild continue; } - const result = await member.bushUnblock({ reason: 'Punishment expired.', channel: entry.extraInfo }); + const result = await member.bushUnblock({ reason: 'Punishment expired', channel: entry.extraInfo }); if (['success', 'user not blocked'].includes(result)) await entry.destroy(); else throw new Error(result); void client.logger.verbose(`removeExpiredPunishments`, `Unblocked ${entry.user}.`); @@ -53,7 +53,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask { } case ActivePunishmentType.MUTE: { if (!member) continue; - const result = await member.bushUnmute({ reason: 'Punishment expired.' }); + const result = await member.bushUnmute({ reason: 'Punishment expired' }); if (['success', 'failed to dm'].includes(result)) await entry.destroy(); else throw new Error(result); void client.logger.verbose(`removeExpiredPunishments`, `Unmuted ${entry.user}.`); @@ -64,7 +64,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask { 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.bushRemoveRole({ - reason: 'Punishment expired.', + reason: 'Punishment expired', role: role, addToModlog: true }); |