initial commit
This commit is contained in:
commit
a4b8bdd8c0
10 changed files with 2644 additions and 0 deletions
38
CLAUDE.md
Normal file
38
CLAUDE.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Telegram Bot
|
||||
|
||||
General-purpose Telegram bot with modular handler architecture.
|
||||
|
||||
## Build & Run
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
cargo run
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Bot token must be placed at: `/var/trust/instagram_link_stripper/telegram_token`
|
||||
|
||||
## Architecture
|
||||
|
||||
- `src/main.rs` - Entry point, dispatcher setup
|
||||
- `src/config.rs` - Token loading from /var/trust/
|
||||
- `src/handlers/` - Message handlers (modular, each feature in own file)
|
||||
- `src/utils/` - Shared utilities
|
||||
|
||||
## Adding New Handlers
|
||||
|
||||
1. Create `src/handlers/new_feature.rs`
|
||||
2. Export in `src/handlers/mod.rs`
|
||||
3. Add handler branch in `handlers::schema()`
|
||||
|
||||
## Current Features
|
||||
|
||||
### Instagram Link Cleaning (`handlers/instagram.rs`)
|
||||
|
||||
Strips tracking parameters from Instagram links:
|
||||
- `igsh`, `igshid` - Instagram share tracking
|
||||
- `utm_*` - UTM campaign tracking
|
||||
- `ref` - Referral tracking
|
||||
- `fbclid` - Facebook click ID
|
||||
- `si` - Session identifier
|
||||
Loading…
Add table
Add a link
Reference in a new issue