diff --git a/src/utilities/getWargamingResponse.ts b/src/utilities/getWargamingResponse.ts index 3bfd19009..8745b9649 100644 --- a/src/utilities/getWargamingResponse.ts +++ b/src/utilities/getWargamingResponse.ts @@ -1,4 +1,5 @@ import { CacheType, ChatInputCommandInteraction } from 'discord.js'; +import fetch from 'node-fetch'; import { WargamingResponse } from '../types/wargamingResponse.js'; import wargamingError from './wargamingError.js'; @@ -8,8 +9,8 @@ export default function getWargamingResponse( callback: (data: Data) => void, ) { fetch(url) - .then((response) => response.json()) - .then((response: WargamingResponse) => { + .then((response) => response.json() as Promise>) + .then((response) => { if (response.status === 'ok') { callback(response.data); } else {