discord-js-bot
discord-js-bot copied to clipboard
covid is broken
Describe the bug when u run the command it gives this error cuz they lost their cert lol FetchError: invalid json response body at https://disease.sh/v2/countries/usa reason: Unexpected token < in JSON at position 0 at C:\Users\maxda\OneDrive\Desktop\bot shit\darth bot\darth bot\node_modules\node-fetch\lib\index.js:273:32 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async getJson (C:\Users\maxda\OneDrive\Desktop\bot shit\darth bot\darth bot\src\helpers\HttpUtils.js:17:20) at async getCovid (C:\Users\maxda\OneDrive\Desktop\bot shit\darth bot\darth bot\src\commands\utility\utility.js:1162:22) at async Object.interactionRun (C:\Users\maxda\OneDrive\Desktop\bot shit\darth bot\darth bot\src\commands\utility\utility.js:457:26) at async Object.handleSlashCommand (C:\Users\maxda\OneDrive\Desktop\bot shit\darth bot\darth bot\src\handlers\command.js:140:7) at async module.exports (C:\Users\maxda\OneDrive\Desktop\bot shit\darth bot\darth bot\src\events\interactions\interactionCreate.js:44:5)
To Reproduce run </covid:1014715799606411360> with any country
Expected behavior Unexpected Backend Error! Try again later or contact support server
Screenshots im good
If possible
- NodeJS version: same as strange
- Bot version: same as strange
Additional context Add any other context about the problem here.
if u want a fix, on line 46
change it to
const response = await getJson(https://corona.lmao.ninja/v2/countries/${country}
);