bot
bot copied to clipboard
Faulty tag suggestions
On making a typo with a tag, any additional text that was sent along with it is also sent in the "Did you mean..." embed.

The fuzzy matching also seems a bit odd here, with pste being matched to site instead of paste.
As to why it happens, https://github.com/python-discord/bot/blob/master/bot/exts/backend/error_handler.py#L208 shows that we simply use .replace on user input, we probably could simply just put the suggested command name instead of parsing whole user input and replacing it with suggestion. Would you like to work on it?
I'm busy currently; anyone is free to work on this.
The fuzzy matching also seems a bit odd here, with
pstebeing matched tositeinstead ofpaste.
Yeah, I guess difflib.get_close_matches finds multiple matches but we only chose the first one (because n is 1). With testing I found out that if the cutoff is 0.8, then it only matches paste and not site. Although that might make other matching be less accurate.
It also seems that the error handler doesn't try to make suggestions for tags, and !paste is a tag, and the cutoff isn't the problem because paste is a closer match.
Closed in 2025 review of open issues. We do not feel there is a large need for this feature.