1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
//! Crypto-bank telegram bot help command.

use telegram_client::Message;

use crate::{ChatClient, Error};

static HELP_MESSAGE: &'static str = r#"/cmds - this command
/btc - btc price
/bnc - balances"#;

/// Help command.
pub async fn commands(chat: &ChatClient, msg: &Message) -> Result<Message, Error> {
    chat.send(
        &msg.chat,
        format!(
            "Hi, **{}**! Here is a list of commands: \n\n{}",
            &msg.from.first_name, HELP_MESSAGE
        ),
    )
    .await
}