mrmBot-Matrix/commands/general/imagestats.js
2023-03-16 20:23:01 -04:00

21 lines
709 B
JavaScript

import Command from "../../classes/command.js";
import { connections } from "../../utils/image.js";
class ImageStatsCommand extends Command {
async run() {
// await this.acknowledge();
let desc = `The bot is currently connected to ${connections.size} image server(s).\n`
let i = 0;
for (const connection of connections.values()) {
const count = await connection.getCount();
if (!count) continue;
desc = desc + `Server ${i++}\nRunning Jobs: ${count}`
}
return desc;
}
static description = "Gets some statistics about the image servers";
static aliases = ["imgstat", "imstats", "imgstats", "imstat"];
}
export default ImageStatsCommand;