diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-03 17:43:03 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-03 17:43:03 -0400 |
commit | e8da6cf4fe2f8ab80167360c6c63a3c701eef101 (patch) | |
tree | d9e0776bbfeec49148b593ff938c3f81105a8db9 /src/tasks | |
parent | 86cb31c8ec889177393814139dabd49722474cc6 (diff) | |
download | tanzanite-e8da6cf4fe2f8ab80167360c6c63a3c701eef101.tar.gz tanzanite-e8da6cf4fe2f8ab80167360c6c63a3c701eef101.tar.bz2 tanzanite-e8da6cf4fe2f8ab80167360c6c63a3c701eef101.zip |
add pm2 metrics and fix abbreviatednumber type caster
Diffstat (limited to 'src/tasks')
-rw-r--r-- | src/tasks/customMetrics.ts | 14 |
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); + } +} |