make nix module
This commit is contained in:
parent
a4b8bdd8c0
commit
910b4f96ce
6 changed files with 92 additions and 32 deletions
23
CLAUDE.md
23
CLAUDE.md
|
|
@ -1,4 +1,4 @@
|
|||
# Telegram Bot
|
||||
# Task Force Beta Bot
|
||||
|
||||
General-purpose Telegram bot with modular handler architecture.
|
||||
|
||||
|
|
@ -11,12 +11,29 @@ cargo run
|
|||
|
||||
## Configuration
|
||||
|
||||
Bot token must be placed at: `/var/trust/instagram_link_stripper/telegram_token`
|
||||
Command-line arguments:
|
||||
1. Token path (default: `/var/trust/task_force_beta_bot/telegram_token`)
|
||||
2. Allowed chats path (default: `/var/trust/task_force_beta_bot/allowed_chats`)
|
||||
|
||||
```bash
|
||||
cargo run -- /path/to/token /path/to/allowed_chats
|
||||
```
|
||||
|
||||
### Allowed Chats File
|
||||
|
||||
One chat ID per line. Lines starting with `#` are comments.
|
||||
|
||||
```
|
||||
# My group
|
||||
-100123456789
|
||||
```
|
||||
|
||||
The bot ignores messages from chats not in this list.
|
||||
|
||||
## Architecture
|
||||
|
||||
- `src/main.rs` - Entry point, dispatcher setup
|
||||
- `src/config.rs` - Token loading from /var/trust/
|
||||
- `src/config.rs` - Token and allowed chats loading from /var/trust/
|
||||
- `src/handlers/` - Message handlers (modular, each feature in own file)
|
||||
- `src/utils/` - Shared utilities
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue