From 749f7aea399ade4f03a561414d835e07a7280f67 Mon Sep 17 00:00:00 2001 From: Evorp <3vorpgaming@gmail.com> Date: Thu, 12 Oct 2023 17:18:16 -0700 Subject: [PATCH] possible fix for "socket hang up" --- src/commands/faithful/missing.ts | 2 +- src/helpers/functions/missing.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/faithful/missing.ts b/src/commands/faithful/missing.ts index 40dfec7b5..ab97589c5 100644 --- a/src/commands/faithful/missing.ts +++ b/src/commands/faithful/missing.ts @@ -158,7 +158,7 @@ export const command: SlashCommand = { } resultEmbed.addFields({ - name: `${formatName(response[2].pack)[0]} - ${response[2].edition} - ${ + name: `${formatName(response[2].pack)[0]} - ${ response[2].version }`, value: `${response[2].completion}% complete\n> ${response[1].length} ${ diff --git a/src/helpers/functions/missing.ts b/src/helpers/functions/missing.ts index c15a233ef..13ecacbd3 100644 --- a/src/helpers/functions/missing.ts +++ b/src/helpers/functions/missing.ts @@ -18,6 +18,7 @@ export interface MissingOptions { version: string; total?: number; } + export type MissingResult = [Buffer, string[], MissingOptions, Buffer?]; export const computeAll = async ( @@ -133,7 +134,7 @@ export const compute = async ( } const versions: string[] = ( - await axios.get(`${client.tokens.apiUrl}settings/versions.${edition}`) + await axios.get(`${client.tokens.apiUrl}textures/versions/${edition}`) ).data; // latest version if versions doesn't include version (unexisting/unsupported) if (!versions.includes(version)) version = versions[0];