aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/feature
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-28 21:51:17 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-28 21:51:17 -0400
commit14eb0e617b084080c4cffc5b781b311c65c5f928 (patch)
tree9aaf1734c1e739814a913afeda40c56b0f84df61 /src/tasks/feature
parent03b26d5f00422f3aaddce3db2186765863b1eca0 (diff)
downloadtanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.gz
tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.bz2
tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.zip
rebrand v3
Diffstat (limited to 'src/tasks/feature')
-rw-r--r--src/tasks/feature/handleReminders.ts4
-rw-r--r--src/tasks/feature/removeExpiredPunishements.ts12
-rw-r--r--src/tasks/feature/updateStats.ts4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/tasks/feature/handleReminders.ts b/src/tasks/feature/handleReminders.ts
index a9f5658..afe6dd6 100644
--- a/src/tasks/feature/handleReminders.ts
+++ b/src/tasks/feature/handleReminders.ts
@@ -1,7 +1,7 @@
-import { BushTask, dateDelta, format, Reminder, Time } from '#lib';
+import { BotTask, dateDelta, format, Reminder, Time } from '#lib';
import { Op } from 'sequelize';
-export default class HandlerRemindersTask extends BushTask {
+export default class HandlerRemindersTask extends BotTask {
public constructor() {
super('handlerReminders', {
delay: 30 * Time.Second,
diff --git a/src/tasks/feature/removeExpiredPunishements.ts b/src/tasks/feature/removeExpiredPunishements.ts
index 30b8eba..eac325a 100644
--- a/src/tasks/feature/removeExpiredPunishements.ts
+++ b/src/tasks/feature/removeExpiredPunishements.ts
@@ -1,8 +1,8 @@
-import { ActivePunishment, ActivePunishmentType, BushTask, Time } from '#lib';
+import { ActivePunishment, ActivePunishmentType, BotTask, Time } from '#lib';
import assert from 'assert/strict';
import { Op } from 'sequelize';
-export default class RemoveExpiredPunishmentsTask extends BushTask {
+export default class RemoveExpiredPunishmentsTask extends BotTask {
public constructor() {
super('removeExpiredPunishments', {
delay: 15 * Time.Second,
@@ -37,7 +37,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.customUnban({ user: user, reason: 'Punishment expired' });
if (['success', 'user not banned', 'cannot resolve user'].includes(result)) await entry.destroy();
else throw new Error(result);
void this.client.logger.verbose(`removeExpiredPunishments`, `Unbanned ${entry.user}.`);
@@ -48,7 +48,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask {
await entry.destroy(); // channel overrides are removed when the member leaves the guild
return;
}
- const result = await member.bushUnblock({ reason: 'Punishment expired', channel: entry.extraInfo });
+ const result = await member.customUnblock({ reason: 'Punishment expired', channel: entry.extraInfo });
if (['success', 'user not blocked'].includes(result)) await entry.destroy();
else throw new Error(result);
void this.client.logger.verbose(`removeExpiredPunishments`, `Unblocked ${entry.user}.`);
@@ -56,7 +56,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask {
}
case ActivePunishmentType.MUTE: {
if (!member) return;
- const result = await member.bushUnmute({ reason: 'Punishment expired' });
+ const result = await member.customUnmute({ reason: 'Punishment expired' });
if (['success', 'failed to dm'].includes(result)) await entry.destroy();
else throw new Error(result);
void this.client.logger.verbose(`removeExpiredPunishments`, `Unmuted ${entry.user}.`);
@@ -66,7 +66,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask {
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.`);
- const result = await member.bushRemoveRole({
+ const result = await member.customRemoveRole({
reason: 'Punishment expired',
role: role,
addToModlog: true
diff --git a/src/tasks/feature/updateStats.ts b/src/tasks/feature/updateStats.ts
index 77b7c30..ded7aa1 100644
--- a/src/tasks/feature/updateStats.ts
+++ b/src/tasks/feature/updateStats.ts
@@ -1,6 +1,6 @@
-import { BushTask, Stat, Time } from '#lib';
+import { BotTask, Stat, Time } from '#lib';
-export default class UpdateStatsTask extends BushTask {
+export default class UpdateStatsTask extends BotTask {
public constructor() {
super('updateStats', {
delay: 10 * Time.Minute,