📦 node-telegram-bot-api 2.5.0 🤖 Bot API 10.5 support, plus two new ctx shortcuts. Two breaking changes, both mirroring Telegram: ⚠️ getMe() now returns BotFullInfo. The bot-only fields (can_join_groups, supports_inline_queries, ...) are no longer on User - read them from getMe(), bot.botInfo or ctx.me. Typing the result as User still compiles. ⚠️ Expandable block quotes take blocks instead of text: expandableBlockquote("text") -> expandableBlockquote((b) => b.paragraph("text")). ✨ setMySettings - switch inline mode, privacy mode, group joining, private-chat topics and callback_query_mode from code. ✨ ctx.editMessageText({ text, ... }) - edits the message a button was pressed on, choosing the target itself (the pressed message, or inline_message_id). The branch every callback bot had to hand-roll. ✨ ctx.reply({ text, ... }) - object form, alongside ctx.reply(text, options). Both supported. 💡 Heads-up: with callback_query_mode on, a press can arrive with no message. ctx.chat is undefined and ctx.reply throws - route by callback_data or use the new edit shortcut. 🙏 Thanks to SM-26 for the Bot API 10.5 work (#1402)! Upgrade: npm i node-telegram-bot-api@latest 📝 Changelog: https://github.com/yagop/node-telegram-bot-api/releases/tag/v2.5.0
Открыть в TelegramПосты канала Node Telegram Bot API
📦 node-telegram-bot-api 2.4.1 🔨 A small patch release with a polling fix: 🛑 longPoll() now stops yielding the rest of the current batch once its signal is aborted, including for anyone calling it directly. No more stray updates handled after you've shut polling down. 🙏 Thanks to sinzbtw for the fix (#1400)! Upgrade: npm i node-telegram-bot-api@latest 📝 Changelog: https://github.com/yagop/node-telegram-bot-api/releases/tag/v2.4.1
Открыть в Telegram🚀 node-telegram-bot-api 2.4.0 is out! 📦 Bot API 10.4 ✨ • 🧩 Widgets: sendWidget, answerWidgetQuery, live shared widgets • 👻 Ephemeral replies to a button tap with just callback_query_id, no chat_id • 💬 Quote parts of rich messages with quote_rich_texts • 💎 TON wallet cards, chat share themes, getUniqueGift 🛡 Stricter types: a send without chat_id is now a compile error unless it's an ephemeral callback reply. If you wrap the send param types with Omit, switch to the new DistributiveOmit. ⏰ Rate limiter fix: rateLimit: { global, perChat } now respects both limits at send time. 🙏 Thanks to SM-26 for the Bot API 10.4 support (#1391) and to kgeminicdev for reporting the rate limiter bug (#1390)! 📝 Changelog: https://github.com/yagop/node-telegram-bot-api/releases/tag/v2.4.0 npm i [email protected]
Открыть в Telegram🚀 node-telegram-bot-api 2.3.0 is out! ✨ 🗄 S3 session storage: S3SessionStorage keeps sessions in AWS S3, Cloudflare R2, MinIO or Spaces. It talks to S3 directly over fetch, so it runs on Node, Bun, Deno, Workers and edge. 🎯 Commands for the right bot: /start@other_bot no longer runs your handler. Your bot's identity is available as bot.botInfo / ctx.me. 💬 Smarter ctx.reply(): replies stay in the same business connection and forum topic as the incoming message. 🛑 Clean shutdowns: stopping the bot (Ctrl+C, a deploy's SIGTERM) mid-handler no longer makes Telegram redeliver that update on restart. 🔧 File uploads work on Node 18 again. 🙏 Thanks kgeminicdev & vladosskins178 for their reports and comments 📖 Release notes and upgrade tips: https://github.com/yagop/node-telegram-bot-api/releases/tag/v2.3.0 npm i [email protected]
Открыть в Telegram🚀 node-telegram-bot-api 2.2.0 is out! 🗂 Sessions - createSession() + ctx.getSession(), with Memory, File, SQLite, SQL and Redis stores (new /bun subpath). See Session example in 16-sessions 💬 Reply & callback tracking that survives restarts and works on serverless - expectReply, matchCallback, taggedReplies ♻️ Bot lifecycle - bot.init() / bot.close() for middleware that owns resources 🛡 Polling survives 409 Conflict, webhook shutdown can't hang, run({ exitOnError }) 🔨 Fix: reset sticky RegExp state in Bot.hears() . Thanks sinzbtw 🔒 reply_markup accepts only one markup object (stricter types) Everything new is opt-in - 2.1.0 bots run unchanged. 📦 npm i node-telegram-bot-api 📝 https://github.com/yagop/node-telegram-bot-api/releases/tag/v2.2.0
Открыть в Telegram🚀 node-telegram-bot-api 2.1.0 is out! Full Bot API 10.3 support, plus new fluent builders for rich content: ✨ RichTextBuilder - build the recursive RichText tree (bold/italic/code/url/mention/custom emoji/...), nesting with plain strings or nested builders 🧱 RichMessageBuilder - compose sendRichMessage blocks (lists, blockquotes, collages, slideshows, details), with InputFiles hoisted automatically 🔘 RichMessageButtonBuilder + richMessageButton / richCaption / richTableCell / richListItem helpers. Also in Bot API 10.3: ephemeral messages 👻, DisabledButton + disabled inline buttons, force_reply on markup, stopped_message_generation updates, and more. 📦 npm i [email protected] 📝 Changelog: https://github.com/yagop/node-telegram-bot-api/releases/tag/v2.1.0
Открыть в Telegram🚀 node-telegram-bot-api v2.0.0 is out! ⚡ Runtime-agnostic core for Node.js, Bun, Deno, Cloudflare Workers, and other edge runtimes. 🧩 Koa-style middleware with per-update Context, filters, commands, and error boundaries. 🛠 New builders for inline keyboards, entities, media groups, stories, stickers, and more. 👻 Ephemeral Messages, Rich Messages, Communities, and payment subscription updates are included. 📦 npm i node-telegram-bot-api 🔄 Migration guide 📝 Release notes
Открыть в Telegram🚀 node-telegram-bot-api v1.2.0 is out - with Bot API 10.2 support! 👻 Ephemeral Messages: send group messages only one user can see: bot.sendMessage(chatId, "hi", { receiver_user_id: userId }) Plus new methods to manage them: editEphemeralMessageText, editEphemeralMessageMedia, editEphemeralMessageCaption, editEphemeralMessageReplyMarkup and deleteEphemeralMessage. 📝 Rich Messages: new block-based formatting via InputRichMessage.blocks (paragraphs, headings, tables, collages, slideshows, maps and more), and explicit media with InputRichMessageMedia. 👥 Communities: initial support for linked supergroups/channels: new Community type, community_chat_added / community_chat_removed events and ChatFullInfo.community. ⭐ Also: BotSubscriptionUpdated updates for payment subscription changes. 📦 npm i node-telegram-bot-api 📝 Release notes: v1.2.0
Открыть в Telegram🛠 node-telegram-bot-api v1.1.2 is out - CommonJS support 📦 Dual ESM + CommonJS build • ESM imports keep working unchanged • CommonJS can now use require() again • ships matching .d.ts / .d.cts typings 🗺 Source maps • emitted for both ✨ ESM and CJS builds 📦 npm i [email protected] 📝 Changelog: v1.1.2
Открыть в Telegram🛠 node-telegram-bot-api v1.1.1 is out - focused fixes for proxies, media edits, and stickers! 🌐 Per-bot custom transport • request.fetch for custom fetch implementations • request.fetchOptions for undici dispatchers / per-instance proxies • no more process-wide setGlobalDispatcher needed 🖼 Better editMessageMedia uploads • media now accepts Buffer / stream / local path • thumbnail / cover uploads work too • file_id / URL usage stays unchanged 🎨 Sticker set fixes • createNewStickerSet / addStickerToSet now use the current Bot API shape • no more legacy png_sticker / emojis fields • supports attach:// uploads for sticker files 📦 npm i [email protected] 📝 Changelog: v1.1.1
Открыть в Telegram🚀 node-telegram-bot-api v1.1.0 is out — with full Bot API 10.1 support! ✨ Rich Messages • sendRichMessage / sendRichMessageDraft • editMessageText now accepts rich_message (new single-object call) • new InputRichMessage type, auto-serialized 🤝 Join Request Queries • answerChatJoinRequestQuery • sendChatJoinRequestWebApp 📦 npm i [email protected] 📝 Changelog: v1.1.0 Big thanks to danielperez9430 for landing the 10.1 work! 🙌
Открыть в Telegram🚀 node-telegram-bot-api v1.0.0 is out! Fully rewritten in TypeScript 🎉 🔷 Bundled types - drop @types/node-telegram-bot-api 🧩 Types auto-generated from the official Bot API docs 📦 ESM-only Node.js 18+ 🤖 Latest Bot API coverage + new sendLivePhoto 🕊 Dependency free ⚠️ Breaking changes from 0.6x - read the migration guide first 👇 https://github.com/yagop/node-telegram-bot-api/blob/master/CHANGELOG.md#migrating-from-v067x 📥 npm i node-telegram-bot-api
Открыть в Telegram🎉 New release v0.67.0 🎉 Added: 1. Support Telegram Bot API v7.4 (by @danielperez9430) * #refundStarPayment 2. Support Telegram Bot API 7.6 (@danielperez9430) * #sendPaidMedia 3. Support Telegram Bot API v7.9 (by @danielperez9430) 4. Support Telegram Bot API v7.10 (by @danielperez9430) * Update: purchased_paid_media 5. Support Telegram Bot API v8.0 and v8.1 * #savePreparedInlineMessage (@IsmailBinMujeeb) * #setUserEmojiStatus (@danielperez9430) * #editUserStarSubscription (@danielperez9430) * #getAvailableGifts (@danielperez9430) * #sendGift (@danielperez9430) 6. Support Telegram Bot API v8.2, v8.3 (@danielperez9430) * #verifyUser * #verifyChat * #removeUserVerification * #removeChatVerification 7. Support Telegram Bot API v8.3 (by @danielperez9430) 8. Support Telegram Bot API v9.0 (by @danielperez9430) * #readBusinessMessage * #deleteBusinessMessages * #setBusinessAccountName * #setBusinessAccountUsername * #setBusinessAccountBio * #setBusinessAccountProfilePhoto * #removeBusinessAccountProfilePhoto * #setBusinessAccountGiftSettings * #getBusinessAccountStarBalance * #transferBusinessAccountStars * #getBusinessAccountGifts * #convertGiftToStars * #upgradeGift * #transferGift * #postStory * #editStory * #deleteStory * #giftPremiumSubscription 9. Support Telegram Bot API v9.1 (by @danielperez9430) * #sendChecklist * #editMessageChecklist * #getMyStarBalance Fixed: 1. Reference causing error in FatalError (by @ivanjh) 2. Stringify scope field in #deleteMyCommands (by @XC-Zhang) 3. Stringify allowed_updates field in #getUpdates (by @alfanzain) 4. Stringify message_ids in #forwardMessages (by @qiaoshouzi) 5. Rename parameter thumb to thumbnail (by @0x114514BB) 6. Remove travis badge (by @melroy89) 7. Improve documentation on events (by @programminghoch10) 8. Fix Telegram invite group link (by @melroy89)
Открыть в TelegramNew release v0.66.0 Support Telegram Bot API 7.2 & 7.3 (@danielperez9430) - getBusinessConnection - replaceStickerInSet Support for updates: (@danielperez9430) - business_connection - business_message - edited_business_message - deleted_business_messages Minor fixes: (@danielperez9430) - getUserChatBoosts
Открыть в TelegramNew release v0.65.1 🎉 1. Support for updates (@danielperez9430) message_reaction message_reaction_count chat_boost removed_chat_boost https://www.npmjs.com/package/node-telegram-bot-api
Открыть в TelegramNew release v0.65.0 🎉 1. Support Telegram Bot API v7.1 deleteMessages (@Sp3ricka) copyMessages (@xjx0106 & @Sp3ricka) setMessageReaction (@Sp3ricka) forwardMessages (@danielperez9430) getUserChatBoosts (@danielperez9430) 2. Minor changes: (@danielperez9430) Refactor methods order Fix copyMessages & setMessageReaction methods Added missing tests Fix tests for methods copyMessages & getMyDefaulAdministratorRights https://www.npmjs.com/package/node-telegram-bot-api
Открыть в TelegramNew release v0.51.0 Added: 1. Support Bot API v5.0: (by @danielperez9430) * Add method *copyMessage()* * Add method *unpinAllChatMessages()* * Add method *close()* * Add method *logOut()* Changed: (by @danielperez9430) * Remove trailing-spaces * Fix Bugs in Test New Test: (by @danielperez9430) * copyMessage * unpinAllChatMessages ✨ Special thanks to @kamikazechaser and @danielperez9430 ✨
Открыть в TelegramNew release v0.50.0 Added: Support Bot API v4.8: (by @danielperez9430) Add methods: sendDice() Support Bot API v4.7: (by @danielperez9430) Add methods: getMyCommands(),setMyCommands() Support Bot API v4.5: (by @danielperez9430) Add methods: setChatAdministratorCustomTitle() Support Bot API v4.4: (by @danielperez9430) Add methods: setChatPermissions() Support for poll_answer (by @JieJiSS) Add request options in file stream (by @zhangpanyi ) Changed: (by @danielperez9430) New message type: dice Fix Bugs in tests Fix regex compare (by @ledamint) Fix listening for error events when downloading files (by @Kraigo)
Открыть в TelegramNew Release, v0.30.0 (https://github.com/yagop/node-telegram-bot-api/releases/tag/v0.30.0): Added: 1. Support Bot API v3.5: (by @GochoMugo) - Allow provider_data parameter in TelegramBot#sendInvoice - Add method TelegramBot#sendMediaGroup() 2. Support Bot API v3.4: (by @kamikazechaser) - Add methods TelegramBot#editMessageLiveLocation, TelegramBot#stopMessageLiveLocation (#439) - Add methods TelegramBot#setChatStickerSet, TelegramBot#deleteChatStickerSet (#440) 3. Add methods: - TelegramBot#getFileStream (#442) (by @GochoMugo, requested-by @Xaqron) 4. Add options to TelegramBot#stopPolling() (by @GochoMugo) 5. Add metadata argument in message event (and friends e.g. text, audio, etc.) (#409) (by @jlsjonas, @GochoMugo) 6. Add forward-compatibility i.e. support future additional Telegram options (by @GochoMugo) 7. Add support for Node.js v9 (by @GochoMugo) 8. Document TelegramBot.errors, TelegramBot.messageTypes (by @GochoMugo) Changed: 1. Update TelegramBot#answerCallbackQuery() signature (by @GochoMugo) 2. Improve default error logging of polling_error and webhook_error (#377) 3. Update dependencies Deprecated: 1. Sending files: (See [usage guide][usage-sending-files]) (by @hufan-akari, @GochoMugo) - Error will not be thrown if Buffer is used and file-type could not be detected. - Filename will not be set to data.${ext} if Buffer is used - Content type will not default to null or undefined Fixed: 1. Fix the offset infinite loop bug (#265, #36) (by @GochoMugo) 2. Fix game example (#449, #418) (by @MCSH) Happy holidays! From the NTBA contributors.
Открыть в TelegramNew Release, v0.29.0 Added: 1. Add Bot API v3.2 methods: * (#429) TelegramBot#getStickerSet (by @CapacitorSet, @LibertyLocked) * (#430) TelegramBot#uploadStickerFile (by @CapacitorSet) * TelegramBot#createNewStickerSet, TelegramBot#addStickerToSet, TelegramBot#setStickerPositionInSet, TelegramBot#deleteStickerFromSet (by @GochoMugo) 2. Supports API v3.3 Deprecated: 1. Auto-enabling Promise cancellation (#319) (by @GochoMugo)
Открыть в Telegram