aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/customMetrics.ts
blob: 49b17fea609eb7dd6b609a0b0cbfbca5b1e516c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { BushTask } from '@lib';

export default class CustomMetricsTask extends BushTask {
	public constructor() {
		super('customMetrics', {
			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);
	}
}