aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/customMetrics.ts
blob: 2d8a9ca4f1435eb0a67a83c73956313ecfdb66a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
	}
}