Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/canxin121/china_unicom_oxidebot


https://github.com/canxin121/china_unicom_oxidebot

Last synced: 2 months ago
JSON representation

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;
}
```