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

Update to Bot API 7.2 #300

Merged
merged 11 commits into from
Jun 10, 2024
Merged

Update to Bot API 7.2 #300

merged 11 commits into from
Jun 10, 2024

Conversation

llnulldisk
Copy link
Contributor

@llnulldisk llnulldisk commented Apr 14, 2024

Added support for the Telegram Bot API 6.6 with the following changes:

Added support for the Telegram Bot API 6.7 with the following changes:

Added support for the Telegram Bot API 6.8 with the following changes:

  • Added the field story to the class Message for messages with forwarded stories. Currently, it holds no information.
  • Added the field voterChat to the class PollAnswer, to contain channel chat voters in Polls. For backward compatibility, the field user in such objects will contain the user 136817688 (@Channel_Bot).
  • Added the field emojiStatusExpirationDate to the class Chat.
  • Added the method unpinAllGeneralForumTopicMessages.

Added support for the Telegram Bot API 6.9 with the following changes:

  • Added the new administrator privileges canPostStories, canEditStories and canDeleteStories to the classes ChatMemberAdministrator and ChatAdministratorRights.
  • Added the parameters canPostStories, canEditStories and canDeleteStories to the method promoteChatMember. Currently, bots have no use for these privileges besides assigning them to other administrators.
  • Added the ability to set any header color for Web App using the method setHeaderColor.
  • Added Web App events writeAccessRequested and contactRequested.
  • Added the fields fromRequest and fromAttachmentMenu to the class WriteAccessAllowed.

Added support for the Telegram Bot API 7.0 with the following changes:

  • Reactions

    • Added the classes ReactionTypeEmoji and ReactionTypeCustomEmoji representing different types of reaction.
    • Added updates about a reaction change on a message with non-anonymous reactions, represented by the class MessageReactionUpdated and the field messageReaction in the class Update. The bot must explicitly allow the update to receive it.
    • Added updates about reaction changes on a message with anonymous reactions, represented by the class MessageReactionCountUpdated and the field messageReactionCount in the class Update. The bot must explicitly allow the update to receive it.
    • Added the method setMessageReaction that allows bots to react to messages.
    • Added the field availableReactions to the class Chat.
  • Replies 2.0

  • Link Preview Customization

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

    • Added the method deleteMessages to allow the deletion of multiple messages in a single request.
    • Added the method forwardMessages for forwarding of multiple messages in a single request.
    • Added the method copyMessages for copying of multiple messages in a single request.
  • Request for multiple users

    • Renamed the class KeyboardButtonRequestUser to KeyboardButtonRequestUsers and added the field maxQuantity to it.
    • Renamed the field requestUser in the class KeyboardButton to requestUsers. The old name will still work for backward compatibility.
    • Added the class UsersShared.
    • Replaced the field userShared in the class Message with the field usersShared.
  • Chat Boost

  • Giveaway

    • Added the class Giveaway and the field giveaway to the class Message for messages about scheduled giveaways.
    • Added the class GiveawayCreated and the field giveawayCreated to the class Message for service messages about the creation of a scheduled giveaway.
    • Added the class GiveawayWinners and the field giveawayWinners to the class Message for messages about the completion of a giveaway with public winners.
    • Added the class GiveawayCompleted and the field giveawayCompleted to the class Message for service messages about the completion of a giveaway without public winners.
  • Other Changes

    • Added support for the fields emojiStatusCustomEmojiId and emojiStatusExpirationDate in the class Chat for non-private chats.
    • Added the fields accentColorId, backgroundCustomEmojiId, profileAccentColorId, and profileBackgroundCustomEmojiId to the class Chat.
    • Added the field hasVisibleHistory to the class Chat.
    • Added the class MessageOrigin and replaced the fields forwardFrom, forwardFromChat, forwardFromMessageId, forwardSignature, forwardSenderName, and forwardDate with the field forwardOrigin of type MessageOrigin in the class Message.

Added support for the Telegram Bot API 7.1 with the following changes:

  • Added the class ChatBoostAdded and the field boostAdded to the class Message for service messages about a user boosting a chat.
  • Added the field senderBoostCount to the class Message.
  • Added the field replyToStory to the class Message.
  • Added the fields chat and id to the class Story.
  • Added the field unrestrictBoostCount to the class Chat.
  • Added the field customEmojiStickerSetName to the class Chat.

Added support for the Telegram Bot API 7.2 with the following changes:

Breaking changes are marked accordingly

Fixed #278 and the same error at 7 other occurrences

@llnulldisk llnulldisk changed the title Update to Bot API 6.6 Update to Bot API 6.7 Apr 14, 2024
@llnulldisk llnulldisk marked this pull request as draft April 15, 2024 12:22
@llnulldisk llnulldisk changed the title Update to Bot API 6.7 Update to Bot API 7.2 Apr 15, 2024
@llnulldisk llnulldisk marked this pull request as ready for review April 22, 2024 18:21
Copy link
Owner

@reo7sp reo7sp left a comment

Choose a reason for hiding this comment

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

Thank you very much!

@reo7sp reo7sp merged commit 986a7b5 into reo7sp:master Jun 10, 2024
1 check passed
@egorpugin
Copy link
Contributor

@llnulldisk do you generate api changes or write them manually?

@llnulldisk
Copy link
Contributor Author

@llnulldisk do you generate api changes or write them manually?

Currently I'm still working on a script to generate the changes. With some manual changes I can already generate all the type headers and TgTypeParser. I still write all api methods manually, as they are somewhat more complex.

@egorpugin
Copy link
Contributor

@llnulldisk

You could check out my parser for reference/infos. Generator is also there.
https://github.com/egorpugin/tgbot/tree/master/tools

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

Successfully merging this pull request may close these issues.

editMessageReplyMarkup will always throw for default values
3 participants