Added command usage count to help, remove nonexistent commands from database, add build method to package.json

This commit is contained in:
TheEssem 2020-07-29 18:06:34 -05:00
parent f9c8d6b26d
commit 70c4ff298f
6 changed files with 21 additions and 9 deletions

View file

@ -70,12 +70,19 @@ module.exports = async () => {
});
await newGlobal.save();
} else {
const exists = [];
for (const command of collections.commands.keys()) {
if (!global.cmdCounts.has(command)) {
global.cmdCounts.set(command, 0);
await global.save();
}
exists.push(command);
}
for (const command of global.cmdCounts.keys()) {
if (!exists.includes(command)) {
global.cmdCounts.set(command, undefined);
}
}
await global.save();
}
// generate docs