aboutsummaryrefslogtreecommitdiff
path: root/src/tasks
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
parent03b26d5f00422f3aaddce3db2186765863b1eca0 (diff)
downloadtanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.gz
tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.bz2
tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.zip
rebrand v3
Diffstat (limited to 'src/tasks')
-rw-r--r--src/tasks/cache/cpuUsage.ts4
-rw-r--r--src/tasks/cache/updateCache.ts4
-rw-r--r--src/tasks/cache/updateHighlightCache.ts5
-rw-r--r--src/tasks/cache/updateNeuItemCache.ts4
-rw-r--r--src/tasks/cache/updatePriceItemCache.ts4
-rw-r--r--src/tasks/feature/handleReminders.ts4
-rw-r--r--src/tasks/feature/removeExpiredPunishements.ts12
-rw-r--r--src/tasks/feature/updateStats.ts4
-rw-r--r--src/tasks/stats/guildCount.ts5
-rw-r--r--src/tasks/stats/memberCount.ts4
10 files changed, 24 insertions, 26 deletions
diff --git a/src/tasks/cache/cpuUsage.ts b/src/tasks/cache/cpuUsage.ts
index 61e7a54..3cd52ba 100644
--- a/src/tasks/cache/cpuUsage.ts
+++ b/src/tasks/cache/cpuUsage.ts
@@ -1,7 +1,7 @@
-import { BushTask, Time } from '#lib';
+import { BotTask, Time } from '#lib';
import os from 'node:os';
-export default class CpuUsageTask extends BushTask {
+export default class CpuUsageTask extends BotTask {
public constructor() {
super('cpuUsage', {
delay: Time.Minute,
diff --git a/src/tasks/cache/updateCache.ts b/src/tasks/cache/updateCache.ts
index 190e2a4..8b42ad3 100644
--- a/src/tasks/cache/updateCache.ts
+++ b/src/tasks/cache/updateCache.ts
@@ -1,6 +1,6 @@
-import { BushTask, Time, updateEveryCache } from '#lib';
+import { BotTask, Time, updateEveryCache } from '#lib';
-export default class UpdateCacheTask extends BushTask {
+export default class UpdateCacheTask extends BotTask {
public constructor() {
super('updateCache', {
delay: 5 * Time.Minute,
diff --git a/src/tasks/cache/updateHighlightCache.ts b/src/tasks/cache/updateHighlightCache.ts
index 4ab5544..90139a6 100644
--- a/src/tasks/cache/updateHighlightCache.ts
+++ b/src/tasks/cache/updateHighlightCache.ts
@@ -1,7 +1,6 @@
-import { BushTask } from '../../../lib/extensions/discord-akairo/BushTask.js';
-import { Time } from '../../../lib/utils/BushConstants.js';
+import { BotTask, Time } from '#lib';
-export default class UpdateHighlightCacheTask extends BushTask {
+export default class UpdateHighlightCacheTask extends BotTask {
public constructor() {
super('updateHighlightCache', {
delay: 5 * Time.Minute,
diff --git a/src/tasks/cache/updateNeuItemCache.ts b/src/tasks/cache/updateNeuItemCache.ts
index 14c107b..5c88377 100644
--- a/src/tasks/cache/updateNeuItemCache.ts
+++ b/src/tasks/cache/updateNeuItemCache.ts
@@ -1,6 +1,6 @@
-import { BushTask, Time } from '#lib';
+import { BotTask, Time } from '#lib';
-export default class UpdateNeuItemCache extends BushTask {
+export default class UpdateNeuItemCache extends BotTask {
public constructor() {
super('updateNeuItemCache', {
delay: 1 * Time.Hour,
diff --git a/src/tasks/cache/updatePriceItemCache.ts b/src/tasks/cache/updatePriceItemCache.ts
index bafbfaf..04ae19a 100644
--- a/src/tasks/cache/updatePriceItemCache.ts
+++ b/src/tasks/cache/updatePriceItemCache.ts
@@ -1,7 +1,7 @@
-import { BushTask, Time } from '#lib';
+import { BotTask, Time } from '#lib';
import PriceCommand, { AuctionAverages, Bazaar, LowestBIN } from '../../commands/utilities/price.js';
-export default class UpdatePriceItemCache extends BushTask {
+export default class UpdatePriceItemCache extends BotTask {
public constructor() {
super('updatePriceItemCache', {
delay: 10 * Time.Minute,
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,
diff --git a/src/tasks/stats/guildCount.ts b/src/tasks/stats/guildCount.ts
index f52dc95..177c959 100644
--- a/src/tasks/stats/guildCount.ts
+++ b/src/tasks/stats/guildCount.ts
@@ -1,7 +1,6 @@
-import { BushTask, Time } from '#lib';
-import { GuildCount } from '../../../lib/models/shared/GuildCount.js';
+import { BotTask, GuildCount, Time } from '#lib';
-export default class GuildCountTask extends BushTask {
+export default class GuildCountTask extends BotTask {
public constructor() {
super('guildCount', {
delay: 15 * Time.Minute,
diff --git a/src/tasks/stats/memberCount.ts b/src/tasks/stats/memberCount.ts
index 9c31c5b..7cafde5 100644
--- a/src/tasks/stats/memberCount.ts
+++ b/src/tasks/stats/memberCount.ts
@@ -1,7 +1,7 @@
-import { BushTask, MemberCount, Time } from '#lib';
+import { BotTask, MemberCount, Time } from '#lib';
import assert from 'assert/strict';
-export default class MemberCountTask extends BushTask {
+export default class MemberCountTask extends BotTask {
public constructor() {
super('memberCount', {
delay: Time.Minute,