ResetBotCommands

---functions---
bots.resetBotCommands#3d8de0f9 scope:BotCommandScope lang_code:string = Bool

Returns

Bool

Parameters

scopeBotCommandScoperequired
lang_codestringrequired

Example

Replace placeholder values with real data before running.

use ferogram::tl::functions;
use ferogram::tl::enums;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let (client, _) = ferogram::Client::quick_connect(
        "my.session",
        12345,
        "0123456789abcdef0123456789abcdef",
    )
    .await?;

    let result = client
        .invoke(
        &functions::bots::ResetBotCommands {
            scope: enums::BotCommandScope::Default,
            lang_code: "".to_string(),
        },
        )
        .await?;

    println!("{result:?}");
    Ok(())
}
use ferogram::tl::functions;
use ferogram::update::Update;
use ferogram::tl::enums;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let (client, _) = ferogram::Client::quick_connect(
        "my.session",
        12345,
        "0123456789abcdef0123456789abcdef",
    )
    .await?;

    let mut stream = client.stream_updates();
    while let Some(upd) = stream.next().await {
        if let Update::NewMessage(_msg) = upd {
            let result = client
                .invoke(
            &functions::bots::ResetBotCommands {
                scope: enums::BotCommandScope::Default,
                lang_code: "".to_string(),
            },
                )
                .await?;
            println!("{result:?}");
        }
    }
    Ok(())
}