frc868 / flick

Flick, a multi-purpose bot for the TechHOUNDS Discord.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Implement Fuzzy String Searching for the ;division Command #5

Open aryker opened 4 years ago

aryker commented 4 years ago

Currently, Flick only assigns a division if the argument provided with the ;division command matches the Discord role name for that division exactly. This has caused a bit of difficulty for some students trying to assign themselves to a division.

Implement fuzzy string searching so that Flick is more tolerant of typos and slight mismatches in these arguments (e.g. robotops vs. Robot Ops).

In addition, we should support a few alternate strings that match to these roles that people might enter as arguments to this command. For example:

ralsei commented 4 years ago

This was half-solved with e8acc738c97627d69e645f09662b720b7b3cddf5, but it doesn't include the alternate strings stuffs. That'll probably require me to hard-code a list of divisions in config.yaml. I'm not complaining, since that actually makes the code simpler, but whatever.