Update to Bot API 7.2
Added support for the Telegram Bot API 6.6 with the following changes:
- Added the ability to set different bot descriptions for different user languages using the method setMyDescription.
- Added the ability to get the current bot description in the given language as the class BotDescription using the method getMyDescription.
- Added the ability to set different bot short descriptions for different user languages using the method setMyShortDescription.
- Added the ability to get the current bot short description in the given language as the class BotShortDescription using the method getMyShortDescription.
- Added the parameter emoji to the method sendSticker to specify an emoji for just uploaded stickers.
- Added support for the creation of custom emoji sticker sets in createNewStickerSet.
- Added the parameter needsRepainting to the method createNewStickerSet to automatically change the color of emoji based on context (e.g., use text color in messages, accent color in statuses, etc.).
- Added the field needsRepainting to the class Sticker.
- Replaced the parameters pngSticker, tgsSticker, webmSticker, emojis and maskPosition in the method addStickerToSet with the parameter sticker of the type InputSticker.
- Added support for the creation of sticker sets with multiple initial stickers in createNewStickerSet by replacing the parameters pngSticker, tgsSticker, webmSticker, emojis and maskPosition with the parameters stickers and stickerFormat.
- Added support for .WEBP files in createNewStickerSet and addStickerToSet.
- Added support for .WEBP, .TGS, and .WEBM files in uploadStickerFile by replacing the parameter pngSticker in the method uploadStickerFile with the parameters sticker and stickerFormat.
- Added the method setCustomEmojiStickerSetThumbnail for editing the thumbnail of custom emoji sticker sets created by the bot.
- Added the method setStickerSetTitle for editing the title of sticker sets created by the bot.
- Added the method deleteStickerSet for complete deletion of a given sticker set that was created by the bot.
- Added the method setStickerEmojiList for changing the list of emoji associated with a sticker.
- Added the method setStickerKeywords for changing the search keywords assigned to a sticker.
- Added the method setStickerMaskPosition for changing the mask position of a mask sticker.
- Renamed the field thumb in the classes Animation, Audio, Document, Sticker, Video, VideoNote, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaVideo, StickerSet to thumbnail.
- Renamed the parameter thumb in the methods sendAnimation, sendAudio, sendDocument, sendVideo, sendVideoNote to thumbnail.
- Renamed the method setStickerSetThumb to setStickerSetThumbnail and its parameter thumb to thumbnail.
- Renamed the fields thumbUrl, thumbWidth, and thumbHeight in the classes InlineQueryResultArticle, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultLocation, and InlineQueryResultVenue to thumbnailUrl, thumbnailWidth, and thumbnailHeight respectively.
- Renamed the field thumbUrl in the classes InlineQueryResultPhoto and InlineQueryResultVideo to thumbnailUrl.
- Renamed the fields thumbUrl and thumbMimeType in the classes InlineQueryResultGif, and InlineQueryResultMpeg4Gif to thumbnailUrl and thumbnailMimeType respectively.
Added support for the Telegram Bot API 6.7 with the following changes:
- Added support for launching Web Apps from inline query results by replacing the parameters switchPmText and switchPmParameter of the method answerInlineQuery with the parameter button of type InlineQueryResultsButton.
- Added the field webAppName to the class WriteAccessAllowed.
- Added the field switchInlineQueryChosenChat of the type SwitchInlineQueryChosenChat to the class InlineKeyboardButton, which allows bots to switch to inline mode in a chosen chat of the given type.
- Added the field viaChatFolderInviteLink to the class ChatMemberUpdated.
- Added the ability to set different bot names for different user languages using the method setMyName.
- Added the ability to get the current bot name in the given language as the class BotName using the method getMyName.
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
- Added the class ExternalReplyInfo and the field externalReply of type ExternalReplyInfo to the class Message, containing information about a message that is replied to by the current message, but can be from another chat or forum topic.
- Added the class TextQuote and the field quote of type TextQuote to the class Message, which contains the part of the replied message text or caption that is quoted in the current message.
- Added the class ReplyParameters and replaced parameters replyToMessageId and allowSendingWithoutReply in the methods copyMessage, sendMessage, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendSticker, sendVideoNote, sendVoice, sendLocation, sendVenue, sendContact, sendPoll, sendDice, sendInvoice, sendGame, and sendMediaGroup with the field replyParameters of type ReplyParameters.
-
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
- Added updates about chat boost changes, represented by the classes ChatBoostUpdated and ChatBoostRemoved and the fields chatBoost and removedChatBoost in the class Update. The bot must be an administrator in the chat to receive these updates.
- Added the classes ChatBoostSourcePremium, ChatBoostSourceGiftCode and ChatBoostSourceGiveaway, representing different sources of a chat boost.
- Added the method getUserChatBoosts for obtaining the list of all active boosts a user has contributed to a chat.
-
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:
-
Integration with Business Accounts
- Added the class BusinessConnection and updates about the connection or disconnection of the bot to a business account, represented by the field businessConnection in the class Update.
- Added updates about new messages in a business account connected to the bot, represented by the field businessMessage in the class Update.
- Added updates about message edits in a business account connected to the bot, represented by the field editedBusinessMessage in the class Update.
- Added updates about message deletion in a business account connected to the bot, represented by the class BusinessMessagesDeleted and the field deletedBusinessMessages in the class Update.
- Added the method getBusinessConnection.
-
Working on Behalf of Business Accounts
- Added the parameter businessConnectionId to the methods sendMessage, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendSticker, sendVideoNote, sendVoice, sendLocation, sendVenue, sendContact, sendPoll, sendDice, sendGame, and sendMediaGroup.
- Added the parameter businessConnectionId to the method sendChatAction.
- Added the field businessConnectionId to the class Message.
- Added the field senderBusinessBot to the class Message.
-
Information about Business Accounts
- Added the class BusinessIntro and the field businessIntro to the class Chat.
- Added the class BusinessLocation and the field businessLocation to the class Chat.
- Added the classes BusinessOpeningHours and BusinessOpeningHoursInterval and the field businessOpeningHours to the class Chat.
-
Mixed-Format Sticker Packs
- Removed the fields isAnimated and isVideo from the class StickerSet.
- Added the field format to the class InputSticker.
- Removed the parameter stickerFormat from the method createNewStickerSet.
- Added the parameter format to the method setStickerSetThumbnail.
-
Request Chat Improvements
- Added the fields requestName, requestUsername, and requestPhoto to the class KeyboardButtonRequestUsers.
- Added the fields requestTitle, requestUsername, and requestPhoto to the class KeyboardButtonRequestChat.
- Added the class SharedUser and replaced the field userIds in the class UsersShared with the field users.
- Added the fields title, username, and photo to the class ChatShared.
-
Other Changes
Breaking changes are marked accordingly
Fixed #278 and the same error at 7 other occurrences