aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-12-18 22:28:26 +0100
committerGravatar Numerlor <[email protected]>2021-12-18 22:28:26 +0100
commit5c8adb16e868a67d896b94e1e05132fbc5cc080a (patch)
tree1c0ff497629361023b1168bb6ab7500cbd8c05a7
parentMerge 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.py5
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]