Skip to content

Commit 8a5908a

Browse files
AhmedTMMclaude
andauthored
fix: add step-by-step instructions for getting a Telegram bot token (#2558)
New users don't know how to get a bot token. Show instructions before the prompt: open @Botfather, send /newbot, copy the token. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 44a6e76 commit 8a5908a

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openrouter/spawn",
3-
"version": "0.17.2",
3+
"version": "0.17.3",
44
"type": "module",
55
"bin": {
66
"spawn": "cli.js"

packages/cli/src/shared/agent-setup.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,14 @@ async function setupOpenclawConfig(
368368
if (enabledSteps?.has("telegram")) {
369369
logStep("Setting up Telegram...");
370370
const envToken = process.env.TELEGRAM_BOT_TOKEN;
371-
const trimmedToken = envToken?.trim() || (await prompt("Telegram bot token (from @BotFather): ")).trim();
371+
if (!envToken) {
372+
logInfo("To get a bot token:");
373+
logInfo(" 1. Open Telegram and search for @BotFather");
374+
logInfo(" 2. Send /newbot and follow the prompts");
375+
logInfo(" 3. Copy the token (looks like 123456:ABC-DEF...)");
376+
logInfo(" Press Enter to skip if you don't have one yet.");
377+
}
378+
const trimmedToken = envToken?.trim() || (await prompt("Telegram bot token: ")).trim();
372379

373380
if (trimmedToken) {
374381
const escapedBotToken = jsonEscape(trimmedToken);

0 commit comments

Comments
 (0)