From 04ebce7d01c73133d98e4949a67dd09738964821 Mon Sep 17 00:00:00 2001 From: "Ean Milligan (Bastion)" Date: Sat, 27 Aug 2022 02:31:23 -0400 Subject: [PATCH] v0.5.7 - Sonar Cleanup + New Activities --- db/populateDefaults.ts | 4 ++-- deno.json | 2 +- src/games.ts | 3 +++ src/timeUtils.ts | 4 ++-- src/utils.ts | 2 +- www/icsGenerator/index.html | 2 +- www/tzConverter/index.html | 2 +- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/db/populateDefaults.ts b/db/populateDefaults.ts index d80fb98..4eb9fae 100644 --- a/db/populateDefaults.ts +++ b/db/populateDefaults.ts @@ -19,8 +19,8 @@ const dbClient = await new Client().connect({ console.log('Attempting to insert default commands into command_cnt'); const commands = ['ping', 'help', 'info', 'version', 'report', 'privacy', 'lfg', 'prefix']; -for (let i = 0; i < commands.length; i++) { - await dbClient.execute('INSERT INTO command_cnt(command) values(?)', [commands[i]]).catch((e) => { +for (const command of commands) { + await dbClient.execute('INSERT INTO command_cnt(command) values(?)', [command]).catch((e) => { console.log(`Failed to insert into database`, e); }); } diff --git a/deno.json b/deno.json index d53d386..fda4cb6 100644 --- a/deno.json +++ b/deno.json @@ -1,7 +1,7 @@ { "compilerOptions": { "allowJs": true, - "lib": ["deno.worker"], + "lib": ["deno.window"], "strict": true }, "lint": { diff --git a/src/games.ts b/src/games.ts index e724272..7a89a37 100644 --- a/src/games.ts +++ b/src/games.ts @@ -1,6 +1,7 @@ export const LFGActivities = { 'Destiny 2': { 'Raids': { + 'King\'s Fall': 6, 'Vow of the Disciple': 6, 'Vault of Glass': 6, 'Deep Stone Crypt': 6, @@ -32,6 +33,8 @@ export const LFGActivities = { }, */ 'Nightfall': 3, 'Miscellaneous': { + 'Ketchrash': 6, + 'Expedition': 3, 'Weekly Witch Queen Campaign Mission': 3, 'Wellspring': 6, 'Dares of Eternity': 6, diff --git a/src/timeUtils.ts b/src/timeUtils.ts index 7bdde36..9134372 100644 --- a/src/timeUtils.ts +++ b/src/timeUtils.ts @@ -11,10 +11,10 @@ export const determineTZ = (tz: string, userOverride = false): [string, boolean] const jul = new Date(today.getFullYear(), 6, 1); if (today.getTimezoneOffset() < Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset())) { if (tz.includes('S')) overrode = true; - tz = `${tz.substr(0, 1)}DT`; + tz = `${tz.substring(0, 1)}DT`; } else { if (tz.includes('D')) overrode = true; - tz = `${tz.substr(0, 1)}ST`; + tz = `${tz.substring(0, 1)}ST`; } } diff --git a/src/utils.ts b/src/utils.ts index e53e3a5..fc2ac84 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,7 +1,7 @@ export const jsonParseBig = (input: string) => { return JSON.parse(input, (_key, value) => { if (typeof value === 'string' && /^\d+n$/.test(value)) { - return BigInt(value.substr(0, value.length - 1)); + return BigInt(value.substring(0, value.length - 1)); } return value; }); diff --git a/www/icsGenerator/index.html b/www/icsGenerator/index.html index 8ce6c42..a8e94d0 100644 --- a/www/icsGenerator/index.html +++ b/www/icsGenerator/index.html @@ -1,5 +1,5 @@ - + diff --git a/www/tzConverter/index.html b/www/tzConverter/index.html index a9ab82a..9132a90 100644 --- a/www/tzConverter/index.html +++ b/www/tzConverter/index.html @@ -1,5 +1,5 @@ - +