Enum tg_flows::BotCommandScope
source · pub enum BotCommandScope {
Default,
AllPrivateChats,
AllGroupChats,
AllChatAdministrators,
Chat {
chat_id: Recipient,
},
ChatAdministrators {
chat_id: Recipient,
},
ChatMember {
chat_id: Recipient,
user_id: UserId,
},
}Expand description
This object represents the scope to which bot commands are applied.
Determining list of commands
The following algorithm is used to determine the list of commands for a particular user viewing the bot menu. The first list of commands which is set is returned:
Commands in the chat with the bot
Chat+language_codeChatAllPrivateChats+language_codeAllPrivateChatsDefault+language_codeDefault
Commands in group and supergroup chats
ChatMember+language_codeChatMemberChatAdministrators+language_code(admins only)ChatAdministrators(admins only)Chat+language_codeChatAllChatAdministrators+language_code(admins only)AllChatAdministrators(admins only)AllGroupChats+language_codeAllGroupChatsDefault+language_codeDefault
Variants§
Trait Implementations§
source§impl Clone for BotCommandScope
impl Clone for BotCommandScope
source§fn clone(&self) -> BotCommandScope
fn clone(&self) -> BotCommandScope
Returns a copy 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 BotCommandScope
impl Debug for BotCommandScope
source§impl<'de> Deserialize<'de> for BotCommandScope
impl<'de> Deserialize<'de> for BotCommandScope
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 Hash for BotCommandScope
impl Hash for BotCommandScope
source§impl PartialEq<BotCommandScope> for BotCommandScope
impl PartialEq<BotCommandScope> for BotCommandScope
source§fn eq(&self, other: &BotCommandScope) -> bool
fn eq(&self, other: &BotCommandScope) -> bool
This method tests for
self and other values to be equal, and is used
by ==.