pypi aiogram 3.34.0
Bot API 10.5

one hour ago

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 SetMySettings method (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 BotFullInfo type, the new return type of GetMe, with the new fields active_usernames, inline_query_placeholder, needs_inline_query_location and has_topic_sidebar

    Changed:

    • GetMe (and Bot.get_me()) now returns BotFullInfo; the fields that were returned only by getMe are deprecated in User. Bot.me() returns the cached BotFullInfo as well. 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
    • Bot.usernames() is now built from username and active_usernames of the cached Bot.me() instead of a getChat request; the getChat fallback, its warning and the USERNAMES_RETRY_AFTER constant are removed. A Bot API server older than 10.5 that returns no active_usernames gives only the main username
    • CallbackQuery can carry inline_message_id instead of message for messages sent by the bot, depending on the callback_query_mode parameter of set_my_settings

    General

    • Added the field inviter to WriteAccessAllowed for users invited to the private chat with the bot by its owner
    • Replaced the field text with blocks in RichBlockExpandableBlockQuotation and InputRichBlockExpandableBlockQuotation; text is deprecated

    #2087

Full changelog: https://docs.aiogram.dev/en/latest/changelog.html

Don't miss a new aiogram release

NewReleases is sending notifications on new releases.