aboutsummaryrefslogtreecommitdiff
path: root/src/tasks
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-10-03 22:57:40 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-10-03 22:57:40 -0400
commit612ed820a0600ec11ed642005377cd7f5a8a8b77 (patch)
tree6bca4e7268fd0063ff53cf64fa44df62a23dba50 /src/tasks
parented98ff7e2679f362f2657e77a6cf8dd3ce9b3d43 (diff)
downloadtanzanite-612ed820a0600ec11ed642005377cd7f5a8a8b77.tar.gz
tanzanite-612ed820a0600ec11ed642005377cd7f5a8a8b77.tar.bz2
tanzanite-612ed820a0600ec11ed642005377cd7f5a8a8b77.zip
wip
Diffstat (limited to 'src/tasks')
-rw-r--r--src/tasks/feature/removeExpiredPunishements.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tasks/feature/removeExpiredPunishements.ts b/src/tasks/feature/removeExpiredPunishements.ts
index eac325a..5d5d5ab 100644
--- a/src/tasks/feature/removeExpiredPunishements.ts
+++ b/src/tasks/feature/removeExpiredPunishements.ts
@@ -35,7 +35,7 @@ export default class RemoveExpiredPunishmentsTask extends BotTask {
assert(guild);
switch (entry.type) {
- case ActivePunishmentType.BAN: {
+ case ActivePunishmentType.Ban: {
assert(user);
const result = await guild.customUnban({ user: user, reason: 'Punishment expired' });
if (['success', 'user not banned', 'cannot resolve user'].includes(result)) await entry.destroy();
@@ -43,7 +43,7 @@ export default class RemoveExpiredPunishmentsTask extends BotTask {
void this.client.logger.verbose(`removeExpiredPunishments`, `Unbanned ${entry.user}.`);
break;
}
- case ActivePunishmentType.BLOCK: {
+ case ActivePunishmentType.Block: {
if (!member) {
await entry.destroy(); // channel overrides are removed when the member leaves the guild
return;
@@ -54,7 +54,7 @@ export default class RemoveExpiredPunishmentsTask extends BotTask {
void this.client.logger.verbose(`removeExpiredPunishments`, `Unblocked ${entry.user}.`);
break;
}
- case ActivePunishmentType.MUTE: {
+ case ActivePunishmentType.Mute: {
if (!member) return;
const result = await member.customUnmute({ reason: 'Punishment expired' });
if (['success', 'failed to dm'].includes(result)) await entry.destroy();
@@ -62,7 +62,7 @@ export default class RemoveExpiredPunishmentsTask extends BotTask {
void this.client.logger.verbose(`removeExpiredPunishments`, `Unmuted ${entry.user}.`);
break;
}
- case ActivePunishmentType.ROLE: {
+ case ActivePunishmentType.Role: {
if (!member) return;
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.`);