From e8da6cf4fe2f8ab80167360c6c63a3c701eef101 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 3 Sep 2021 17:43:03 -0400 Subject: add pm2 metrics and fix abbreviatednumber type caster --- src/tasks/customMetrics.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/tasks/customMetrics.ts (limited to 'src/tasks') 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 { + client.metrics.guilds.set(client.guilds.cache.size); + client.metrics.users.set(client.users.cache.size); + } +} -- cgit