raw client events to prometheus

This commit is contained in:
Lio Young 2021-07-08 13:49:00 +02:00
parent e2584bada0
commit f33b4b572d
1 changed files with 5 additions and 0 deletions

5
src/handler/client/Client.ts Executable file → Normal file
View File

@ -3,6 +3,7 @@ import { readdirSync as read } from "fs";
import path from "path";
import { Command } from "../../utils/types";
import Logger from "../../utils/logger";
import { Prom } from "../../utils/prometheus";
// const server = require('../../website/server');
export default class Thaldrin extends Client {
@ -24,6 +25,10 @@ export default class Thaldrin extends Client {
this.config = config;
this.lastEval = null;
// @ts-ignore
this.on("raw", packet => {
Prom.events.labels(packet.t).inc()
})
this.login(config.token);
this.load();