βοΈ This repository is rather not an example for beginners, as it combines several technologies, which can complicate the initial learning path.
@fr0staman_bot is a multifunctional game-like bot written in Rust, using teloxide. Bot uses much from Telegram Bot API and solves many (non) classic tasks, so in the code you can see:
- Multilingualism (with user or chat settings!)
- Message/Inline/Callback/Chosen filter and handling
- Optional new/left user reaction
- Handling chat_migration from chat to supergroup
- Other Telegram events (video_chat, chat_migration)
- Telegram channel subscription check
- Receive from user, moderating gif and voice bot inline content
- Storing and updating basic information about users and chats
- Decode inline_message_id and join inline chats with supergroups
- Callback chained locking per user
- Increase voice message volume with
libopus - Quite detailed logging
- Sending bot errors directly to Telegram log group
- Metrics with Prometheus
- Install
diesel_cli(--no-default-features --features=postgres) - Install and create
postgresdatabase - Copy and fill
.envfrom.env.example - Setup diesel migrations by
diesel migration run - Build and start bot (
cargo build --release && target/release/fr0staman_bot,cargo run --release) - Enjoy π½