diff options
Diffstat (limited to 'src/tasks/removeExpiredPunishements.ts')
-rw-r--r-- | src/tasks/removeExpiredPunishements.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tasks/removeExpiredPunishements.ts b/src/tasks/removeExpiredPunishements.ts index 3c18ebc..7b27b07 100644 --- a/src/tasks/removeExpiredPunishements.ts +++ b/src/tasks/removeExpiredPunishements.ts @@ -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.unblock({ 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.unmute({ 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}.`); @@ -63,7 +63,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask { 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({ + const result = await member.bushRemoveRole({ reason: 'Punishment expired.', role: role, addToModlog: true |