teloxide_core/payloads/
get_my_commands.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{BotCommand, BotCommandScope};
6
7impl_payload! {
8    /// Use this method to get the current list of the bot's commands. Requires no parameters. Returns Array of [`BotCommand`] on success.
9    ///
10    /// [`BotCommand`]: crate::types::BotCommand
11    #[derive(Debug, PartialEq, Eq, Hash, Default, Clone, Serialize)]
12    pub GetMyCommands (GetMyCommandsSetters) => Vec<BotCommand> {
13        optional {
14            /// A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.
15            pub scope: BotCommandScope,
16            /// A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
17            pub language_code: String [into],
18        }
19    }
20}