Hypixel-API-Reborn / hypixel-api-reborn

Feature-rich Hypixel API wrapper for Node.js
https://hypixel-api-reborn.github.io
MIT License
97 stars 28 forks source link

Woolwars tourney stats only bug #446

Closed Kathund closed 7 months ago

Kathund commented 11 months ago

Bug report

Part of code where error occurred

When fetching a players stats if they have never played woolwars it should return null but if they have only played woolwars in the tourney they dont have any of the other stats. This causes an error coz the code cant find the required stats to build the response. This is because they only have stats for the tourney in the api response and not all the other stats a normal player would have.

What error occurred

TypeError: Cannot read properties of undefined (reading 'assault')
    at WoolWars.generateStatsFor (/home/kathund/github/hypixel-api-reborn/src/structures/MiniGames/WoolWars.js:86:52)
    at new WoolWars (/home/kathund/github/hypixel-api-reborn/src/structures/MiniGames/WoolWars.js:44:25)
    at new Player (/home/kathund/github/hypixel-api-reborn/src/structures/Player.js:239:44)
    at module.exports (/home/kathund/github/hypixel-api-reborn/src/API/getPlayer.js:21:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async test (/home/kathund/github/hypixel-api-reborn/tests/test.js:30:16)
ChiefChippy2 commented 11 months ago

Is it possible to have the UUID of a player encountering such an issue for testing?

Kathund commented 11 months ago

Is it possible to have the UUID of a player encountering such an issue for testing?

24fc83c86e554eda89a88ed09ed18621 and 6b845fc9792e428288636b3f3006c227 are two people i found