Caspian connect Telegram
Connect a Telegram bot to Caspian and enable telegram in the plugin admit
list (channels in ~/.config/opencode/caspian.json). Without telegram in
channels, Telegram events are rejected at admit (blast-radius wall).
When to use
- User asks to connect Telegram / BotFather / Telegram bot
- User runs
/caspian:connect-telegramor/caspian-connect-telegram
Prerequisites (token)
Bot token must exist in one of (prefer file over chat):
TELEGRAM_BOT_TOKENin the environment- Project
.env→TELEGRAM_BOT_TOKEN=... ~/.config/opencode/caspian.env→TELEGRAM_BOT_TOKEN=...
Do not store the token in caspian.json. Prefer not pasting the token into chat.
How
Call
caspian_connectionsto see if Telegram is already linked and whethertelegramis already in plugin channels.Call
caspian_connect_telegram.If the tool asks for a token, instruct the user to create a bot with @BotFather, write
TELEGRAM_BOT_TOKEN=...into.envorcaspian.env, then re-run the command. Do not invent a token.On success, present connection id / channels. If RESTART REQUIRED, say:
Restart OpenCode (quit and relaunch) so admit loads
"channels": ["email", "telegram"](or your updated list). Until then, Telegram messages are still rejected.After restart, Telegram inbound should flow into OpenCode like email.