Telegram.Bot v16.0.0-alpha.1 Release Notes
Release Date: 2021-05-01 // almost 3 years ago-
Bot API 5.1 (March 9, 2021)
Bot API 5.0 (November 4, 2020)
➕ Added
- The method
ITelegramBotClient.CreateChatInviteLinkAsync
- The method
ITelegramBotClient.EditChatInviteLinkAsync
- The method
ITelegramBotClient.RevokeChatInviteLinkAsync
- Optional parameter
revokeMessages
toITelegramBotClient.KickChatMemberAsync
- Optional parameters
canManageChat
,canManageVoiceChats
toITelegramBotClient.KickChatMemberAsync
- Property
RevokeMessages
toKickChatMemberRequest
- Properties
CanManageChat
,CanManageVoiceChats
toPromoteChatMemberRequest
- Properties
CanManageChat
,CanManageVoiceChats
toChatMember
- Properties
MessageAutoDeleteTimerChanged
,VoiceChatStarted
,VoiceChatEnded
,VoiceChatParticipantsInvited
toMessage
- ⚡️ Properties
MyChatMember
andChatMember
toUpdate
- ⚡️ Types
CreateChatInviteLinkRequest
,EditChatInviteLinkRequest
,RevokeChatInviteLinkRequest
,ChatInviteLink
,ChatMemberUpdated
,MessageAutoDeleteTimerChanged
,VoiceChatEnded
,VoiceChatParticipantsInvited
,VoiceChatStarted
- 🆕 New enum value
Bowling
forEmoji
- 🆕 New enum values
MessageAutoDeleteTimerChanged
,ProximityAlertTriggered
,VoiceChatStarted
,VoiceChatEnded
,VoiceChatParticipantsInvited
forMessageType
- 🆕 New enum values
MyChatMember
,ChatMember
forUpdateType
- Delegate
AsyncEventHandler<T>
- Methods:
ITelegramBotClient.LogOutAsync
ITelegramBotClient.CloseAsync
ITelegramBotClient.CopyMessageAsync
ITelegramBotClient.UnpinAllChatMessages
- Optional parameter
ipAddress
toITelegramBotClient.SetWebhookAsync
- ⚡️ Optional parameter
dropPendingUpdates
toITelegramBotClient.SetWebhookAsync
,ITelegramBotClient.DeleteWebhookAsync
- Optional parameter
allowSendingWithoutReply
to the methodsSendTextMessageAsync
,SendPhotoAsync
,SendVideoAsync
,SendAnimationAsync
,SendAudioAsync
,SendDocumentAsync
,SendStickerAsync
,SendVideoNoteAsync
,SendVoiceAsync
,SendLocationAsync
,SendVenueAsync
,SendContactAsync
,SendPollAsync
,SendDiceAsync
,SendInvoiceAsync
,SendGameAsync
,SendMediaGroupAsync
- Optional parameter
captionEntities
toSendTextMessageAsync
,SendPhotoAsync
,SendVideoAsync
,SendAnimationAsync
,SendAudioAsync
,SendDocumentAsync
,SendVoiceAsync
,SendPollAsync
,EditMessageTextAsync
,EditMessageCaptionAsync
- Optional parameter
isAnonymous
toITelegramBotClient.PromoteChatMemberAsync
- Optional parameter
messageId
toITelegramBotClient.UnpinChatMessageAsync
- Optional parameter
onlyIfBanned
toITelegramBotClient.UnbanChatMemberAsync
- Optional parameter
disableContentTypeDetection
toITelegramBotClient.SendDocumentAsync
- Optional parameter
heading
toITelegramBotClient.SendLocationAsync
,ITelegramBotClient.EditMessageLiveLocationAsync
- Optional parameter
proximityAlertRadius
toITelegramBotClient.SendLocationAsync
,ITelegramBotClient.EditMessageLiveLocationAsync
- Optional parameter
horizontalAccuracy
toITelegramBotClient.SendLocationAsync
,ITelegramBotClient.EditMessageLiveLocationAsync
- Optional parameters
googlePlaceId
,googlePlaceType
toITelegramBotClient.SendVenueAsync
- Property
IpAddress
toSetWebhookRequest
,WebhookInfo
- ⚡️ Property
DropPendingUpdates
toSetWebhookRequest
,DeleteWebhookRequest
- Property
AllowSendingWithoutReply
toSendMessageRequest
,SendPhotoRequest
,SendAudioRequest
,SendDocumentRequest
,SendStickerRequest
,SendVideoRequest
,SendAnimationRequest
,SendVoiceRequest
,SendVideoNoteRequest
,SendMediaGroupRequest
,SendLocationRequest
,SendVenueRequest
,SendContactRequest
,SendPollRequest
,SendDiceRequest
,SendInvoiceRequest
,SendGameRequest
- Property
CaptionEntities
toInputMediaBase
,InlineQueryResultPhoto
,InlineQueryResultGif
,InlineQueryResultMpeg4Gif
,InlineQueryResultVideo
,InlineQueryResultAudio
,InlineQueryResultVoice
,InlineQueryResultDocument
,InlineQueryResultCachedPhoto
,InlineQueryResultCachedGif
,InlineQueryResultCachedMpeg4Gif
,InlineQueryResultCachedVideo
,InlineQueryResultCachedAudio
,InlineQueryResultCachedVoice
,InlineQueryResultCachedDocument
- Property
Entities
toInputTextMessageContent
- Properties
SenderChat
,AuthorSignature
,ProximityAlertTriggered
toMessage
- Properties
Bio
,LinkedChatId
,Location
toChat
- Property
IsAnonymous
toChatMember
,PromoteChatMemberRequest
- Property
LivePeriod
toLocation
- Property
ProximityAlertRadius
toLocation
,InlineQueryResultLocation
,InputLocationMessageContent
,SendLocationRequest
,EditMessageLiveLocationRequest
,EditInlineMessageLiveLocationRequest
- Property
HorizontalAccuracy
toLocation
,InlineQueryResultLocation
,InputLocationMessageContent
,SendLocationRequest
,EditMessageLiveLocationRequest
,EditInlineMessageLiveLocationRequest
- Property
Heading
toLocation
,InlineQueryResultLocation
,SendLocationRequest
,EditMessageLiveLocationRequest
,EditInlineMessageLiveLocationRequest
- Property
MessageId
toPinChatMessageRequest
- Property
OnlyIfBanned
toUnbanChatMemberRequest
- Property
FileName
toAudio
,Video
- Property
DisableContentTypeDetection
toMakeRequestAsync
,InputMediaDocument
- Properties
GooglePlaceId
,GooglePlaceType
toSendVenueRequest
,Venue
,InlineQueryResultVenue
,InputVenueMessageContent
- 🆕 New enum values
Football
,SlotMachine
forEmoji
- Type
ChatLocation
- Type
ProximityAlertTriggered
- 👌 Support for sending and receiving audio and document albums in the method
SendMediaGroupAsync
🔄 Changed
- Constructor in
TelegramBotClient
accepts base url for custom Bot API server as optional third parameter, it accepts only URL's with protocol, host and port parts, everything else is ignored - Marked constructor for
TelegramBotClient
acceptingIWebProxy
as obsolete - Property
ITelegramBotClient.BotId
tolong?
- Event
MakingApiRequest
renamed toOnMakingApiRequest
and it's type is changed toAsyncEventHandler<ApiRequestEventArgs>
- 👀 Event
ApiResponseReceived
renamed toOnApiResponseReceived
and it's type is changed toAsyncEventHandler<ApiResponseEventArgs>
- 📄 Parameters order in following methods (to reflect official docs):
SetWebhookAsync
,DeleteWebhookAsync
,SendTextMessageAsync
,SendPhotoAsync
,SendAudioAsync
,SendDocumentAsync
,SendStickerAsync
,SendVideoAsync
,SendAnimationAsync
,SendVoiceAsync
,SendVideoNoteAsync
,SendMediaGroupAsync
,SendLocationAsync
,SendVenueAsync
,SendContactAsync
,SendPollAsync
,SendDiceAsync
,KickChatMemberAsync
,UnbanChatMemberAsync
,PromoteChatMemberAsync
,EditMessageTextAsync
,EditMessageCaptionAsync
,EditMessageLiveLocationAsync
,SendInvoiceAsync
,SendGameAsync
- 📦 Polling inside the library is now considered obsolete. The code, related to polling will be removed. It is recommended to use Telegram.Bot.Extensions.Polling package instead.
- These methods are now obsolete:
StartReceiving
,StopReceiving
- These events are now obsolete:
OnUpdate
,OnMessage
,OnMessageEdited
,OnInlineQuery
,OnInlineResultChosen
,OnCallbackQuery
,OnReceiveError
,OnReceiveGeneralError
- These fields are now obsolete:
IsReceiving
,MessageOffset
- These methods are now obsolete:
- Error
429 Too Many Request
is now handled by the client and is thrown asApiRequestException
⚠ >⚠️ WARNING! ⚠️
After one of the upcoming Bot API updates, some user identifiers will become bigger than 231 - 1 and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.
🛠 Fixed
- Incorrect property name
ExplanationCaptionEntities
->ExplanationEntities
inSendPollRequest
✂ Removed
- Obsolete overload method
ITelegramBotClient.DownloadFileAsync
- Obsolete overload method
ITelegramBotClient.SendMediaGroupAsync
- Obsolete constructor for
SendMediaGroupRequest
- Obsolete constructor for
InputMediaPhoto
- Obsolete constructor for
InputMediaVideo
- Obsolete property
AllMembersAreAdministrators
fromChat
- Obsolete property
IsForwarded
fromMessage
- Obsolete value
Animation
from enumMessageType
- The method