22 lines
593 B
Rust
22 lines
593 B
Rust
|
use std::ops::Deref;
|
||
|
|
||
|
use telers::{event::telegram::HandlerResult, filters::CommandObject, types::Message, Bot};
|
||
|
|
||
|
use crate::{
|
||
|
assets::files::{HELP_COMMAND_TEXT, PRIVACY_COMMAND_TEXT},
|
||
|
utils::telegram::senders::send_html,
|
||
|
};
|
||
|
|
||
|
#[inline]
|
||
|
pub async fn info_commands_endpoint(
|
||
|
bot: Bot,
|
||
|
msg: Message,
|
||
|
command: CommandObject,
|
||
|
) -> HandlerResult {
|
||
|
match command.command.deref() {
|
||
|
"help" => send_html(bot, msg, HELP_COMMAND_TEXT).await,
|
||
|
"privacy" => send_html(bot, msg, PRIVACY_COMMAND_TEXT).await,
|
||
|
_ => Ok(telers::event::EventReturn::Cancel),
|
||
|
}
|
||
|
}
|