Skip to main content

ronami_core/payloads/
set_my_commands.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BotCommand;
6use crate::types::BotCommandScope;
7use crate::types::True;
8
9impl_payload! {
10    /// Use this method to change the list of the bot's commands. Returns _True_ on success.
11    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
12    pub SetMyCommands (SetMyCommandsSetters) => True {
13        required {
14            /// A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
15            pub commands: Vec<BotCommand> [collect],
16        }
17        optional {
18            /// A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.
19            pub scope: BotCommandScope,
20            /// 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
21            pub language_code: String [into],
22        }
23    }
24}