-
Notifications
You must be signed in to change notification settings - Fork 2k
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.6 #2329
Bot API 7.6 #2329
Conversation
coder2020official
commented
Jul 1, 2024
•
edited
Loading
edited
- Added the classes PaidMedia, PaidMediaInfo, PaidMediaPreview, PaidMediaPhoto and PaidMediaVideo, containing information about paid media.
- Added the method sendPaidMedia and the classes InputPaidMedia, InputPaidMediaPhoto and InputPaidMediaVideo, to support sending paid media.
- Documented that the methods copyMessage and copyMessages cannot be used to copy paid media.
- Added the field can_send_paid_media to the class ChatFullInfo.
- Added the field paid_media to the classes Message and ExternalReplyInfo.
- Added the class TransactionPartnerTelegramAds, containing information about Telegram Star transactions involving the Telegram Ads Platform.
- Added the field invoice_payload to the class TransactionPartnerUser, containing the bot-specified invoice payload.
- Changed the default opening mode for Direct Link Mini Apps.
- Added support for launching Web Apps via t.me link in the class MenuButtonWebApp.
- Added the field section_separator_color to the class ThemeParams.
…diaPhoto and PaidMediaVideo, containing information about paid media.
…PaidMediaPhoto and InputPaidMediaVideo, to support sending paid media.
…sed to copy paid media.
…n about Telegram Star transactions involving the Telegram Ads Platform.
… containing the bot-specified invoice payload.
@Badiboy done with the update i think, need your review |
Will take a look |
To the review (in progress): convert_input_media_array should also isinstance the InputPaidMedia |
telebot/types.py
Outdated
data = super().to_dict() | ||
if self.thumbnail: | ||
data['thumbnail'] = self.thumbnail.to_dict() |
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.
Thumbnail is "InputFile or String"
Should be
if self.thumbnail:
data['thumbnail'] = self.thumbnail
telebot/types.py
Outdated
def to_dict(self): | ||
data = {} | ||
data['type'] = str(self.type) |
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.
Why (str) is here?
telebot/types.py
Outdated
data = {} | ||
data['type'] = str(self.type) | ||
data['media'] = str(self.media) |
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.
Why (str) is here?
telebot/types.py
Outdated
if self.duration: | ||
data['duration'] = self.duration | ||
if self.supports_streaming: |
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.
if self.supports_streaming is not None:
Done. |
@Badiboy fixed your addressed points. Also, manually tested the send_paid_media method - it worked after changing InputPaidMedia to behave like InputMedia |