Most likely due to probably this line inside the toObject utility:
https://github.com/grammyjs/commands/blob/63bc0fa0e770e4c2e3955df3f99fb13e493607d6/src/command.ts#L306
Is there any particular reason why we are converting to RegExp the languages keys inside the Command._languages map? Seems unnecessary, since the regExp characteristics are not being used anywhere. I looked up the matchOnlyAtStart option and the fuzzySearch method and they don't depend on regExp usage neither
With a sample bot using something in the lines:
throws:
Most likely due to probably this line inside the toObject utility: https://github.com/grammyjs/commands/blob/63bc0fa0e770e4c2e3955df3f99fb13e493607d6/src/command.ts#L306 Is there any particular reason why we are converting to RegExp the languages keys inside the Command._languages map? Seems unnecessary, since the regExp characteristics are not being used anywhere. I looked up the
matchOnlyAtStart
option and thefuzzySearch
method and they don't depend on regExp usage neither