feat: disabled image encoding

This commit is contained in:
TresAbhi committed 2023-06-03 00:32:50 +00:00
1 parent 2c8ae40ff8
commit 132817dbe0
3 files changed
+15 -16

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ import { PlayerClanData } from '../types/playerClanData.js';
export default {
inProduction: true,
inDevelopment: false,
inDevelopment: true,
inPublic: true,
command: new SlashCommandBuilder()
+13 -14
View File
@@ -1,5 +1,4 @@
import { WargamingResponse } from '../../types/wargamingResponse.js';
import URLToBase64 from '../ui/URLToBase64.js';
/*
"1": {
@@ -57,16 +56,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);
console.log('Encoding tank images...');
await Promise.all(
Object.entries(tankopedia).map(async ([, tank]) => {
try {
tank.images.normal = await URLToBase64(tank.images.normal);
} catch (error) {
console.warn(
`Failed to encode tank image for ${tank.images.normal}: ${error}`,
);
}
}),
);
console.log('Encoded tank images');
// console.log('Encoding tank images...');
// await Promise.all(
// Object.entries(tankopedia).map(async ([, tank]) => {
// try {
// tank.images.normal = await URLToBase64(tank.images.normal);
// } catch (error) {
// console.warn(
// `Failed to encode tank image for ${tank.images.normal}: ${error}`,
// );
// }
// }),
// );
// console.log('Encoded tank images');