This release adds full support for Bot API 10.5.
Upgrading: getMe now returns BotFullInfo, and so does Bot.me(). It has full_name, url, mention_html() and mention_markdown() like User, but no last_name and no other User fields: code that annotates me() as User needs the annotation changed. getMe needs a Bot API server of version 10.5 or newer (relevant for a self-hosted Local Bot API Server). Bot.usernames() no longer calls getChat.
Features
-
Added full support for Bot API 10.5
Bot Settings
New types and methods:
- Added
SetMySettingsmethod (Bot.set_my_settings) - changes the bot settings: inline mode, privacy mode, adding to groups, forum topic mode in private chats, topic sidebar and the callback query mode - Added
BotFullInfotype, the new return type ofGetMe, with the new fieldsactive_usernames,inline_query_placeholder,needs_inline_query_locationandhas_topic_sidebar
Changed:
GetMe(andBot.get_me()) now returnsBotFullInfo; the fields that were returned only by getMe are deprecated inUser.Bot.me()returns the cachedBotFullInfoas well. It hasfull_name,url,mention_html()andmention_markdown()likeUser, but nolast_nameand no otherUserfields; code that annotatesme()asUserneeds the annotation changedBot.usernames()is now built fromusernameandactive_usernamesof the cachedBot.me()instead of agetChatrequest; thegetChatfallback, its warning and theUSERNAMES_RETRY_AFTERconstant are removed. A Bot API server older than 10.5 that returns noactive_usernamesgives only the main usernameCallbackQuerycan carryinline_message_idinstead ofmessagefor messages sent by the bot, depending on thecallback_query_modeparameter ofset_my_settings
General
- Added the field
invitertoWriteAccessAllowedfor users invited to the private chat with the bot by its owner - Replaced the field
textwithblocksinRichBlockExpandableBlockQuotationandInputRichBlockExpandableBlockQuotation;textis deprecated
- Added
Full changelog: https://docs.aiogram.dev/en/latest/changelog.html