aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/customMetrics.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/tasks/customMetrics.ts')
-rw-r--r--src/tasks/customMetrics.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tasks/customMetrics.ts b/src/tasks/customMetrics.ts
new file mode 100644
index 0000000..2d8a9ca
--- /dev/null
+++ b/src/tasks/customMetrics.ts
@@ -0,0 +1,14 @@
+import { BushTask } from '@lib';
+
+export default class RemoveExpiredPunishmentsTask extends BushTask {
+ public constructor() {
+ super('removeExpiredPunishments', {
+ delay: 10_000, // 10 seconds
+ runOnStart: true
+ });
+ }
+ public override async exec(): Promise<void> {
+ client.metrics.guilds.set(client.guilds.cache.size);
+ client.metrics.users.set(client.users.cache.size);
+ }
+}