diff --git a/package.json b/package.json index 9ff303adc..9261c5965 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blitzkrieg", - "version": "1.4.1", + "version": "1.5.1", "description": "", "main": "index.js", "type": "module", diff --git a/src/commands/stats.tsx b/src/commands/stats.tsx index ee6e30b45..47e4ce267 100644 --- a/src/commands/stats.tsx +++ b/src/commands/stats.tsx @@ -39,7 +39,7 @@ import { PlayerClanData } from '../types/playerClanData.js'; export default { inProduction: true, - inDevelopment: true, + inDevelopment: false, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/tankstats.tsx b/src/commands/tankstats.tsx index 17c55a548..9e34edf7e 100644 --- a/src/commands/tankstats.tsx +++ b/src/commands/tankstats.tsx @@ -40,7 +40,7 @@ import { TanksStats } from '../types/tanksStats.js'; export default { inProduction: true, - inDevelopment: true, + inDevelopment: false, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/today.tsx b/src/commands/today.tsx index 4eebe41b1..f3e0afa0c 100644 --- a/src/commands/today.tsx +++ b/src/commands/today.tsx @@ -33,7 +33,7 @@ import { TanksStats } from '../types/tanksStats.js'; export default { inProduction: true, - inDevelopment: true, + inDevelopment: false, inPublic: true, command: new SlashCommandBuilder() @@ -191,12 +191,7 @@ export default { await interaction.editReply({ embeds: rows.length >= 6 - ? [ - infoEmbed( - 'Very large image!', - "Don't forget to oom in.", - ), - ] + ? [infoEmbed('Very large image!', "Don't forget to oom in.")] : undefined, files: [image], components: [actionRow], diff --git a/src/core/blitz/tankopedia.ts b/src/core/blitz/tankopedia.ts index 19d6c3df3..876f5b7b3 100644 --- a/src/core/blitz/tankopedia.ts +++ b/src/core/blitz/tankopedia.ts @@ -1,5 +1,4 @@ import { WargamingResponse } from '../../types/wargamingResponse.js'; -import isDev from '../process/isDev.js'; import URLToBase64 from '../ui/URLToBase64.js'; /* @@ -58,12 +57,16 @@ export const TANK_IDS = Object.keys(tankopedia).map((id) => Number(id)); export const TANKS = TANK_IDS.map((id) => tankopedia[id]); export const TANK_NAMES = TANKS.map((tank) => tank.name); -if (!isDev()) { - console.log('Encoding tank images...'); - await Promise.all( - Object.entries(tankopedia).map(async ([, tank]) => { +console.log('Encoding tank images...'); +await Promise.all( + Object.entries(tankopedia).map(async ([, tank]) => { + try { tank.images.normal = await URLToBase64(tank.images.normal); - }), - ); - console.log('Encoded tank images'); -} + } catch (error) { + console.warn( + `Failed to encode tank image for ${tank.images.normal}: ${error}`, + ); + } + }), +); +console.log('Encoded tank images');