Skip to content

Add support to fetch rules via keywords#2261

Merged
MarkKoz merged 42 commits into
python-discord:mainfrom
shtlrs:2108-invoke-rule-command-with-keywords
Sep 21, 2022
Merged

Add support to fetch rules via keywords#2261
MarkKoz merged 42 commits into
python-discord:mainfrom
shtlrs:2108-invoke-rule-command-with-keywords

Conversation

@shtlrs
Copy link
Copy Markdown
Contributor

@shtlrs shtlrs commented Aug 19, 2022

⚠️ Note to core devs: This must be merged with python-discord/site#770 ⚠️

Amrou Bellalouna added 2 commits August 19, 2022 15:10
This doesn't change the way the rules command originally worked and keeps the priority to rule numbers. But in case a number (or numbers) is not supplied, it will try to find a rule that maps to a the supplied keyword.
@shtlrs
Copy link
Copy Markdown
Contributor Author

shtlrs commented Aug 19, 2022

This PR aims to add support to this feature.

It also depends on this PR.

As for testing, I wanted to have some level of agreement on implementation and then if I have the go, I'll add tests.

Comment thread bot/exts/info/information.py
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Amrou Bellalouna added 8 commits September 16, 2022 16:59
This doesn't change the way the rules command originally worked and keeps the priority to rule numbers. But in case a number (or numbers) is not supplied, it will try to find a rule that maps to a the supplied keyword.
…ywords' into 2108-invoke-rule-command-with-keywords
@wookie184 wookie184 changed the base branch from main to ChrisLovering-patch-2 September 16, 2022 17:47
Copy link
Copy Markdown
Contributor

@MarkKoz MarkKoz left a comment

Choose a reason for hiding this comment

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

Functionally, everything is fine. However, I have some suggestions to improve the code.

Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
Comment thread bot/exts/info/information.py Outdated
@shtlrs shtlrs requested a review from MarkKoz September 18, 2022 21:16
Comment thread bot/exts/info/information.py Outdated
@shtlrs shtlrs requested review from MarkKoz and wookie184 and removed request for MarkKoz and wookie184 September 19, 2022 16:33
Comment thread tests/bot/exts/info/test_information.py Outdated
Comment thread tests/bot/exts/info/test_information.py Outdated
Comment thread tests/bot/exts/info/test_information.py
@shtlrs shtlrs requested a review from MarkKoz September 19, 2022 22:01
Comment thread bot/constants.py Outdated
@shtlrs shtlrs requested a review from MarkKoz September 20, 2022 07:36
@MarkKoz MarkKoz merged commit 02b1f09 into python-discord:main Sep 21, 2022
@shtlrs shtlrs deleted the 2108-invoke-rule-command-with-keywords branch December 24, 2023 17:45
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.

5 participants