pub struct KeyboardButtonRequestChat {
pub request_id: RequestId,
pub chat_is_channel: bool,
pub chat_is_forum: Option<bool>,
pub chat_has_username: Option<bool>,
pub chat_is_created: Option<bool>,
pub user_administrator_rights: Option<ChatAdministratorRights>,
pub bot_administrator_rights: Option<ChatAdministratorRights>,
pub bot_is_member: bool,
pub request_title: bool,
pub request_username: bool,
pub request_photo: bool,
}Expand description
This object defines the criteria used to request a suitable chat.
Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. More about requesting chats »
Fields§
§request_id: RequestIdidentifier of the request, which will be received back in the
ChatShared object. Must be unique within the message.
chat_is_channel: boolPass true to request a channel chat, pass false to request a group
or a supergroup chat.
chat_is_forum: Option<bool>Pass true to request a forum supergroup, pass false to request a
non-forum chat. If not specified, no additional restrictions are
applied.
chat_has_username: Option<bool>Pass true to request a supergroup or a channel with a username, pass
false to request a chat without a username. If not specified, no
additional restrictions are applied.
chat_is_created: Option<bool>Pass true to request a chat owned by the user. Otherwise, no
additional restrictions are applied.
user_administrator_rights: Option<ChatAdministratorRights>Listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
bot_administrator_rights: Option<ChatAdministratorRights>Listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
bot_is_member: boolPass true to request a chat with the bot as a member. Otherwise, no
additional restrictions are applied.
request_title: boolPass true to request the chat’s title.
request_username: boolPass true to request the chat’s username.
request_photo: boolPass true to request the chat’s photo.
Implementations§
Source§impl KeyboardButtonRequestChat
impl KeyboardButtonRequestChat
Sourcepub fn new(
request_id: RequestId,
chat_is_channel: bool,
) -> KeyboardButtonRequestChat
pub fn new( request_id: RequestId, chat_is_channel: bool, ) -> KeyboardButtonRequestChat
Creates a new KeyboardButtonRequestChat.
Sourcepub fn chat_is_forum(self, value: bool) -> KeyboardButtonRequestChat
pub fn chat_is_forum(self, value: bool) -> KeyboardButtonRequestChat
Setter for chat_is_forum field.
Sourcepub fn chat_has_username(self, value: bool) -> KeyboardButtonRequestChat
pub fn chat_has_username(self, value: bool) -> KeyboardButtonRequestChat
Setter for chat_has_username field.
Sourcepub fn chat_is_created(self, value: bool) -> KeyboardButtonRequestChat
pub fn chat_is_created(self, value: bool) -> KeyboardButtonRequestChat
Setter for chat_is_created field.
Sourcepub fn user_administrator_rights(
self,
rights: ChatAdministratorRights,
) -> KeyboardButtonRequestChat
pub fn user_administrator_rights( self, rights: ChatAdministratorRights, ) -> KeyboardButtonRequestChat
Request a chat where the user has the specified administrator rights.
Sourcepub fn bot_administrator_rights(
self,
rights: ChatAdministratorRights,
) -> KeyboardButtonRequestChat
pub fn bot_administrator_rights( self, rights: ChatAdministratorRights, ) -> KeyboardButtonRequestChat
Request a chat where the bot has the specified administrator rights.
Sourcepub fn bot_is_member(self, value: bool) -> KeyboardButtonRequestChat
pub fn bot_is_member(self, value: bool) -> KeyboardButtonRequestChat
Setter for bot_is_member field.
Sourcepub fn request_title(self) -> KeyboardButtonRequestChat
pub fn request_title(self) -> KeyboardButtonRequestChat
Setter for request_title field.
Sourcepub fn request_username(self) -> KeyboardButtonRequestChat
pub fn request_username(self) -> KeyboardButtonRequestChat
Setter for request_username field.
Sourcepub fn request_photo(self) -> KeyboardButtonRequestChat
pub fn request_photo(self) -> KeyboardButtonRequestChat
Setter for request_photo field.
Trait Implementations§
Source§impl Clone for KeyboardButtonRequestChat
impl Clone for KeyboardButtonRequestChat
Source§fn clone(&self) -> KeyboardButtonRequestChat
fn clone(&self) -> KeyboardButtonRequestChat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KeyboardButtonRequestChat
impl Debug for KeyboardButtonRequestChat
Source§impl<'de> Deserialize<'de> for KeyboardButtonRequestChat
impl<'de> Deserialize<'de> for KeyboardButtonRequestChat
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyboardButtonRequestChat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyboardButtonRequestChat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for KeyboardButtonRequestChat
impl Hash for KeyboardButtonRequestChat
Source§impl Serialize for KeyboardButtonRequestChat
impl Serialize for KeyboardButtonRequestChat
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for KeyboardButtonRequestChat
impl StructuralPartialEq for KeyboardButtonRequestChat
Auto Trait Implementations§
impl Freeze for KeyboardButtonRequestChat
impl RefUnwindSafe for KeyboardButtonRequestChat
impl Send for KeyboardButtonRequestChat
impl Sync for KeyboardButtonRequestChat
impl Unpin for KeyboardButtonRequestChat
impl UnwindSafe for KeyboardButtonRequestChat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more