Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bot API 7.10 #2395

Merged
merged 7 commits into from
Sep 18, 2024
Merged

bot API 7.10 #2395

merged 7 commits into from
Sep 18, 2024

Conversation

coder2020official
Copy link
Collaborator

@coder2020official coder2020official commented Sep 6, 2024

@coder2020official
Copy link
Collaborator Author

Done. All others are related to webapps.
@Badiboy review plz

@Badiboy
Copy link
Collaborator

Badiboy commented Sep 6, 2024

Got it

@coder2020official
Copy link
Collaborator Author

@Badiboy u done reviewing?

@Badiboy
Copy link
Collaborator

Badiboy commented Sep 14, 2024

@coder2020official Sorry, hard week

@@ -530,7 +530,7 @@ def send_paid_media(
token, chat_id, star_count, media,
caption=None, parse_mode=None, caption_entities=None, show_caption_above_media=None,
disable_notification=None, protect_content=None, reply_parameters=None, reply_markup=None,
business_connection_id=None):
business_connection_id=None, media_payload=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why parameter named "media_payload", but not "payload"?

I propose to set it to "payload" to keep naming consistency, and rename internal "payload" to something else. May be "_payload".

@@ -520,7 +520,7 @@ async def send_paid_media(
token, chat_id, star_count, media,
caption=None, parse_mode=None, caption_entities=None, show_caption_above_media=None,
disable_notification=None, protect_content=None, reply_parameters=None, reply_markup=None,
business_connection_id=None):
business_connection_id=None, media_payload=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same here.

telebot/types.py Outdated
@@ -9479,11 +9499,12 @@ def de_json(cls, json_string):
obj['user'] = User.de_json(obj.get('user'))
return cls(**obj)

def __init__(self, source, giveaway_message_id, user=None, is_unclaimed=None, **kwargs):
def __init__(self, source, giveaway_message_id, user=None, is_unclaimed=None, prize_star_count=None, **kwargs):
self.source: str = source
self.giveaway_message_id: int = giveaway_message_id
self.user: User = user
Copy link
Collaborator

Choose a reason for hiding this comment

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

user should be Optional

telebot/types.py Outdated
@@ -9479,11 +9499,12 @@ def de_json(cls, json_string):
obj['user'] = User.de_json(obj.get('user'))
return cls(**obj)

def __init__(self, source, giveaway_message_id, user=None, is_unclaimed=None, **kwargs):
def __init__(self, source, giveaway_message_id, user=None, is_unclaimed=None, prize_star_count=None, **kwargs):
self.source: str = source
self.giveaway_message_id: int = giveaway_message_id
self.user: User = user
self.is_unclaimed: bool = is_unclaimed
Copy link
Collaborator

Choose a reason for hiding this comment

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

is_unclaimed should be Optional

@Badiboy
Copy link
Collaborator

Badiboy commented Sep 14, 2024

Also need to add "purchased_paid_media" to util.update_types.

And please, bump the version also )

@coder2020official
Copy link
Collaborator Author

Version is 4.23.0 which is still unreleased, no need for bumping

@coder2020official
Copy link
Collaborator Author

@Badiboy done, please check and comment if needed;

@Badiboy Badiboy merged commit 6aab790 into eternnoir:master Sep 18, 2024
7 checks passed
@Badiboy
Copy link
Collaborator

Badiboy commented Sep 18, 2024

I propose to push a release.

@coder2020official
Copy link
Collaborator Author

I don't mind, I think it is the time to do so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants