Files
featherChat/warzone/tools
Siavash Sameni 362e7a765b v0.0.29: BotFather — create bots by messaging @botfather
Built-in BotFather (Rust, server-side):
- Intercepts messages to @botfather in deliver_or_queue
- Commands: /newbot <name>, /mybots, /deletebot <name>, /token <name>
- Creates bot with fingerprint, token, alias, tracks ownership
- Replies via push_to_client or queue (works offline)
- Only active when --enable-bots is set

Standalone BotFather (Python):
- tools/botfather.py: uses bot API (getUpdates/sendMessage)
- Delegates core ops to built-in handler
- Extensible for additional features
- Reads token from BOTFATHER_TOKEN env or .botfather_token file

Flow: User messages @botfather → "/newbot MyBot" → gets token back

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:08:35 +04:00
..

featherChat Bot Tools

bot-bridge.py

Proxy server that makes featherChat compatible with Telegram bot libraries.

Quick Start

# 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