You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there should be an option to make command names case-insensitive, or do it by default.
Use Case
There are many use cases for this, and here's an example. Imagine we have a bot that configures PC builds, and includes a footer like this in one of its messages:
See /available_CPUs.
This cannot be handled if the command name passed to the filter doesn't look like the one in the message. And once it's handled the way it is displayed to the user, it can't be handled when the cases are changed, say all lower like /available_cpus.
It is case-insensitive by default in most of the other bot frameworks.
The text was updated successfully, but these errors were encountered:
We should ask the community if this is desired by default. I don't think so, but it's best to hear the opinion of many people here.
I would like to keep the command handler in the core package free of configuration options. Custom behaviour for case sensitivity can be added in grammyjs/grammY#108.
I think it makes a lot of sense for the commands plugin to support this in some way or another. That would also allow the core library to stay lean and not add too many options. There has been little demand for this, but in my personal view, the commands plugin is the right place for supporting every edge case. What do you think?
I think there should be an option to make command names case-insensitive, or do it by default.
Use Case
There are many use cases for this, and here's an example. Imagine we have a bot that configures PC builds, and includes a footer like this in one of its messages:
This cannot be handled if the command name passed to the filter doesn't look like the one in the message. And once it's handled the way it is displayed to the user, it can't be handled when the cases are changed, say all lower like
/available_cpus
.It is case-insensitive by default in most of the other bot frameworks.
The text was updated successfully, but these errors were encountered: