Skip to content

Bump node-telegram-bot-api from 0.66.0 to 2.0.0 in /telegram-bot - #6

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/telegram-bot/node-telegram-bot-api-2.0.0
Closed

Bump node-telegram-bot-api from 0.66.0 to 2.0.0 in /telegram-bot#6
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/telegram-bot/node-telegram-bot-api-2.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 24, 2026

Copy link
Copy Markdown

Bumps node-telegram-bot-api from 0.66.0 to 2.0.0.

Release notes

Sourced from node-telegram-bot-api's releases.

2.0.0

Bot API 10.2 (July 14, 2026)

Rich Messages

  • Added InputRichMessageMedia, InputMediaVoiceNote, InputRichBlock, InputRichBlockListItem, and the 21 input rich-block variants.
  • Added media and blocks to InputRichMessage.

Ephemeral Messages

  • Added editEphemeralMessageText, editEphemeralMessageMedia, editEphemeralMessageCaption, editEphemeralMessageReplyMarkup, and deleteEphemeralMessage.
  • Added ephemeral targeting parameters to the 13 supported send methods and ephemeral-message fields to BotCommand, Message, and ReplyParameters.

Communities

  • Added Community, CommunityChatAdded, CommunityChatRemoved, and their related Message and ChatFullInfo fields.

General

  • Added BotSubscriptionUpdated and the subscription update type.

v2 is a from-scratch redesign with no backward compatibility with the v1 TelegramBot surface. There is no shim - the table below is the migration path. The core is runtime-agnostic (Node 18+, Bun, Deno, Cloudflare Workers, Vercel/Deno Edge); the client is a single generated Api class; dispatch is koa-style middleware over a per-update Context.

Migrating from v1

Before (v1) After (v2)
const TelegramBot = require('node-telegram-bot-api') import { Bot } from 'node-telegram-bot-api' (or const { Bot } = require(...) - both work)
new TelegramBot(token, { polling: true }) const bot = new Bot(token); bot.startPolling()
new TelegramBot(token) (for raw API calls) const bot = new Bot(token); await bot.api.getMe()
request.fetchOptions.dispatcher / proxy options inject a custom Undici fetch: new Bot(token, { fetch: (url, init) => fetch(url, { ...init, dispatcher }) })
bot.on('message', msg => ...) bot.on('message', ctx => ...) - a router over Context, not an EventEmitter
bot.onText(/\/echo (.+)/, (msg, m) => ...) bot.hears(/\/echo (.+)/, ctx => { ctx.match[1] })
bot.onReplyToMessage(chatId, msgId, ...) middleware reading ctx.message.reply_to_message
bot.sendMessage(chatId, text, opts) bot.api.sendMessage({ chat_id, text, ...opts }) or, in a handler, ctx.reply(text, opts)
bot.sendMessage(id, t, { reply_markup: { inline_keyboard: [...] } }) ctx.reply(t, { reply_markup: new InlineKeyboardBuilder().text('A','a').build() })
{ reply_markup: JSON.stringify(markup) } (manual) a plain object { inline_keyboard: [...] } or a builder .build() - the field is a plain typed object; the pipeline serializes it
bot.sendPhoto(id, '/path/to/p.jpg') bot.api.sendPhoto({ chat_id, photo: await fromPath('/path/to/p.jpg') }) (from 'node-telegram-bot-api/node')
bot.sendPhoto(id, fs.createReadStream(...)) bot.api.sendPhoto({ chat_id, photo: new InputFile(bytes) })
bare string = path or file_id (via options.filepath) a bare string is always a file_id/URL; bytes go through new InputFile()/fromPath()
bot.sendMediaGroup(id, [{ type:'photo', media: stream }]) bot.api.sendMediaGroup({ chat_id, media: [{ type:'photo', media: new InputFile(bytes) }] }) (or the MediaGroupBuilder)

... (truncated)

Changelog

Sourced from node-telegram-bot-api's changelog.

[2.0.0][2.0.0] - 2026-08-16

Bot API 10.2 (July 14, 2026)

Rich Messages

  • Added InputRichMessageMedia, InputMediaVoiceNote, InputRichBlock, InputRichBlockListItem, and the 21 input rich-block variants.
  • Added media and blocks to InputRichMessage.

Ephemeral Messages

  • Added editEphemeralMessageText, editEphemeralMessageMedia, editEphemeralMessageCaption, editEphemeralMessageReplyMarkup, and deleteEphemeralMessage.
  • Added ephemeral targeting parameters to the 13 supported send methods and ephemeral-message fields to BotCommand, Message, and ReplyParameters.

Communities

  • Added Community, CommunityChatAdded, CommunityChatRemoved, and their related Message and ChatFullInfo fields.

General

  • Added BotSubscriptionUpdated and the subscription update type.

v2 is a from-scratch redesign with no backward compatibility with the v1 TelegramBot surface. There is no shim - the table below is the migration path. The core is runtime-agnostic (Node 18+, Bun, Deno, Cloudflare Workers, Vercel/Deno Edge); the client is a single generated Api class; dispatch is koa-style middleware over a per-update Context.

Migrating from v1

Before (v1) After (v2)
const TelegramBot = require('node-telegram-bot-api') import { Bot } from 'node-telegram-bot-api' (or const { Bot } = require(...) - both work)
new TelegramBot(token, { polling: true }) const bot = new Bot(token); bot.startPolling()
new TelegramBot(token) (for raw API calls) const bot = new Bot(token); await bot.api.getMe()
request.fetchOptions.dispatcher / proxy options inject a custom Undici fetch: new Bot(token, { fetch: (url, init) => fetch(url, { ...init, dispatcher }) })
bot.on('message', msg => ...) bot.on('message', ctx => ...) - a router over Context, not an EventEmitter
bot.onText(/\/echo (.+)/, (msg, m) => ...) bot.hears(/\/echo (.+)/, ctx => { ctx.match[1] })
bot.onReplyToMessage(chatId, msgId, ...) middleware reading ctx.message.reply_to_message
bot.sendMessage(chatId, text, opts) bot.api.sendMessage({ chat_id, text, ...opts }) or, in a handler, ctx.reply(text, opts)
bot.sendMessage(id, t, { reply_markup: { inline_keyboard: [...] } }) ctx.reply(t, { reply_markup: new InlineKeyboardBuilder().text('A','a').build() })
{ reply_markup: JSON.stringify(markup) } (manual) a plain object { inline_keyboard: [...] } or a builder .build() - the field is a plain typed object; the pipeline serializes it
bot.sendPhoto(id, '/path/to/p.jpg') bot.api.sendPhoto({ chat_id, photo: await fromPath('/path/to/p.jpg') }) (from 'node-telegram-bot-api/node')
bot.sendPhoto(id, fs.createReadStream(...)) bot.api.sendPhoto({ chat_id, photo: new InputFile(bytes) })
bare string = path or file_id (via options.filepath) a bare string is always a file_id/URL; bytes go through new InputFile()/fromPath()

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api) from 0.66.0 to 2.0.0.
- [Release notes](https://github.com/yagop/node-telegram-bot-api/releases)
- [Changelog](https://github.com/yagop/node-telegram-bot-api/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yagop/node-telegram-bot-api/commits/v2.0.0)

---
updated-dependencies:
- dependency-name: node-telegram-bot-api
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Aug 24, 2026
@dependabot @github

dependabot Bot commented on behalf of github Aug 31, 2026

Copy link
Copy Markdown
Author

Superseded by #7.

@dependabot dependabot Bot closed this Aug 31, 2026
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/telegram-bot/node-telegram-bot-api-2.0.0 branch August 31, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants