Skip to content

Commit 392b305

Browse files
committed
feat(telegram): offer BotFather web app flow in setup help and docs
1 parent 7a49b16 commit 392b305

5 files changed

Lines changed: 13 additions & 1 deletion

File tree

docs/channels/telegram.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ Production-ready for bot DMs and groups via grammY. Long polling is the default
2323

2424
<Steps>
2525
<Step title="Create the bot token in BotFather">
26-
Open Telegram, chat with **@BotFather** (confirm the handle is exactly `@BotFather`), run `/newbot`, follow the prompts, and save the token.
26+
Both flows end with a token you paste into OpenClaw — pick one:
27+
28+
- **Chat flow**: open Telegram, chat with **@BotFather** (confirm the handle is exactly `@BotFather`), run `/newbot`, follow the prompts, and save the token.
29+
- **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.
30+
2731
</Step>
2832

2933
<Step title="Configure token and DM policy">
@@ -99,6 +103,8 @@ Token resolution is account-aware: `tokenFile` beats `botToken` beats env, and c
99103
- `/setjoingroups` — allow/deny group adds
100104
- `/setprivacy` — group visibility behavior
101105

106+
The same settings are available in [BotFather's web app](https://t.me/BotFather?startapp) if you prefer a UI over chat commands.
107+
102108
</Accordion>
103109
</AccordionGroup>
104110

extensions/telegram/src/setup-core.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export function getTelegramTokenHelpLines(): string[] {
2222
t("wizard.telegram.tokenHelpOpenBotFather"),
2323
t("wizard.telegram.tokenHelpNewBot"),
2424
t("wizard.telegram.tokenHelpCopyToken"),
25+
// Telegram's documented BotFather Mini App deep link (core.telegram.org/bots/features);
26+
// web-based alternative to the /newbot chat flow, also works on web.telegram.org.
27+
t("wizard.telegram.tokenHelpWebApp", { url: "https://t.me/BotFather?startapp" }),
2528
t("wizard.telegram.tokenEnvTip"),
2629
t("wizard.channels.docs", { link: formatDocsLink("/telegram") }),
2730
t("wizard.telegram.website", { url: "https://openclaw.ai" }),

src/wizard/i18n/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ export const en = {
481481
tokenHelpCopyToken: "3) Copy the token (looks like 123456:ABC...)",
482482
tokenHelpNewBot: "2) Run /newbot (or /mybots)",
483483
tokenHelpOpenBotFather: "1) Open Telegram and chat with @BotFather",
484+
tokenHelpWebApp: "Prefer a UI? BotFather's web app: {url} (create a bot, copy its token)",
484485
tokenInputPrompt: "Enter Telegram bot token",
485486
tokenKeepPrompt: "Telegram token already configured. Keep it?",
486487
userIdHelpGetUpdates:

src/wizard/i18n/locales/zh-CN.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ export const zh_CN = {
468468
tokenHelpCopyToken: "3) 复制 token(格式类似 123456:ABC...)",
469469
tokenHelpNewBot: "2) 运行 /newbot(或 /mybots)",
470470
tokenHelpOpenBotFather: "1) 打开 Telegram 并与 @BotFather 对话",
471+
tokenHelpWebApp: "更喜欢图形界面?BotFather 网页应用:{url}(创建 bot 后复制 token)",
471472
tokenInputPrompt: "输入 Telegram bot token",
472473
tokenKeepPrompt: "Telegram token 已配置。保留当前值?",
473474
userIdHelpGetUpdates:

src/wizard/i18n/locales/zh-TW.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ export const zh_TW = {
468468
tokenHelpCopyToken: "3) 複製 token(格式類似 123456:ABC...)",
469469
tokenHelpNewBot: "2) 執行 /newbot(或 /mybots)",
470470
tokenHelpOpenBotFather: "1) 打開 Telegram 並與 @BotFather 對話",
471+
tokenHelpWebApp: "偏好圖形介面?BotFather 網頁應用程式:{url}(建立 bot 後複製 token)",
471472
tokenInputPrompt: "輸入 Telegram bot token",
472473
tokenKeepPrompt: "Telegram token 已設定。保留目前值?",
473474
userIdHelpGetUpdates:

0 commit comments

Comments
 (0)