From a55ed25126149d0dd092287c6e41415419f4927c Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Wed, 8 Dec 2021 17:21:36 +0000 Subject: Reduce threshold before fuzzy matching to 2 Commands such as !ot, !if, !xy are commonly used as shortcuts to their respective tags. We recently upped the threshold before fuzzy matching to 3 characters, which broke these shortcuts. This commit reduces that threshold down to 2, so users who are used to those commands can still use them. --- bot/exts/info/tags.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/exts/info/tags.py b/bot/exts/info/tags.py index 7c8d378a9..e5930a433 100644 --- a/bot/exts/info/tags.py +++ b/bot/exts/info/tags.py @@ -168,11 +168,11 @@ class Tags(Cog): """Get tags with identifiers similar to `tag_identifier`.""" suggestions = [] - if tag_identifier.group is not None and len(tag_identifier.group) >= 3: + if tag_identifier.group is not None and len(tag_identifier.group) >= 2: # Try fuzzy matching with only a name first suggestions += self._get_suggestions(TagIdentifier(None, tag_identifier.group)) - if len(tag_identifier.name) >= 3: + if len(tag_identifier.name) >= 2: suggestions += self._get_suggestions(tag_identifier) return suggestions -- cgit v1.2.3