mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 19:33:53 +01:00
4e004739ca
This reverts commit4e2ebdcff7
, reversing changes made toc1c71c5b9c
.
17 lines
364 B
Rust
17 lines
364 B
Rust
// This bot throws a dice on each incoming message.
|
|
|
|
use teloxide::prelude::*;
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
pretty_env_logger::init();
|
|
log::info!("Starting throw dice bot...");
|
|
|
|
let bot = Bot::from_env();
|
|
|
|
teloxide::repl(bot, |bot: Bot, msg: Message| async move {
|
|
bot.send_dice(msg.chat.id).await?;
|
|
Ok(())
|
|
})
|
|
.await;
|
|
}
|