pub struct SetMyCommands {
pub commands: Vec<BotCommand>,
pub scope: Option<BotCommandScope>,
pub language_code: Option<String>,
}
Expand description
Use this method to change the list of the bot’s commands. See https://core.telegram.org/bots#commands for more details about bot commands. Returns True on success.
Fields§
§commands: Vec<BotCommand>
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.
scope: Option<BotCommandScope>
A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.
language_code: Option<String>
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
Implementations§
Source§impl SetMyCommands
impl SetMyCommands
pub fn new(commands: Vec<BotCommand>) -> Self
Trait Implementations§
Source§impl Clone for SetMyCommands
impl Clone for SetMyCommands
Source§fn clone(&self) -> SetMyCommands
fn clone(&self) -> SetMyCommands
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SetMyCommands
impl Debug for SetMyCommands
Source§impl<'de> Deserialize<'de> for SetMyCommands
impl<'de> Deserialize<'de> for SetMyCommands
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Methods for SetMyCommands
impl Methods for SetMyCommands
Auto Trait Implementations§
impl Freeze for SetMyCommands
impl RefUnwindSafe for SetMyCommands
impl Send for SetMyCommands
impl Sync for SetMyCommands
impl Unpin for SetMyCommands
impl UnwindSafe for SetMyCommands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more