Don't track unknown command AT ALL

This commit is contained in:
Dragon Fire
2021-05-03 17:14:18 -04:00
parent 995ab23c81
commit 50a729bc6f
5 changed files with 13 additions and 3 deletions
+2
View File
@@ -213,6 +213,7 @@ module.exports = class XiaoClient extends CommandoClient {
exportCommandLeaderboard() {
let text = '{';
for (const command of this.registry.commands.values()) {
if (command.unknown) continue;
if (command.uses === undefined) continue;
text += `\n "${command.name}": ${command.uses},`;
}
@@ -245,6 +246,7 @@ module.exports = class XiaoClient extends CommandoClient {
exportLastRun() {
let text = '{';
for (const command of this.registry.commands.values()) {
if (command.unknown) continue;
if (command.lastRun === undefined) continue;
text += `\n "${command.name}": ${command.lastRun ? `"${command.lastRun.toISOString()}"` : null},`;
}