aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-04-27 18:49:41 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-04-27 18:49:41 -0400
commite762481d659430f19e96034154fb84e0d5c1c369 (patch)
treec008edfa9bb6a2711b6a00004db8a72041125b15
parent98a58a7d87a6009383e9de3ce5865ded0fb0efa6 (diff)
downloadtanzanite-e762481d659430f19e96034154fb84e0d5c1c369.tar.gz
tanzanite-e762481d659430f19e96034154fb84e0d5c1c369.tar.bz2
tanzanite-e762481d659430f19e96034154fb84e0d5c1c369.zip
feat: only log member counts of guilds with 100 or more members
-rw-r--r--src/tasks/memberCount.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tasks/memberCount.ts b/src/tasks/memberCount.ts
index 0f1dfc0..fa51080 100644
--- a/src/tasks/memberCount.ts
+++ b/src/tasks/memberCount.ts
@@ -13,7 +13,9 @@ export default class MemberCountTask extends BushTask {
if (!client.config.isProduction) return;
const res = await Promise.allSettled(
- client.guilds.cache.map((g) => MemberCount.create({ guildId: g.id, memberCount: g.memberCount }))
+ client.guilds.cache
+ .filter((g) => g.memberCount >= 100)
+ .map((g) => MemberCount.create({ guildId: g.id, memberCount: g.memberCount }))
);
res