LeaPhant / flowabot

Modular Discord bot with fun features including twitch commands and advanced osu! commands. 🌷
MIT License
111 stars 33 forks source link

error in rendering #21

Closed zivoy closed 5 years ago

zivoy commented 5 years ago
/home/ziv132/bot/renderer/beatmap_preprocessor.js:145
    return Math.sqrt((hitObject2[0] - hitObject1[0]) * (hitObject2[0] - hitObject1[0])
                                                ^

TypeError: Cannot read property '0' of undefined
    at vectorDistance (/home/ziv132/bot/renderer/beatmap_preprocessor.js:145:49)
    at processBeatmap (/home/ziv132/bot/renderer/beatmap_preprocessor.js:523:16)
    at /home/ziv132/bot/renderer/beatmap_preprocessor.js:682:9
    at ReadStream.<anonymous> (/home/ziv132/bot/node_modules/osu-parser/index.js:456:7)
    at ReadStream.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

the command was !fail on the stream part of A FOOL MOON NIGHT [emillistream]

LeaPhant commented 5 years ago

Thank you for reporting! Fixed in https://github.com/LeaPhant/flowabot/commit/f57e9570f4ffc4310020cbcf06fe7eed2f453893.