From 96866537746edbf03f323facf1b69b7218dc9703 Mon Sep 17 00:00:00 2001 From: Evgeniy Kolmak Date: Fri, 27 Feb 2026 03:24:40 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74529=20Fix=20?= =?UTF-8?q?node=20telegram=20bot=20api=209=204=20types=20by=20@evgeniy-kol?= =?UTF-8?q?mak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/node-telegram-bot-api/index.d.ts | 4 +++ .../node-telegram-bot-api-tests.ts | 29 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/types/node-telegram-bot-api/index.d.ts b/types/node-telegram-bot-api/index.d.ts index de590c4bcf730b..1186f17dff8163 100644 --- a/types/node-telegram-bot-api/index.d.ts +++ b/types/node-telegram-bot-api/index.d.ts @@ -882,6 +882,8 @@ declare namespace TelegramBot { interface KeyboardButton { text: string; + style?: 'primary' | 'danger' | 'success' | undefined; + icon_custom_emoji_id?: string | undefined; request_user?: KeyboardButtonRequestUser | undefined; request_chat?: KeyboardButtonRequestChat | undefined; request_contact?: boolean | undefined; @@ -922,6 +924,8 @@ declare namespace TelegramBot { interface InlineKeyboardButton { text: string; + style?: 'primary' | 'danger' | 'success' | undefined; + icon_custom_emoji_id?: string | undefined; url?: string | undefined; callback_data?: string | undefined; web_app?: WebAppInfo; diff --git a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts index 8eda3a95076bd7..ac68e13a0b070f 100644 --- a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts +++ b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts @@ -548,3 +548,32 @@ MyTelegramBot.setStickerSetThumb(1234, "my_set_thumb", "thumb_file"); MyTelegramBot.setMessageReaction(1234, 1234, { reaction: [{ type: "emoji", emoji: "👍" }], }); +MyTelegramBot.sendMessage(1234, "test-InlineKeyboardButton", { + reply_markup: { + inline_keyboard: [ + [ + { + text: "Registration", + callback_data: "reg", + icon_custom_emoji_id: "5179278706941624825", + style: "primary", + }, + ], + ], + }, +}); +MyTelegramBot.sendMessage(1234, "test-KeyboardButton", { + reply_markup: { + keyboard: [ + [ + { + text: "Button", + request_contact: false, + icon_custom_emoji_id: "5179278706941624825", + style: "success", + }, + ], + ], + }, +}); + From 3eefc1af52b4742eb3675be6b582d8e1ea92cb16 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Fri, 27 Feb 2026 00:25:28 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A4=96=20dprint=20fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/node-telegram-bot-api/index.d.ts | 4 ++-- types/node-telegram-bot-api/node-telegram-bot-api-tests.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/types/node-telegram-bot-api/index.d.ts b/types/node-telegram-bot-api/index.d.ts index 1186f17dff8163..15aee8eaf143b4 100644 --- a/types/node-telegram-bot-api/index.d.ts +++ b/types/node-telegram-bot-api/index.d.ts @@ -882,7 +882,7 @@ declare namespace TelegramBot { interface KeyboardButton { text: string; - style?: 'primary' | 'danger' | 'success' | undefined; + style?: "primary" | "danger" | "success" | undefined; icon_custom_emoji_id?: string | undefined; request_user?: KeyboardButtonRequestUser | undefined; request_chat?: KeyboardButtonRequestChat | undefined; @@ -924,7 +924,7 @@ declare namespace TelegramBot { interface InlineKeyboardButton { text: string; - style?: 'primary' | 'danger' | 'success' | undefined; + style?: "primary" | "danger" | "success" | undefined; icon_custom_emoji_id?: string | undefined; url?: string | undefined; callback_data?: string | undefined; diff --git a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts index ac68e13a0b070f..166416f9640204 100644 --- a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts +++ b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts @@ -576,4 +576,3 @@ MyTelegramBot.sendMessage(1234, "test-KeyboardButton", { ], }, }); -