aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/feature/memberCount.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/tasks/feature/memberCount.ts')
-rw-r--r--src/tasks/feature/memberCount.ts28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/tasks/feature/memberCount.ts b/src/tasks/feature/memberCount.ts
deleted file mode 100644
index 9c31c5b..0000000
--- a/src/tasks/feature/memberCount.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { BushTask, MemberCount, Time } from '#lib';
-import assert from 'assert/strict';
-
-export default class MemberCountTask extends BushTask {
- public constructor() {
- super('memberCount', {
- delay: Time.Minute,
- runOnStart: true
- });
- }
-
- public override async exec() {
- if (!this.client.config.isProduction) return;
-
- const res = await Promise.allSettled(
- this.client.guilds.cache
- .filter((g) => g.memberCount >= 100)
- .map((g) => MemberCount.create({ guildId: g.id, memberCount: g.memberCount }))
- );
-
- res
- .filter((r) => r.status === 'rejected')
- .forEach((r) => {
- assert(r.status === 'rejected');
- void this.client.console.error('memberCount', r.status);
- });
- }
-}