Fix command count table not being properly registered
This commit is contained in:
parent
a0bb11dabb
commit
4309f358e7
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ export async function setup() {
|
|||
const counts = connection.prepare("SELECT * FROM counts").all();
|
||||
const merged = new Map([...collections.commands, ...collections.messageCommands]);
|
||||
|
||||
if (!counts) {
|
||||
if (!counts || counts.length === 0) {
|
||||
for (const command of merged.keys()) {
|
||||
connection.prepare("INSERT INTO counts (command, count) VALUES (?, ?)").run(command, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue