- Notifications
You must be signed in to change notification settings - Fork5.7k
Implement game_pattern support in CQH#4353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Implement game_pattern support in CQH#4353
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hi, thanks for the PR! I left some comments below.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
…elegram-bot into jainamoswal-patch-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
thanks for the new updates. the logic now lgtm - except for one comment below. please let me know when you've implemented the tests so that I can give another review :)
Uh oh!
There was an error while loading.Please reload this page.
I have added testshere. As a newbie can't confirm if they are accurate or need some changes. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM now :) thanks for the nice contribution and your cooperation in the review process!
422993b
intopython-telegram-bot:masterUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Added the
game_pattern
parameter to CQH to enablecallback_data
-like support for filtering based ongame_short_name
.It supports
CQH(pattern=None, game_patterm=None)
handles any CQ → backward compatibleCQH(pattern=pattern, game_patterm=None)
handles only CQs with.data
→ backward compatibleCQH(pattern=None, game_patterm=pattern)
handles only CQs with.game_short_name
. → still backward compatible sincegame_pattern
defaults to NoneCQH(pattern=pattern, game_patterm=game_pattern)
handles only CQs with matching.data
xor matching.game_short_name
→ also backward compatible since.data
and.game_short_name
are mutually exclusiveThis PRcloses#4269.