Add total uses stat

This commit is contained in:
Dragon Fire
2024-07-02 01:16:09 -04:00
parent ed2e5bf017
commit 6139fccfb5
6 changed files with 23 additions and 3 deletions
+9
View File
@@ -78,4 +78,13 @@ module.exports = class Registry {
registerDefaultTypes() {
return this.registerTypesIn(path.join(__dirname, 'types'));
}
get totalUses() {
let uses = 0;
for (const command of this.commands.values()) {
if (command.ownerOnly || command.unknown || command.uses === undefined) continue;
uses += command.uses;
}
return uses;
}
};