jainamoswal · GitHub

@jainamoswal

Copy link Copy Markdown

Contributor

Added the game_pattern parameter to CQH to enable callback_data-like support for filtering based on game_short_name.

It supports

  • CQH(pattern=None, game_patterm=None) handles any CQ → backward compatible
  • CQH(pattern=pattern, game_patterm=None) handles only CQs with .data→ backward compatible
  • CQH(pattern=None, game_patterm=pattern) handles only CQs with .game_short_name. → still backward compatible since game_pattern defaults to None
  • CQH(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 exclusive

This PR closes #4269.

Bibo-Joshi

Copy link Copy Markdown

Member

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.

@jainamoswal

­ Jãїиãм

…elegram-bot into jainamoswal-patch-1

Bibo-Joshi

Copy link Copy Markdown

Member

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 :)

@jainamoswal

Copy link Copy Markdown

Contributor Author

I have added tests here.

As a newbie can't confirm if they are accurate or need some changes.

@jainamoswal

@jainamoswal

Bibo-Joshi

­ Jãїиãм

@jainamoswal

Bibo-Joshi

Bibo-Joshi

Copy link Copy Markdown

Member

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!

@Bibo-Joshi

Read the original on github.com ↗