mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: disabled image encoding
This commit is contained in:
1 parent
2c8ae40ff8
commit
132817dbe0
3 files changed
+15
-16
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "blitzkrieg",
|
"name": "blitzkrieg",
|
||||||
"version": "1.5.1",
|
"version": "1.5.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import { PlayerClanData } from '../types/playerClanData.js';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
inProduction: true,
|
inProduction: true,
|
||||||
inDevelopment: false,
|
inDevelopment: true,
|
||||||
inPublic: true,
|
inPublic: true,
|
||||||
|
|
||||||
command: new SlashCommandBuilder()
|
command: new SlashCommandBuilder()
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { WargamingResponse } from '../../types/wargamingResponse.js';
|
import { WargamingResponse } from '../../types/wargamingResponse.js';
|
||||||
import URLToBase64 from '../ui/URLToBase64.js';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"1": {
|
"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 TANKS = TANK_IDS.map((id) => tankopedia[id]);
|
||||||
export const TANK_NAMES = TANKS.map((tank) => tank.name);
|
export const TANK_NAMES = TANKS.map((tank) => tank.name);
|
||||||
|
|
||||||
console.log('Encoding tank images...');
|
// console.log('Encoding tank images...');
|
||||||
await Promise.all(
|
// await Promise.all(
|
||||||
Object.entries(tankopedia).map(async ([, tank]) => {
|
// Object.entries(tankopedia).map(async ([, tank]) => {
|
||||||
try {
|
// try {
|
||||||
tank.images.normal = await URLToBase64(tank.images.normal);
|
// tank.images.normal = await URLToBase64(tank.images.normal);
|
||||||
} catch (error) {
|
// } catch (error) {
|
||||||
console.warn(
|
// console.warn(
|
||||||
`Failed to encode tank image for ${tank.images.normal}: ${error}`,
|
// `Failed to encode tank image for ${tank.images.normal}: ${error}`,
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}),
|
// }),
|
||||||
);
|
// );
|
||||||
console.log('Encoded tank images');
|
// console.log('Encoded tank images');
|
||||||
Reference in new issue
Block a user