npm node-telegram-bot-api 2.5.0

47 minutes ago

Bot API 10.5 (November 22, 2026)

Bot Settings

  • Added setMySettings (inline mode, privacy mode, joining groups, topics in
    private chats, topic sidebar, callback_query_mode). has_topic_sidebar
    takes effect only while has_topics_enabled is on: otherwise Telegram
    accepts the call but getMe keeps reporting has_topic_sidebar: false.
  • Added the CallbackQueryMode const (Default, Auto, Inline), like
    ParseMode a typo-proof handle on a field that stays string:
    setMySettings({ callback_query_mode: CallbackQueryMode.Inline }).
  • Added BotFullInfo, now returned by getMe, with the new fields
    active_usernames, inline_query_placeholder, needs_inline_query_location
    and has_topic_sidebar. bot.botInfo and ctx.me are typed BotFullInfo.
  • With callback_query_mode set, callback queries from the bot's own messages
    can arrive with inline_message_id instead of message. For those,
    ctx.chat is undefined, ctx.reply throws, and matchCallback does not
    match - route them by callback_data.
  • Breaking (types): the bot-only fields (can_join_groups,
    can_read_all_group_messages, supports_inline_queries, ...) are removed
    from User, matching the docs. Read them from getMe() / bot.botInfo.

General

  • Added inviter to WriteAccessAllowed.
  • Breaking: RichBlockExpandableBlockQuotation and
    InputRichBlockExpandableBlockQuotation replace text with blocks, and
    RichMessageBuilder.expandableBlockquote now takes nested blocks (like
    blockquote) instead of rich text.

Context shortcuts

  • Added the object form ctx.reply({ text, ...options }) alongside the
    positional ctx.reply(text, options?). Both are supported; the positional
    form is not deprecated. The two share one implementation, so routing
    (business connection, forum topic, direct-messages topic), the ephemeral
    callback-reply branch and the guest_message refusal behave identically.

  • Added ctx.editMessageText(params) (text required) - edit the
    message that triggered a callback query, picking the target itself:
    callback_query.message (chat_id + message_id, with
    business_connection_id copied when the message carries one) or
    callback_query.inline_message_id for inline-mode messages. Throws if the
    update is not a callback query, or the callback carries neither - the same
    shape as answerCallbackQuery.

Full changelog: v2.4.1...v2.5.0

Don't miss a new node-telegram-bot-api release

NewReleases is sending notifications on new releases.