Skip to content

Try an exact match with only the name when a tag with a group is searched#2023

Merged
jb3 merged 1 commit into
python-discord:mainfrom
Numerlor:tag-try-exact-name-only
Dec 19, 2021
Merged

Try an exact match with only the name when a tag with a group is searched#2023
jb3 merged 1 commit into
python-discord:mainfrom
Numerlor:tag-try-exact-name-only

Conversation

@Numerlor
Copy link
Copy Markdown
Contributor

Currently, a tag is directly returned when it has an exact match even when there are matched fuzzy alternatives, but this does not attempt the exact match on only the name if the tag has a group. This causes issues if the user invokes a tag with some text after it which is considered as the tag's name.

The PR adds an additional search with only the tag's name without a group when the first lookup of the original identifier fails

@Numerlor Numerlor requested review from Den4200 and jb3 as code owners December 18, 2021 21:32
Copy link
Copy Markdown
Contributor

@janine9vn janine9vn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm!

I tested this with a couple of different combos of tags + text after including with a tag group (dpy tag group) and everything works as expected.

@jb3 jb3 merged commit 71c888c into python-discord:main Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants