Yuuki-Discord / Yuuki-Bot

Free and open-source general-purpose bot for Discord.
MIT License
37 stars 7 forks source link

Handle space for love command #86

Closed spotlightishere closed 3 years ago

spotlightishere commented 3 years ago

Discord clients can occasionally insert a space after a mention (i.e. yuuki love person <space> person), leading to the love command mistakenly detecting the second user as empty.

:heartpulse: MATCHMAKING :heartpulse: First - @Snoot 🐾 Second -

This may be a deeper issue than this fix handles, as the argument is passed as an empty string - perhaps it may be beneficial for commandrb to throw out empty arguments eventually? Happy to open an issue there if it's deemed odd behavior.

Erisa commented 3 years ago

perhaps it may be beneficial for commandrb to throw out empty arguments eventually?

Yeah that would probably be best and is how similar command systems deal with this issue. Will have to keep it in mind.