Implement game_pattern support in CQH#4353
Merged
Bibo-Joshi merged 28 commits intopython-telegram-bot:masterfrom Jul 13, 2024
jainamoswal:jainamoswal-patch-1
Merged
Implement game_pattern support in CQH#4353Bibo-Joshi merged 28 commits intopython-telegram-bot:masterfrom jainamoswal:jainamoswal-patch-1
Bibo-Joshi merged 28 commits intopython-telegram-bot:masterfrom
jainamoswal:jainamoswal-patch-1
Conversation
Bibo-Joshi
requested changes
Jul 7, 2024
Member
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Hi, thanks for the PR! I left some comments below.
…elegram-bot into jainamoswal-patch-1
Bibo-Joshi
reviewed
Jul 9, 2024
Member
Bibo-Joshi
left a comment
There was a problem hiding this comment.
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 :)
Contributor
Author
|
I have added tests here. As a newbie can't confirm if they are accurate or need some changes. |
Bibo-Joshi
requested changes
Jul 10, 2024
Bibo-Joshi
reviewed
Jul 11, 2024
Bibo-Joshi
approved these changes
Jul 13, 2024
Member
Bibo-Joshi
left a comment
There was a problem hiding this comment.
LGTM now :) thanks for the nice contribution and your cooperation in the review process!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added the
game_patternparameter 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_patterndefaults to NoneCQH(pattern=pattern, game_patterm=game_pattern)handles only CQs with matching.dataxor matching.game_short_name→ also backward compatible since.dataand.game_short_nameare mutually exclusiveThis PR closes #4269.