From c9a0fe452de858dff609a421513e8cde159a428d Mon Sep 17 00:00:00 2001 From: LasterAlex Date: Tue, 3 Sep 2024 14:20:44 +0300 Subject: [PATCH] Added sugar to examples --- crates/teloxide/examples/dispatching_features.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/teloxide/examples/dispatching_features.rs b/crates/teloxide/examples/dispatching_features.rs index bcc65a2e..23f127ff 100644 --- a/crates/teloxide/examples/dispatching_features.rs +++ b/crates/teloxide/examples/dispatching_features.rs @@ -6,8 +6,9 @@ use rand::Rng; use teloxide::{ dispatching::HandlerExt, prelude::*, - types::{Dice, ReplyParameters}, + types::Dice, utils::command::BotCommands, + sugar::request::RequestReplyExt, }; #[tokio::main] @@ -84,7 +85,7 @@ async fn main() { // filter only messages with dices. Message::filter_dice().endpoint(|bot: Bot, msg: Message, dice: Dice| async move { bot.send_message(msg.chat.id, format!("Dice value: {}", dice.value)) - .reply_parameters(ReplyParameters::new(msg.id)) + .reply_to(msg) .await?; Ok(()) }),