pub struct CallSetMyCommands<'a> { /* private fields */ }Implementations§
Source§impl<'a> CallSetMyCommands<'a>
impl<'a> CallSetMyCommands<'a>
Sourcepub fn commands(self, commands: &'a Vec<BotCommand>) -> Self
pub fn commands(self, commands: &'a Vec<BotCommand>) -> Self
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.
pub fn get_commands(&'a self) -> &'a &'a Vec<BotCommand>
Sourcepub fn scope<T>(self, scope: T) -> Selfwhere
T: Into<&'a BotCommandScope>,
pub fn scope<T>(self, scope: T) -> Selfwhere
T: Into<&'a BotCommandScope>,
A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.
pub fn get_scope(&'a self) -> &'a Option<&'a BotCommandScope>
Sourcepub fn language_code(self, language_code: &'a str) -> Self
pub fn language_code(self, language_code: &'a str) -> Self
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
pub fn get_language_code(&'a self) -> &'a Option<&'a str>
pub async fn build(self) -> BotResult<bool>
Auto Trait Implementations§
impl<'a> Freeze for CallSetMyCommands<'a>
impl<'a> !RefUnwindSafe for CallSetMyCommands<'a>
impl<'a> Send for CallSetMyCommands<'a>
impl<'a> Sync for CallSetMyCommands<'a>
impl<'a> Unpin for CallSetMyCommands<'a>
impl<'a> UnsafeUnpin for CallSetMyCommands<'a>
impl<'a> !UnwindSafe for CallSetMyCommands<'a>
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