diff options
author | 2021-12-18 22:28:26 +0100 | |
---|---|---|
committer | 2021-12-18 22:28:26 +0100 | |
commit | 5c8adb16e868a67d896b94e1e05132fbc5cc080a (patch) | |
tree | 1c0ff497629361023b1168bb6ab7500cbd8c05a7 | |
parent | Merge pull request #2019 from python-discord/better-off-topic-tags (diff) |
Attempt a name only exact match if a tag with a group is searched
-rw-r--r-- | bot/exts/info/tags.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/exts/info/tags.py b/bot/exts/info/tags.py index e5930a433..f66237c8e 100644 --- a/bot/exts/info/tags.py +++ b/bot/exts/info/tags.py @@ -275,6 +275,11 @@ class Tags(Cog): ] tag = self.tags.get(tag_identifier) + + if tag is None and tag_identifier.group is not None: + # Try exact match with only the name + tag = self.tags.get(TagIdentifier(None, tag_identifier.group)) + if tag is None and len(filtered_tags) == 1: tag_identifier = filtered_tags[0][0] tag = filtered_tags[0][1] |