diff --git a/src/commands/eligible.ts b/src/commands/eligible.ts index fddab77a7..e3d1ee8e6 100644 --- a/src/commands/eligible.ts +++ b/src/commands/eligible.ts @@ -8,14 +8,8 @@ import getBlitzStarsAccount from '../utilities/getBlitzStarsAccount.js'; import poweredByBlitzStars from '../utilities/poweredByBlitzStars.js'; const CLANS = { - sklld: { - name: 'Skilled', - id: 71559, - }, - smri: { - name: 'Samurai', - id: 91244, - }, + sklld: { id: 71559, name: 'Skilled' }, + smri: { id: 91244, name: 'Samurai' }, }; export default { diff --git a/src/utilities/getBlitzStarsAccount.ts b/src/utilities/getBlitzStarsAccount.ts index ad05ec001..abac8f4b5 100644 --- a/src/utilities/getBlitzStarsAccount.ts +++ b/src/utilities/getBlitzStarsAccount.ts @@ -13,6 +13,8 @@ export default async function getBlitzStarsAccount( name: string, callback: (account: PlayerStatistics) => void, ) { + await interaction.deferReply(); + async function notTracked() { await interaction.reply({ embeds: [ diff --git a/src/utilities/getWargamingResponse.ts b/src/utilities/getWargamingResponse.ts index 8745b9649..2fb116110 100644 --- a/src/utilities/getWargamingResponse.ts +++ b/src/utilities/getWargamingResponse.ts @@ -1,13 +1,14 @@ import { CacheType, ChatInputCommandInteraction } from 'discord.js'; -import fetch from 'node-fetch'; import { WargamingResponse } from '../types/wargamingResponse.js'; import wargamingError from './wargamingError.js'; -export default function getWargamingResponse( +export default async function getWargamingResponse( url: string, interaction: ChatInputCommandInteraction, callback: (data: Data) => void, ) { + await interaction.deferReply(); + fetch(url) .then((response) => response.json() as Promise>) .then((response) => {