v0.0.28: BotFather-only registration, per-instance bot toggle, docs update
Security: - Bot registration restricted to BotFather (requires botfather_token) - Direct POST /v1/bot/register without BotFather auth → rejected Deploy: - systemd service reads /home/warzone/server.env for EXTRA_ARGS - deploy/warzone-server.env.mequ: no bots (default) - deploy/warzone-server.env.kh3rad3ree: --enable-bots - setup.sh copies per-hostname env file Docs updated: - LLM_HELP.md: BotFather flow, plaintext bot messaging, E2E option, bridge - LLM_BOT_DEV.md: botfather_token requirement, E2E mode, bridge section - BOT_API.md: full BotFather flow, ownership, numeric IDs, webhook delivery - SERVER.md: --enable-bots flag, per-instance config, bot system section - USAGE.md: bot messaging, BotFather, bridge tool Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -55,10 +55,11 @@ The `scripts/build-linux.sh` script builds Linux x86_64 binaries on a Hetzner Cl
|
||||
warzone-server --bind 0.0.0.0:7700 --data-dir ./warzone-data
|
||||
```
|
||||
|
||||
| Flag | Default | Description |
|
||||
|--------------|------------------|--------------------|
|
||||
| `--bind` | `0.0.0.0:7700` | Listen address |
|
||||
| `--data-dir` | `./warzone-data` | sled database path |
|
||||
| Flag | Default | Description |
|
||||
|-----------------|------------------|--------------------------------------|
|
||||
| `--bind` | `0.0.0.0:7700` | Listen address |
|
||||
| `--data-dir` | `./warzone-data` | sled database path |
|
||||
| `--enable-bots` | *(off)* | Enable Bot API and BotFather |
|
||||
|
||||
Environment variables:
|
||||
|
||||
@@ -336,6 +337,35 @@ The friend list is encrypted client-side and stored on the server as an opaque b
|
||||
|
||||
---
|
||||
|
||||
## Bots
|
||||
|
||||
### Messaging Bots
|
||||
|
||||
Clients auto-detect bot aliases (names ending in `Bot`, `bot`, or `_bot`) and send messages as plaintext -- no E2E session is established. Simply use `/peer @mybot_bot` and type your message. The client handles the rest.
|
||||
|
||||
### Creating Bots with BotFather
|
||||
|
||||
To create a bot, message `@botfather`:
|
||||
|
||||
1. `/peer @botfather`
|
||||
2. Send a message requesting a new bot (e.g., "create WeatherBot")
|
||||
3. BotFather registers the bot and returns the API token
|
||||
4. Use the token to run your bot against the server's Bot API
|
||||
|
||||
BotFather is auto-created on servers that have `--enable-bots` enabled. It is the only way to create bots.
|
||||
|
||||
### Bot Bridge for Telegram Compatibility
|
||||
|
||||
The `tools/bot-bridge.py` script provides a compatibility layer that lets you use existing Telegram bot libraries (python-telegram-bot, aiogram, Telegraf) with featherChat. It translates between the two APIs, handling differences like fingerprint-based addressing and numeric ID translation.
|
||||
|
||||
```bash
|
||||
python tools/bot-bridge.py --token YOUR_BOT_TOKEN --server http://localhost:7700
|
||||
```
|
||||
|
||||
See `docs/BOT_API.md` and `docs/LLM_BOT_DEV.md` for full Bot API documentation.
|
||||
|
||||
---
|
||||
|
||||
## Federation
|
||||
|
||||
Federation connects two featherChat servers so that users on different servers can message each other transparently.
|
||||
|
||||
Reference in New Issue
Block a user