Features
- ✅ Simple bot token authentication
- ✅ Voice message transcription (when Groq provider is configured)
- ✅ Media attachment support
- ✅ Group chat with configurable reply behavior
- ✅ SOCKS5/HTTP proxy support
- ✅ Message quoting
Setup
Create a bot
- Open Telegram and search for
@BotFather - Send
/newbotand follow the prompts - Choose a name and username for your bot
- Copy the bot token (format:
1234567890:ABCdefGHIjklMNOpqrsTUVwxyz)
Find your User ID
Your User ID is shown in Telegram settings as
@yourUserId.Copy this value without the @ symbol for the config file.Alternatively, message your bot and check the nanobot logs — it will show the user ID of incoming messages.Configuration Options
Enable the Telegram channel
Bot token from @BotFather (format:
1234567890:ABC...xyz)List of user IDs or usernames allowed to interact. Empty array = allow all users.Examples:
- User ID:
["123456789"] - Username:
["alice"](without @ symbol) - Multiple:
["123456789", "alice", "bob"]
HTTP or SOCKS5 proxy URL for regions where Telegram is blockedExamples:
- HTTP:
"http://127.0.0.1:7890" - SOCKS5:
"socks5://127.0.0.1:1080"
If true, bot replies will quote the original message
Voice Messages
When the Groq provider is configured, nanobot automatically transcribes voice messages using Whisper:Group Chat
Using nanobot in Telegram groups
Using nanobot in Telegram groups
- Add your bot to a group
- The bot responds to all messages by default
- To require @mentions, add a
groupPolicysetting:
Group policy is a custom extension and may require nanobot ≥ v0.2.0
Proxy Configuration
For regions where Telegram is blocked:- HTTP Proxy
- SOCKS5 Proxy
Troubleshooting
Bot doesn't respond
Bot doesn't respond
- Check the bot token is correct
- Verify your user ID is in
allowFromlist - Check gateway logs:
nanobot gateway -v - Make sure you’ve started a conversation with
/start
Connection timeout / blocked
Connection timeout / blocked
If Telegram is blocked in your region:
- Set up a proxy (HTTP/SOCKS5)
- Add
proxyfield to config - Restart the gateway
Voice messages not transcribed
Voice messages not transcribed
Voice transcription requires:
- Groq provider configured with API key
- Gateway restart after adding Groq config
TypeError: 'allowFrom' must be list
TypeError: 'allowFrom' must be list
Make sure
allowFrom is an array, not a string:❌ Wrong: "allowFrom": "123456789"✅ Correct: "allowFrom": ["123456789"]Complete Example
Full configuration with all options:Related Pages
Configuration Overview
Learn about channel configuration
Security Settings
Set up access control