Closed Ernest314 closed 1 year ago
So far it's /help
and /farm
, but this will extend to other commands quickly (/tag
, possibly anything involving duration).
/mimic
also.
Since the new autocompleters don't match on wrong text (but there is rudimentary fuzzy matching), there is no need to calculate edit distance. Instead, results are sorted on match type (e.g. "starts with", "contains", "fuzzy"), and then within each type they are sorted alphabetically.
This might actually end up being better since Discord can't bold the original text in the autocomplete options, so it's kinda more readable to just sort the fuzzy matches alphabetically.
There shouldn't be too much performance impact? Could also heuristically limit autocompletes if the input text is still short (only a few characters).