mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Add total uses stat
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user