Added command usage count to help, remove nonexistent commands from database, add build method to package.json
This commit is contained in:
parent
f9c8d6b26d
commit
70c4ff298f
6 changed files with 21 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue