一键导入
add-telegram
Add Telegram as a channel. Use when the user says "add telegram", "connect telegram", "set up telegram bot", or "telegram channel".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add Telegram as a channel. Use when the user says "add telegram", "connect telegram", "set up telegram bot", or "telegram channel".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Manage scheduled tasks for Talon personas. Use when the user says "add schedule", "create schedule", "list schedules", "remove schedule", "scheduled task", or "cron job".
Create a Talon persona/profile interactively from a natural-language description. Use when the user says "create a profile", "add a persona", "new background agent", "create a persona", "add a profile", or "background agent profile".
Use when setting up Talon from the starter bundle (docker-based install) for the first time, adding channels or personas, changing the AI provider, or troubleshooting. Triggers on phrases like "set up talon", "configure talon", "add channel", "switch provider", "talonctl …".
Use when setting up Talon for the first time, adding channels or personas to an existing config, or running validation. Also use when the user says "configure talon", "add a channel", "add a persona", "add provider", "set up the daemon", "add schedule", or "configure providers".
Add Discord as a channel. Use when the user says "add discord", "connect discord", "set up discord bot", or "discord channel".
Add email (IMAP/SMTP) as a channel. Use when the user says "add email", "connect email", "set up email", or "email channel".
| name | add-telegram |
| description | Add Telegram as a channel. Use when the user says "add telegram", "connect telegram", "set up telegram bot", or "telegram channel". |
| triggers | ["add telegram","connect telegram","telegram channel","telegram bot"] |
Walk the user through adding a Telegram bot channel to Talon. One question at a time.
Check if a telegram channel already exists:
npx talonctl list-channels
If one exists, ask the user if they want to add another or reconfigure.
Ask: "Do you already have a Telegram bot token?"
If no, walk them through it:
- Open Telegram and search for @BotFather
- Send
/newbot- Choose a display name (e.g. "Talon Assistant")
- Choose a username — must end with
bot(e.g.talon_assistant_bot)- BotFather will reply with a token like
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11- Copy that token
Wait for the user to provide the token. Never store the actual token in config — use an env var placeholder.
Ask for a channel name (suggest my-telegram), then:
npx talonctl add-channel --name <name> --type telegram
Then edit talond.yaml to set the config section for this channel:
config:
botToken: ${TELEGRAM_BOT_TOKEN}
pollingTimeoutSec: 30
Tell the user to add to .env:
TELEGRAM_BOT_TOKEN=<their-actual-token>
Ask: "Do you want to restrict the bot to specific chats?"
If yes, explain how to get chat IDs:
- Start a conversation with your bot in Telegram
- Send any message
- Open
https://api.telegram.org/bot<TOKEN>/getUpdatesin a browser- Find
"chat":{"id":12345678}— that's your chat ID- For groups: add the bot to the group, send a message, check getUpdates again (group IDs are negative numbers like
-1001234567890)
Then edit the channel config to add:
config:
botToken: ${TELEGRAM_BOT_TOKEN}
pollingTimeoutSec: 30
allowedChatIds:
- "12345678"
npx talonctl list-personas
Ask which persona to bind, then:
npx talonctl bind --persona <name> --channel <channel-name>
If no personas exist yet, suggest creating one first.
npx talonctl env-check
npx talonctl doctor
Report any issues and help fix them.
If the user mentions group chats, explain:
Group Privacy: By default, Telegram bots only see messages that @mention them in groups. To let the bot see all messages:
- Open @BotFather
- Send
/mybotsand select your bot- Go to Bot Settings > Group Privacy > Turn off
After changing this, remove and re-add the bot to the group for it to take effect.
Tell the user:
- Make sure talond is running (or restart it)
- Send a message to the bot in Telegram
- You should get a response within a few seconds
If it doesn't work:
# Check if token is valid
curl -s "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/getMe"
# Check logs
journalctl --user -u talond -f
| Problem | Fix |
|---|---|
| Bot not responding | Check TELEGRAM_BOT_TOKEN in .env, restart talond |
| Bot only responds to @mentions in groups | Disable Group Privacy in BotFather (see Phase 7) |
| "Unauthorized" errors in logs | Token is wrong or revoked — get new one from BotFather |
| Bot responds to strangers | Add allowedChatIds to config (see Phase 4) |
| Duplicate responses | Check if multiple instances of talond are running |
channels:
- name: my-telegram
type: telegram
config:
botToken: ${TELEGRAM_BOT_TOKEN} # Required
pollingTimeoutSec: 30 # Optional (default: 30)
allowedChatIds: # Optional — restrict to specific chats
- "12345678"
getUpdates) — no webhook URL or public server needed