Fuzzy match the role command.#1202
Conversation
An arbitrary cutoff score of 80 is chosen because it works. A bug in the test for the same command is also fixed.
This prevents weird fuzz matches like `!role a b c d` working.
MarkKoz
left a comment
There was a problem hiding this comment.
It'd be nice for it to work on individual words e.g. events for events team without just reducing the threshold. That's probably too complicated. This is still fine.
Den4200
left a comment
There was a problem hiding this comment.
Everything looks and works fine!
The only thing is the output of roles are not in the given order because of the switch to sets. It's nothing major, but I'll let you decide if we want to keep the sets or switch back to lists.
kwzrd
left a comment
There was a problem hiding this comment.
Works just fine; have you considered also trying a direct substring search? That would allow for e.g. "Core Dev" to match, but it'd only make sense if the search term is n chars long. Perhaps needlessly complex, as Mark says.
|
@kosayoda we will be able to merge after you fix bot building errors and file conflicts. Please finish this off when you're available. |
|
sigh forgot to pull master before merging, at least it's not conflict inducing |
Resolves #1194.
The

!rolecommand now fuzzy matches.Duplicates are filtered.