Creating Your Telegram Bot
Step 1: Create Bot with BotFather
/newbotStep 2: Configure OpenClaw
Add your bot token to the config:
openclaw config set channels.telegram.token "YOUR_BOT_TOKEN"Or edit ~/.openclaw/openclaw.json:
{
"channels": {
"telegram": {
"enabled": true,
"token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
}
}
}Privacy Mode vs Admin Status
Privacy Mode (Default)
By default, Telegram bots can only see:
Disabling Privacy Mode
To let your bot see all group messages:
/setprivacyAlternatively, make the bot an admin in the group.
Group Configuration
Mention Patterns
Configure how the bot responds in groups:
{
"channels": {
"telegram": {
"groupMentionPattern": "@mybot|hey bot"
}
}
}Draft Streaming
Enable real-time response streaming (requires threaded mode):
{
"channels": {
"telegram": {
"draftStreaming": true
}
}
}Troubleshooting
IPv6 DNS Issues
If you see "sendMessage failed" errors:
Cause: Your system resolves Telegram to IPv6 but IPv6 egress is blocked.
Solution: Force IPv4 in your DNS configuration or enable IPv6 on your VPS.
Bot Not Responding
Check that:
openclaw statusopenclaw channels statusNeed Professional Setup?
Contact us and we'll configure your Telegram bot with optimal settings.