teloxide_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, BotCommandScope, True};
6
7impl_payload! {
8 /// Use this method to change the list of the bot's commands. Returns _True_ on success.
9 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
10 pub SetMyCommands (SetMyCommandsSetters) => True {
11 required {
12 /// 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.
13 pub commands: Vec<BotCommand> [collect],
14 }
15 optional {
16 /// A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.
17 pub scope: BotCommandScope,
18 /// 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
19 pub language_code: String [into],
20 }
21 }
22}