Skip to content

[FEATURE] API 7.0 #4033

@clot27

Description

@clot27

What kind of feature are you missing? Where do you notice a shortcoming of PTB?

This is the biggest bot API update ever!, hence opening this issue to keep the track of all changes.

Important

Describe the solution you'd like

Reactions

Replies 2.0

Link Preview Customization - @harshil21

  • Added the class LinkPreviewOptions and replaced the parameter disable_web_page_preview with link_preview_options in the methods sendMessage and editMessageText.
  • Replaced the field disable_web_page_preview with link_preview_options in the class InputTextMessageContent.
  • Added the field link_preview_options to the class Message with information about the link preview options used to send the message.

Block Quotation

Multiple Message Actions @clot27

Request for multiple users @Bibo-Joshi

  • Renamed the class KeyboardButtonRequestUser to KeyboardButtonRequestUsers and added the field max_quantity to it.
  • Renamed the field request_user in the class KeyboardButton to request_users. The old name will still work for backward compatibility.
  • Added the class UsersShared.
  • Replaced the field user_shared in the class Message with the field users_shared.

Chat Boost - @harshil21

Giveaway @Bibo-Joshi

  • Added the class Giveaway and the field giveaway to the class Message for messages about scheduled giveaways.
  • Added the class GiveawayCreated and the field giveaway_created to the class Message for service messages about the creation of a scheduled giveaway.
  • Added the class GiveawayWinners and the field giveaway_winners to the class Message for messages about the completion of a giveaway with public winners.
  • Added the class GiveawayCompleted and the field giveaway_completed to the class Message for service messages about the completion of a giveaway without public winners.

Web App Changes
- [ ] Added the field SettingsButton to the class WebApp.
- [ ] Added the fields header_bg_color, accent_text_color, section_bg_color, section_header_text_color, subtitle_text_color, destructive_text_color to the class ThemeParams.

Other Changes

  • Added support for the fields emoji_status_custom_emoji_id and emoji_status_expiration_date in the class Chat for non-private chats. @Bibo-Joshi
  • Added the fields accent_color_id, background_custom_emoji_id, profile_accent_color_id, and profile_background_custom_emoji_id to the class Chat. @Bibo-Joshi
  • Added the field has_visible_history to the class Chat. @Bibo-Joshi
  • Added the class MessageOrigin and replaced the fields forward_from, forward_from_chat, forward_from_message_id, forward_signature, forward_sender_name, and forward_date with the field forward_origin of type MessageOrigin in the class Message. @clot27
  • Improved documentation for the field message of the class callbackQuery and the field pinned_message of the class Message by adding the classes MaybeInaccessibleMessage and InaccessibleMessage. @Poolitzer

Describe alternatives you've considered

If you want to contribute, you can start from the Contribution Guide.

Additional context

Please comment below before start working on any part of the update so as to keep things in track and avoid double work.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions