# featherChat Bot Tools ## bot-bridge.py Proxy server that makes featherChat compatible with Telegram bot libraries. ### Quick Start ```bash # 1. Register a bot on featherChat curl -X POST http://server:7700/v1/bot/register \ -H 'Content-Type: application/json' \ -d '{"name":"MyBot","fingerprint":"aabbccddaabbccddaabbccddaabbccdd"}' # 2. Start the bridge python3 tools/bot-bridge.py --server http://server:7700 --token YOUR_TOKEN --port 8081 # 3. Point your TG bot at the bridge # Python (python-telegram-bot): # bot = Bot(token="TOKEN", base_url="http://localhost:8081/botTOKEN") # Node (Telegraf): # const bot = new Telegraf("TOKEN", { telegram: { apiRoot: "http://localhost:8081" } }) ``` ### What it does - Translates Telegram API calls to featherChat Bot API - Converts numeric chat_id <-> fingerprint hex strings - Proxies getUpdates long-polling - Passes through sendMessage, editMessageText, etc. ### Future: E2E Mode When E2E bot support is complete, the bridge will: - Hold the bot's seed/keypair - Decrypt incoming E2E messages before forwarding to the TG bot - Encrypt outgoing messages with the user's ratchet session - The TG bot sees plaintext; the server sees only ciphertext