Setting Up the Telegram Bot (Operator Guide)
Telegram bot setup is the simplest of the three platforms — no developer portal approval, no webhook URL required (the bot uses long-polling).
1. Create the Bot
- Open Telegram and start a conversation with @BotFather.
- Send
/newbot. - Follow the prompts: choose a display name (e.g. "MyExternalCortex") and a
username (must end in
bot, e.g.myexternalcortex_bot). - BotFather will reply with your bot token. Copy it — this is your
TELEGRAM_TOKEN.
2. Configure the Bot (Optional but Recommended)
Still in BotFather, you can:
/setdescription— set a short description shown on the bot's profile page./setabouttext— set the "About" text./setuserpic— set a profile picture./setprivacy— set to disabled so the bot can read messages in groups (only needed if you plan to use group chats; for DM-only usage, leave as enabled).
The command menu is auto-populated at bot startup via set_my_commands() — you
don't need to configure it in BotFather.
3. Configure Environment Variables
Add to your .env:
TELEGRAM_TOKEN=your_token_here
Leave blank to disable Telegram support entirely.
4. Verify
Start the bot. In Telegram:
- Find your bot by username and send
/start. - The bot should respond with the onboarding message.
- Send
/helpto see the command list. - The "menu" button (slash icon) next to the text input should show all commands with descriptions — this is populated automatically on startup.
Troubleshooting
| Symptom | Likely cause |
|---|---|
| Bot doesn't respond | Token is wrong; check TELEGRAM_TOKEN in .env |
| "Conflict: terminated by other getUpdates request" | Two instances running with the same token; stop the duplicate |
| Command menu is empty | Bot startup didn't complete successfully; check logs |
| Bot responds in groups | Privacy mode is disabled; re-enable in BotFather with /setprivacy if DM-only is desired |