SpectrixDev/bot-saber

Error handling needs to be implemented for the song command

BrightKnight02 opened this issue · 7 comments

When using the song command with a key, the bot infinitely says it's typing. Specifically, the key 13def was requested, no map was sent, and it says the bot is always typing. Entering other keys did not bring up a new map, and the bot still said it was typing.

Strange, we'll look into this and fix it ASAP. Thanks for reporting this, appriciate it.

Hey do you mind quickly trying to search for someones profile with the bot and seeing what happens?

And a side note, searching by key for songs isn't a feature that currently exists with the bot however we are considering adding it as part of our v1.1 release.

Sorry it's been a while. Kinda went to bed. Searching profiles works, we actually had been doing that and it looked like the profiles were requesting fine. We figured out pretty quickly that keys weren't supported lol. A key was just requested out of habit.

Ok cool, so I've done some testing myself and the reason that the command isn't working is because of how the bot searches for songs.

We first use BeatSavers /search/advanced endpoint, if we get a bad result from that then we use /search/text as a fallback.

The issue here is that because ids won't return anything for both endpoints, we haven't got the right error handling setup to send a message saying that the map couldn't be found.

So it's not a bug, but it's just us not having correct handling implemented.

Alright. Thank you for looking into it.

Of course :)