Considering Bender knows to respond foo (.+) regular expression but user has entered only foo. Instead of returning Command not recognized it will be better something like
Missing regex ("foo (.+)")
or
Both responses will guide user to the correct usage of commands but with slight differences: the first option probably requires modifications at respond hook and message should be created in each command; the second option can be done at Bender with difflib.SequenceMatcher.
Considering Bender knows to respond
foo (.+)regular expression but user has entered onlyfoo. Instead of returningCommand not recognizedit will be better something likeor
Both responses will guide user to the correct usage of commands but with slight differences: the first option probably requires modifications at
respondhook and message should be created in each command; the second option can be done at Bender withdifflib.SequenceMatcher.