1
1
mirror of https://github.com/Burn-E99/TheArtificer.git synced 2026-06-04 09:03:50 -04:00

Sonar Cleanup - Phase 1

This commit is contained in:
Ean Milligan (Bastion)
2022-05-22 15:29:59 -04:00
parent 46d6014ed5
commit 891a36a9ba
10 changed files with 59 additions and 52 deletions

View File

@@ -11,9 +11,9 @@ console.log('Inesrtion done');
console.log('Attempting to insert default commands into command_cnt');
const commands = ['ping', 'rip', 'rollhelp', 'help', 'info', 'version', 'report', 'stats', 'roll', 'emojis', 'api', 'privacy', 'mention'];
for (let i = 0; i < commands.length; i++) {
await dbClient.execute('INSERT INTO command_cnt(command) values(?)', [commands[i]]).catch((e) => {
console.log(`Failed to insert into database`, e);
for (const command of commands) {
await dbClient.execute('INSERT INTO command_cnt(command) values(?)', [command]).catch((e) => {
console.log(`Failed to insert ${command} into database`, e);
});
}
console.log('Insertion done');