gluon/src/handlers/command_handlers/info_commands_template.rs

20 lines
497 B
Rust

use telers::{
enums::parse_mode::ParseMode,
event::{telegram::HandlerResult, EventReturn},
types::Message,
Bot,
};
use crate::types::structs::message_sender::MessageSender;
pub async fn send_info(bot: Bot, message: Message, info_text: &'static str) -> HandlerResult {
MessageSender::builder(message.chat().id())
.text(info_text)
.parse_mode(ParseMode::HTML)
.build()
.send(&bot)
.await
.unwrap();
Ok(EventReturn::Finish)
}