update dices_bot example

This commit is contained in:
p0lunin 2022-01-05 20:23:20 +02:00
parent 18afd9a95e
commit e0d2d141f0

View file

@ -1,6 +1,5 @@
// This bot throws a dice on each incoming message.
use std::sync::Arc;
use teloxide::prelude::*;
type TeleBot = AutoSend<Bot>;
@ -12,7 +11,7 @@ async fn main() {
let bot = Bot::from_env().auto_send();
teloxide::repl(bot, |message: Arc<Message>, bot: Arc<TeleBot>| async move {
teloxide::repl(bot, |message: Message, bot: TeleBot| async move {
bot.send_dice(message.chat.id).await?;
respond(())
})