za419 / CadenceBot

A Discord bot for Cadence Radio
MIT License
2 stars 1 forks source link

Add Lower-Case "cadence" as an Alias for Cadence #122

Open Karenwithakay opened 1 year ago

Karenwithakay commented 1 year ago

Discord bot should accept user commands as cadence or Cadence. All commands that appear on the discord bot's help menu should be able to get accessed via lower or upper case Cadence. OR Help Menu/Description should explain that commands only work if typed out with a capital c.

As a user with no prior knowledge of the bot, it took me a hot sec to realize the commands needed to be typed out with a capital c. This would also be very useful for desktop users who don't have auto-correct/capitalization at the beginning of sentences/new messages. I imagine a desired, regular user would be using Cadence bot casually and not consider grammar as they would if writing an essay or working on a project.

:D

Karenwithakay commented 1 year ago

I realize Cadence help menu does include quotations, which mean the command has to be written WITH a capital c to work. Regardless, I still think this would be a quality of life improvement for regular users.

za419 commented 1 year ago

I realize Cadence help menu does include quotations, which mean the command has to be written WITH a capital c to work. Regardless, I still think this would be a quality of life improvement for regular users.

It does, but there are other aliases we allow: image

So it's fine. The way I see it, the way it's written in the helptext must work, but that doesn't mean only that can work (or else we wouldn't have aliases at all)

... Perhaps we should change the helptext to use code blocks instead of "quotations" though, if you feel that'd be more clear?

za419 commented 1 year ago

I believe this behavior should be configurable by the IA, and set to enabled by default (in other words, it shouldn't be hardcoded to be this way, but if you want it off you should need to open config and disable it for yourself)

Questions (not exclusively to be answered by @Karenwithakay) if other people have an opinion:

  1. Should this apply to recognition of custom commands? I won't add this for admin-only ones (it shouldn't necessarily be easy to accidentally ban someone or something like that), but we could add it for things like "Cadence introduce yourself" => "cadence introduce yourself" as long as it was done in a way that didn't remove caps (ie "cadence echo Hello World" should reply "Hello World", not "hello world" or "HELLO WORLD")
  2. Should this be configurable individually (we just add new aliases to the list above for each command), or globally (we have a setting to enable this behavior for everything at once)?
    • It's worth noting that it's already "configurable individually" using the alias mechanism - But we're talking about setting them by default for that option.
  3. Should it apply only for the first letter, or should the whole recognition be case-insensitive?
    • That is to say, should it only accept "Cadence play" and "cadence play", or should "CaDeNcE pLaY" and "cadence Play" also work?
    • It's worth noting the second one is impractical with the aliases approach - There are simply too many combinations of capitalization to alias individually. If we choose the second, we shall choose to use a global switch
    • This is not necessarily an either/or sort of option - Instead of making the global switch something like "commandCaseSensitive": true|false, we could use a "commandCaseSensitivity": "strict"|"permissive"|"none" sort of thing. We would still need to think about what the default is, but I would not mind at all letting an IA choose as they desire.