diff options
author | 2021-12-19 17:54:37 +0000 | |
---|---|---|
committer | 2021-12-19 17:54:37 +0000 | |
commit | 71c888c3de9c5383ddee55672044c0571d375875 (patch) | |
tree | 1c0ff497629361023b1168bb6ab7500cbd8c05a7 | |
parent | Merge pull request #2019 from python-discord/better-off-topic-tags (diff) | |
parent | Attempt a name only exact match if a tag with a group is searched (diff) |
Merge pull request #2023 from Numerlor/tag-try-exact-name-only
-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] |