** Disclaimer **
Bug report was generated using ChatGPT.
I swear ChatGPT got dumber in last 2 months.
I had to revise this bug report so many times, lol.
Describe the bug
server_location stays stuck at null for the rest of the process lifecycle.
If the bot first stores attributes.location as null, and BattleMetrics later returns a location array, the comparison throws before the new value is saved. Because of that, server_location remains null, and the same error repeats on every scheduled BattleMetrics refresh until the container is restarted.
2026/07/12 12:50:12 | stdout | at async DiscordBot.updateBattlemetricsInstances (/app/src/structures/DiscordBot.js:395:29)
2026/07/12 12:50:12 | stdout | at processTicksAndRejections (node:internal/process/task_queues:95:5)
2026/07/12 12:50:12 | stdout | at Battlemetrics.evaluation (/app/src/structures/Battlemetrics.js:509:38)
2026/07/12 12:50:12 | stdout | at Battlemetrics.#evaluateServerParameter (/app/src/structures/Battlemetrics.js:338:24)
2026/07/12 12:50:12 | stdout | TypeError: Cannot read properties of null (reading 'length')
2026/07/12 12:50:12 | stdout | 2026-7-12 10:50:12 ERROR: Unhandled Rejection: ,TypeError: Cannot read properties of null (reading 'length')
To Reproduce
- Start the bot while BattleMetrics returns
attributes.location: null.
- On a later refresh, have BattleMetrics return
attributes.location as an array.
- The update throws before saving the array.
server_location remains null, and the same error repeats on every refresh until restart.
Expected behavior
When BattleMetrics changes attributes.location from null to an array, the new value should be saved and future updates should continue normally.
Environment (please complete the following information):
Docker on Synology, docker image with latest image at "master" tag
** Disclaimer **
Bug report was generated using ChatGPT.
I swear ChatGPT got dumber in last 2 months.
I had to revise this bug report so many times, lol.
Describe the bug
server_locationstays stuck atnullfor the rest of the process lifecycle.If the bot first stores
attributes.locationasnull, and BattleMetrics later returns a location array, the comparison throws before the new value is saved. Because of that,server_locationremainsnull, and the same error repeats on every scheduled BattleMetrics refresh until the container is restarted.To Reproduce
attributes.location: null.attributes.locationas an array.server_locationremainsnull, and the same error repeats on every refresh until restart.Expected behavior
When BattleMetrics changes
attributes.locationfromnullto an array, the new value should be saved and future updates should continue normally.Environment (please complete the following information):
Docker on Synology, docker image with latest image at "master" tag