Telegram
KhunQuant connects to Telegram via the Telegram Bot API. The TelegramChannel adapter translates Telegram messages into the internal event bus format and back.
Capabilities
- Typing indicator (
TypingCapable) - Message editing (
MessageEditor) - Emoji reactions (
ReactionCapable) - Slash command menus (
CommandRegistrarCapable)
Configuration
Add to ~/.khunquant/config.json:
{
"channels": {
"telegram": {
"enabled": true,
"token": "TELEGRAM_BOT_TOKEN",
"allow_from": ["@your_username"],
"reasoning_channel_id": "-100xxxxxxxxxx"
}
}
}
Add the bot token to ~/.khunquant/.security.yml:
channels:
telegram:
token: "1234567890:AAF..."
| Field | Type | Description |
|---|---|---|
enabled | bool | Enable the Telegram channel |
token | SecureString | Bot token from @BotFather |
allow_from | []string | Allowlist of Telegram usernames or chat IDs |
reasoning_channel_id | string | Optional channel ID for streaming reasoning output |
Setup steps
- Create a bot with @BotFather and copy the token.
- Add the token to
.security.yml. - Set
allow_fromto your Telegram username (e.g."@yourname"). - Start KhunQuant — it will begin polling for messages immediately.
Group chats
To use KhunQuant in a group, add the bot as a member and configure allow_from with the group chat ID. Use group_trigger settings to control when the bot responds.