{"full_name":"yagop/node-telegram-bot-api","owner":"yagop","name":"node-telegram-bot-api","shard":"1","url":"https://github.com/yagop/node-telegram-bot-api","description":"Telegram Bot API for NodeJS","homepage":"","topics":["telegram","bot","bot-framework","chatbot","api","nodejs"],"tag_pages":["api","bot","bot-framework","chatbot","nodejs","telegram"],"language":"TypeScript","license":"MIT","avatar":"https://avatars.githubusercontent.com/u/5002453?v=4","created_at":"2015-06-28T22:35:33Z","pushed_at":"2026-11-15T17:46:47Z","metrics":{"stars":9215,"forks":1650,"watchers":154,"issues":1004,"prs":341,"releases":27,"issues_open":0,"issues_closed":1004,"prs_open":1,"prs_closed":125,"prs_merged":215,"discussions":25},"growth":{"day":{"stars":1,"forks":0,"base_day":"2026-11-15"}},"history":{"dates":["2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[9215,9214,9215,9215,9214,9214,9215],"forks":[1650,1650,1650,1650,1649,1650,1650],"watchers":[null,154,154,154,154,154,154],"issues_open":[null,0,0,0,0,0,0],"prs_open":[null,0,0,0,0,1,1]},"boards":{},"same_owner":[],"issues":[],"discussions":[{"number":1316,"title":"Latest v1.0.0 release","comments":0,"category":"General","created_at":"2026-06-14T19:23:23Z"},{"number":1275,"title":"Business Connection","comments":1,"category":"Q&A","created_at":"2025-08-09T10:20:26Z"},{"number":1254,"title":"send_chat_action support?","comments":0,"category":"Ideas","created_at":"2025-01-27T10:48:06Z"},{"number":1246,"title":"Bot API 7.11!!🙏🙏🙏","comments":0,"category":"Q&A","created_at":"2025-01-02T09:58:57Z"},{"number":1238,"title":"we need support Bot API 7.11!!","comments":1,"category":"General","created_at":"2024-11-13T11:03:44Z"},{"number":1235,"title":"issue","comments":0,"category":"General","created_at":"2024-11-01T05:17:52Z"},{"number":1230,"title":"how to implement deep linking ?","comments":0,"category":"General","created_at":"2024-10-15T11:11:12Z"},{"number":1221,"title":"Payment Telegram Stars","comments":1,"category":"General","created_at":"2024-08-12T16:32:52Z"}],"latest_release":{"name":"2.4.0","tag":"v2.4.0","published_at":"2026-11-09T21:50:14Z","body":"\n### Bot API 10.4 (November 9, 2026)\n\n#### Widgets\n\n- Added `sendWidget`, `sendSharedWidget`, `answerWidgetQuery`, `editMessageWidgetData`, and `editSharedWidgetData`.\n- Added `Widget` and `widget` on `Message` and `ExternalReplyInfo`.\n- Added `WidgetQuery`/`SharedWidgetQuery` and the `widget_query`/`shared_widget_query` update types, plus `WidgetQueryType` (`WidgetQueryTypeData`, `WidgetQueryTypeSignData`, `WidgetQueryTypeSentTransaction`) and `WidgetQueryWallet`.\n- Added `InputWidgetMessageContent` and `InputSharedWidgetMessageContent`.\n- `ctx.chat`/`ctx.from` resolve for widget queries (`shared_widget_query` has no chat).\n\n```ts\nawait bot.api.sendWidget({\n  chat_id: userId, // widgets work in private chats\n  allow_queries: true,\n  html: `<button id=\"b\">Tap me</button>\n<script>\n  b.onclick = () => TelegramWidget.request(\"tap\").then((a) => (b.textContent = a.result));\n</script>`,\n});\n\nbot.on(\"widget_query\", async (ctx) => {\n  if (!(\"widget_query\" in ctx.update)) return;\n  const q = ctx.update.widget_query;\n  await ctx.api.answerWidgetQuery({ widget_query_id: q.id, data: `hi ${ctx.from?.first_name}` });\n});\n```\n\n#### Ephemeral Messages\n\n- `chat_id` in the ephemeral-capable send methods and `receiver_user_id` in `EphemeralMessageParameters` are now optional, so `callback_query_id` alone sends an ephemeral reply to a callback query (in any chat except channel direct-messages chats).\n- Types are stricter than the \"Optional\" columns in the Bot API docs, to catch at compile time what Telegram rejects at runtime:\n  - A call to one of these methods without `chat_id` is a type error unless it is an ephemeral reply to a callback query (`callback_query_id` without `receiver_user_id`). The rule is the exported `ChatOrCallbackReply` type.\n  - `EphemeralMessageParameters` must have `receiver_user_id` or `callback_query_id`. The callback-reply form is the exported `EphemeralCallbackReply` type.\n  - `Omit` and `Pick` merge the members of these param types, so a wrapper such as `Omit<SendMessageParams, \"parse_mode\">` loses the rule and its spread is rejected. Use the exported `DistributiveOmit<SendMessageParams, \"parse_mode\">`. `Omit<SendMessageParams, \"chat_id\">` plus your own `chat_id` works as before. `interface X extends SendMessageParams` no longer compiles; use a `type` intersection.\n- `ctx.reply` on an update without a chat (e.g. a callback query from an inline message) sends when `other` makes it an ephemeral reply to the callback query, instead of throwing.\n\n```ts\nbot.on(\"callback_query\", async (ctx) => {\n  const q = ctx.callbackQuery;\n  if (!q) return;\n  // No chat_id: shown only to the user who tapped, marked \"Only visible to you\"\n  await ctx.api.sendMessage({\n    text: \"Only you can see this\",\n    ephemeral_message_parameters: { callback_query_id: q.id },\n  });\n  await ctx.answerCallbackQuery(); // still required after an ephemeral reply\n});\n\nawait bot.api.sendMessage({ text: \"hi\" }); // ✗ type error: chat_id is required here\n\n// Wrapping the param types: use DistributiveOmit, not Omit\nimport type { DistributiveOmit, SendMessageParams } from \"node-telegram-bot-api\";\n\nconst sendHtml = (p: DistributiveOmit<SendMessageParams, \"parse_mode\">) =>\n  bot.api.sendMessage({ ...p, parse_mode: \"HTML\" });\n```\n\n#### Quotes from rich messages\n\n- Added `rich_texts` to `TextQuote` and `quote_rich_texts` to `ReplyParameters`.\n\n```ts\nawait bot.api.sendMessage({\n  chat_id: chatId,\n  text: \"Agreed!\",\n  reply_parameters: {\n    message_id: richMessageId,\n    quote_rich_texts: [\"the exact sentence being quoted\"],\n  },\n});\n```\n\n#### TON wallet\n\n- Added `TonWalletCard`, `TonWalletCardSticker`, `TonNft`, `TonNftAttribute`, and `ChatFullInfo.ton_wallet_card`.\n- Added `TonWalletTransfer` and `Message.ton_wallet_transfer`.\n- Renamed `StoryAreaPosition` to `AreaPosition`, following the Bot API. `StoryAreaPosition` stays as a deprecated alias.\n\n#### Chat share themes\n\n- Added `ChatShareTheme` (`ChatShareThemeEmoji`, `ChatShareThemeUniqueGift`), `ChatFullInfo.sha","is_prerelease":false},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}