aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/removeExpiredPunishements.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-30 16:55:37 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-30 16:55:37 -0500
commit83db032fb91996c926a5d007a9e5fa4abed65871 (patch)
tree28081718636b6c41aea89018504f3f7e4f837903 /src/tasks/removeExpiredPunishements.ts
parentf0a9f894575871d498447c5de2b5f0f826b117b7 (diff)
downloadtanzanite-83db032fb91996c926a5d007a9e5fa4abed65871.tar.gz
tanzanite-83db032fb91996c926a5d007a9e5fa4abed65871.tar.bz2
tanzanite-83db032fb91996c926a5d007a9e5fa4abed65871.zip
add timeout command and fix some other moderation commands
Diffstat (limited to 'src/tasks/removeExpiredPunishements.ts')
-rw-r--r--src/tasks/removeExpiredPunishements.ts6
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