Telegram channel for exoclaw — vendored from HKUDS/nanobot via codemod
Project description
exoclaw-channel-telegram
Telegram channel for exoclaw — long-poll inbound, MarkdownV2 outbound, streaming via message edits, optional inline keyboard buttons, video.
Install
pip install exoclaw-channel-telegram
Setup
- Open Telegram, message
@BotFather, send/newbot. Pick a name and username. Copy the token (123456:ABC-DEF...). - Get your numeric Telegram user ID — message
@userinfobotand copy the ID it sends back. That's what goes inallow_from.
Use
import asyncio
from exoclaw_nanobot import create
from exoclaw_channel_telegram import TelegramChannel, TelegramConfig
async def main() -> None:
tg = TelegramChannel(TelegramConfig(
enabled=True,
token="123456:ABC-DEF...",
allow_from=["12345678"], # your Telegram user ID(s)
))
bot = await create(extra_channels=[tg])
await bot.run()
asyncio.run(main())
Config
| Field | Default | Description |
|---|---|---|
token |
— | Bot token from BotFather (required) |
allow_from |
[] |
Telegram user IDs allowed to message the bot (empty = deny all) |
group_policy |
"mention" |
"mention" (respond only when @mentioned in groups) or "open" |
proxy |
None |
SOCKS5 proxy URL, e.g. socks5://host:port |
reply_to_message |
False |
Quote the original message when replying |
react_emoji |
"👀" |
Emoji reaction added when message received |
streaming |
True |
Stream the agent's reply via message edits as it generates |
inline_keyboards |
False |
Render OutboundMessage.buttons as Telegram inline keyboards. Requires the callback_query update; enable in BotFather if you've restricted updates. |
Audit boundary
Vendored from HKUDS/nanobot via codemod. What's committed: upstream snapshot in vendor/, channel-specific patch in patches/0001-test-skip-help-restart-command.patch (skips an upstream test that asserts nanobot-specific command names exoclaw doesn't have), plus the small bootstrap files. The shipped channel.py and tests/test_channel.py are gitignored — generated at build time by exoclaw-channel-codemod, included in the wheel via the hatch hook. See exoclaw-nanobot-compat/README.md for the full pattern.
Maintenance
echo "<new-hkuds-sha>" > vendor/SHA
UPSTREAM=~/hkuds-nanobot bash ../exoclaw-channel-codemod/sync.sh telegram --apply
uv run pytest packages/exoclaw-channel-telegram/tests/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exoclaw_channel_telegram-0.1.0.tar.gz.
File metadata
- Download URL: exoclaw_channel_telegram-0.1.0.tar.gz
- Upload date:
- Size: 37.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
569df2426b51189fd25b679a8b6bd5dec5682c9c7bec2b2f7d52211cfed13e00
|
|
| MD5 |
1050512ad8af9b2944b54906e4652f01
|
|
| BLAKE2b-256 |
c92a725b609bed272ff2908654f418653651abbc1b2b3f599a85fbb094dbf3a1
|
File details
Details for the file exoclaw_channel_telegram-0.1.0-py3-none-any.whl.
File metadata
- Download URL: exoclaw_channel_telegram-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d7aecb3a0bbf4d5624f86a78dad76a3c7bbaf39453fb82ab704053d7bf69263
|
|
| MD5 |
0cc26e98720d32c3e3a130ca6c41ccfc
|
|
| BLAKE2b-256 |
c893f2dce8a27934fc7fed66c9ffff165d32a590d3ff2015747065796e450da4
|