feat: expand Telegram allowFrom guidance

Co-authored-by: Christoph Nakazawa <cpojer@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-01-15 06:14:55 +00:00
parent 9603eff79a
commit 624cb33534
2 changed files with 17 additions and 0 deletions

View File

@@ -468,6 +468,9 @@ AI/vibe-coded PRs welcome! 🤖
Special thanks to @andrewting19 for the Anthropic OAuth tool-name fix.
Core contributors:
- @cpojer — Telegram onboarding UX + docs
Thanks to all clawtributors:
<p align="left">

View File

@@ -43,6 +43,19 @@ async function noteTelegramTokenHelp(prompter: WizardPrompter): Promise<void> {
);
}
async function noteTelegramUserIdHelp(prompter: WizardPrompter): Promise<void> {
await prompter.note(
[
"1) DM your bot, then read from.id in `clawdbot logs --follow` (safest)",
"2) Or call https://api.telegram.org/bot<bot_token>/getUpdates and read message.from.id",
"3) Third-party: DM @userinfobot or @getidsbot",
`Docs: ${formatDocsLink("/telegram")}`,
"Website: https://clawd.bot",
].join("\n"),
"Telegram user id",
);
}
async function promptTelegramAllowFrom(params: {
cfg: ClawdbotConfig;
prompter: WizardPrompter;
@@ -51,6 +64,7 @@ async function promptTelegramAllowFrom(params: {
const { cfg, prompter, accountId } = params;
const resolved = resolveTelegramAccount({ cfg, accountId });
const existingAllowFrom = resolved.config.allowFrom ?? [];
await noteTelegramUserIdHelp(prompter);
const entry = await prompter.text({
message: "Telegram allowFrom (user id)",
placeholder: "123456789",