diff options
| -rw-r--r-- | bot/exts/info/tags.py | 23 | 
1 files changed, 9 insertions, 14 deletions
| diff --git a/bot/exts/info/tags.py b/bot/exts/info/tags.py index b7c361c78..909831bc7 100644 --- a/bot/exts/info/tags.py +++ b/bot/exts/info/tags.py @@ -162,21 +162,16 @@ class Tags(Cog):      def get_fuzzy_matches(self, tag_identifier: TagIdentifier) -> list[tuple[TagIdentifier, Tag]]:          """Get tags with identifiers similar to `tag_identifier`.""" -        if tag_identifier.group is None: -            if len(tag_identifier.name) < 3: -                return [] -            else: -                return self._get_suggestions(tag_identifier) -        else: -            if len(tag_identifier.group) < 3: -                suggestions = [] -            else: -                # Try fuzzy matching with only a name first -                suggestions = self._get_suggestions(TagIdentifier(None, tag_identifier.group)) +        suggestions = [] + +        if tag_identifier.group is not None and len(tag_identifier.group) >= 3: +            # Try fuzzy matching with only a name first +            suggestions += self._get_suggestions(TagIdentifier(None, tag_identifier.group)) + +        if len(tag_identifier.name) >= 3: +            suggestions += self._get_suggestions(tag_identifier) -            if len(tag_identifier.name) >= 3: -                suggestions += self._get_suggestions(tag_identifier) -            return suggestions +        return suggestions      def _get_tags_via_content(              self, | 
