Telegram Bot API 10.5 lets bots manage their own settings

Telegram has released Bot API 10.5, introducing a new method that allows bots to manage their own settings programmatically.

The new setMySettings method lets bots enable or disable inline mode, which allows users to invoke a bot by typing its @username in any chat. It also controls privacy mode, which limits what a bot can see in group chats to commands, replies to its messages and mentions. Developers can use the same method to allow or prevent a bot from being added to groups and to enable topics in private chats.

The method also lets bots display a list of private chat topics in a sidebar.

There is also a change for regular users. Bot owners can invite up to 10 people at once to a private chat with their bot using a link in the format t.me/botinvite/<bot_username>. Once invited, users can receive messages from the bot. A service message granting the bot permission to send messages identifies who sent the invitation.

The remaining changes are aimed at developers:

  • Callback queries: Developers can configure button interactions to return an inline_message_id instead of the message itself.
  • Bot information: The getMe method now returns a separate BotFullInfo object instead of User.
  • User class: Fields previously available only through getMe have been removed from the User class.
  • Expanded bot details: BotFullInfo includes all active usernames, inline query placeholder text, whether the topic sidebar is enabled and whether the bot requests users' location.
  • Expandable quotes: Expandable quotations can now contain any type of content block, not just text.

As Durov’s Code previously reported, Bot API 10.4 introduced HTML widgets and private replies visible only to the user who pressed a button.

Telegram updates Bot API to version 10.4: What’s new
Telegram Bot API 10.4 introduces interactive HTML widgets, private bot replies, formatted quotes and new usernames. Here’s what’s changed.