Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/canxin121/china_unicom_oxidebot
https://github.com/canxin121/china_unicom_oxidebot
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/canxin121/china_unicom_oxidebot
- Owner: canxin121
- Created: 2024-09-03T14:28:27.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-09-13T06:58:40.000Z (4 months ago)
- Last Synced: 2024-09-13T18:51:14.699Z (4 months ago)
- Language: Rust
- Size: 179 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# ChinaUnicom Oxidebot
A chatbot cli to actively check or receive scheduled/threshold notifications about China Unicom flow usage.
### example usage
You need to use [Oxidebot](https://github.com/canxin121/oxidebot) with this handler.
```rust
use china_unicom_oxidebot::ChinaUnicomHandler;
use telegram_bot_oxidebot::bot::TelegramBot;#[tokio::main]
async fn main() {
tracing_subscriber::fmt::init();
oxidebot::OxideBotManager::new()
.bot(
TelegramBot::new(
"token".to_string(),
Default::default(),
)
.await,
)
.await
.wait_handler(|s| Box::pin(async move { ChinaUnicomHandler::new(s).await }))
.await
.run_block()
.await;
}
```