feat(arg): change arg

This commit is contained in:
doryan 2025-04-11 12:15:33 +04:00
parent f03f511778
commit d570cfb1f9

View File

@ -2,11 +2,12 @@ use telers::{
enums::ParseMode,
event::{telegram::HandlerResult, EventReturn},
methods::SendMessage,
types::Message,
Bot,
};
pub async fn send_html(bot: &Bot, chat_id: i64, text: &str) -> HandlerResult {
bot.send(SendMessage::new(chat_id, text).parse_mode(ParseMode::HTML))
pub async fn send_html(bot: &Bot, message: &Message, text: &str) -> HandlerResult {
bot.send(SendMessage::new(message.chat().id(), text).parse_mode(ParseMode::HTML))
.await?;
Ok(EventReturn::Finish)