From 037ad2bdfb735a916d301ee252d5f846c2c74000 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 6 Jul 2026 07:48:55 +0100 Subject: [PATCH] feat(telegram): offer BotFather web app flow in setup help and docs (#100540) --- docs/channels/telegram.md | 8 +++++++- extensions/telegram/src/setup-core.ts | 3 +++ src/wizard/i18n/locales/en.ts | 1 + src/wizard/i18n/locales/zh-CN.ts | 1 + src/wizard/i18n/locales/zh-TW.ts | 1 + 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/channels/telegram.md b/docs/channels/telegram.md index de22f7c7b475..391ac44ae88a 100644 --- a/docs/channels/telegram.md +++ b/docs/channels/telegram.md @@ -23,7 +23,11 @@ Production-ready for bot DMs and groups via grammY. Long polling is the default - Open Telegram, chat with **@BotFather** (confirm the handle is exactly `@BotFather`), run `/newbot`, follow the prompts, and save the token. + Both flows end with a token you paste into OpenClaw — pick one: + + - **Chat flow**: open Telegram, chat with **@BotFather** (confirm the handle is exactly `@BotFather`), run `/newbot`, follow the prompts, and save the token. + - **Web flow**: open [BotFather's web app](https://t.me/BotFather?startapp) — it runs in every Telegram client, including [web.telegram.org](https://web.telegram.org) — create the bot in the UI, and copy its token. + @@ -99,6 +103,8 @@ Token resolution is account-aware: `tokenFile` beats `botToken` beats env, and c - `/setjoingroups` — allow/deny group adds - `/setprivacy` — group visibility behavior + The same settings are available in [BotFather's web app](https://t.me/BotFather?startapp) if you prefer a UI over chat commands. + diff --git a/extensions/telegram/src/setup-core.ts b/extensions/telegram/src/setup-core.ts index 1efa0a3a0954..02c78efe2a7d 100644 --- a/extensions/telegram/src/setup-core.ts +++ b/extensions/telegram/src/setup-core.ts @@ -22,6 +22,9 @@ export function getTelegramTokenHelpLines(): string[] { t("wizard.telegram.tokenHelpOpenBotFather"), t("wizard.telegram.tokenHelpNewBot"), t("wizard.telegram.tokenHelpCopyToken"), + // Telegram's documented BotFather Mini App deep link (core.telegram.org/bots/features); + // web-based alternative to the /newbot chat flow, also works on web.telegram.org. + t("wizard.telegram.tokenHelpWebApp", { url: "https://t.me/BotFather?startapp" }), t("wizard.telegram.tokenEnvTip"), t("wizard.channels.docs", { link: formatDocsLink("/telegram") }), t("wizard.telegram.website", { url: "https://openclaw.ai" }), diff --git a/src/wizard/i18n/locales/en.ts b/src/wizard/i18n/locales/en.ts index b190fb2716b8..a1defb290a60 100644 --- a/src/wizard/i18n/locales/en.ts +++ b/src/wizard/i18n/locales/en.ts @@ -481,6 +481,7 @@ export const en = { tokenHelpCopyToken: "3) Copy the token (looks like 123456:ABC...)", tokenHelpNewBot: "2) Run /newbot (or /mybots)", tokenHelpOpenBotFather: "1) Open Telegram and chat with @BotFather", + tokenHelpWebApp: "Prefer a UI? BotFather's web app: {url} (create a bot, copy its token)", tokenInputPrompt: "Enter Telegram bot token", tokenKeepPrompt: "Telegram token already configured. Keep it?", userIdHelpGetUpdates: diff --git a/src/wizard/i18n/locales/zh-CN.ts b/src/wizard/i18n/locales/zh-CN.ts index 1bff2987da2d..20125f2309bb 100644 --- a/src/wizard/i18n/locales/zh-CN.ts +++ b/src/wizard/i18n/locales/zh-CN.ts @@ -468,6 +468,7 @@ export const zh_CN = { tokenHelpCopyToken: "3) 复制 token(格式类似 123456:ABC...)", tokenHelpNewBot: "2) 运行 /newbot(或 /mybots)", tokenHelpOpenBotFather: "1) 打开 Telegram 并与 @BotFather 对话", + tokenHelpWebApp: "更喜欢图形界面?BotFather 网页应用:{url}(创建 bot 后复制 token)", tokenInputPrompt: "输入 Telegram bot token", tokenKeepPrompt: "Telegram token 已配置。保留当前值?", userIdHelpGetUpdates: diff --git a/src/wizard/i18n/locales/zh-TW.ts b/src/wizard/i18n/locales/zh-TW.ts index 8db58061a557..d3c6b67073b1 100644 --- a/src/wizard/i18n/locales/zh-TW.ts +++ b/src/wizard/i18n/locales/zh-TW.ts @@ -468,6 +468,7 @@ export const zh_TW = { tokenHelpCopyToken: "3) 複製 token(格式類似 123456:ABC...)", tokenHelpNewBot: "2) 執行 /newbot(或 /mybots)", tokenHelpOpenBotFather: "1) 打開 Telegram 並與 @BotFather 對話", + tokenHelpWebApp: "偏好圖形介面?BotFather 網頁應用程式:{url}(建立 bot 後複製 token)", tokenInputPrompt: "輸入 Telegram bot token", tokenKeepPrompt: "Telegram token 已設定。保留目前值?", userIdHelpGetUpdates: