Struct botapi::gen_types::KeyboardButtonRequestChat
source · pub struct KeyboardButtonRequestChat {
pub request_id: i64,
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<BoxWrapper<Unbox<ChatAdministratorRights>>>,
pub bot_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>,
pub bot_is_member: Option<bool>,
pub request_title: Option<bool>,
pub request_username: Option<bool>,
pub request_photo: Option<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: https://core.telegram.org/bots/features#chat-and-user-selection.
Fields§
§request_id: i64
Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message
chat_is_channel: bool
Pass True to request a channel chat, pass False to request a group or a supergroup chat.
chat_is_forum: Option<bool>
Optional. 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>
Optional. 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>
Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
user_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>
Optional. A JSON-serialized object 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<BoxWrapper<Unbox<ChatAdministratorRights>>>
Optional. A JSON-serialized object 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: Option<bool>
Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
request_title: Option<bool>
Optional. Pass True to request the chat’s title
request_username: Option<bool>
Optional. Pass True to request the chat’s username
request_photo: Option<bool>
Optional. Pass True to request the chat’s photo
Implementations§
source§impl KeyboardButtonRequestChat
impl KeyboardButtonRequestChat
pub fn noskip(self) -> NoSkipKeyboardButtonRequestChat
source§impl KeyboardButtonRequestChat
impl KeyboardButtonRequestChat
pub fn new(request_id: i64, chat_is_channel: bool) -> Self
sourcepub fn get_request_id<'a>(&'a self) -> i64
pub fn get_request_id<'a>(&'a self) -> i64
Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message
sourcepub fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self
pub fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self
Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message
sourcepub fn get_chat_is_channel<'a>(&'a self) -> bool
pub fn get_chat_is_channel<'a>(&'a self) -> bool
Pass True to request a channel chat, pass False to request a group or a supergroup chat.
sourcepub fn set_chat_is_channel<'a>(
&'a mut self,
chat_is_channel: bool,
) -> &'a mut Self
pub fn set_chat_is_channel<'a>( &'a mut self, chat_is_channel: bool, ) -> &'a mut Self
Pass True to request a channel chat, pass False to request a group or a supergroup chat.
sourcepub fn get_chat_is_forum<'a>(&'a self) -> Option<bool>
pub fn get_chat_is_forum<'a>(&'a self) -> Option<bool>
Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.
sourcepub fn set_chat_is_forum<'a>(
&'a mut self,
chat_is_forum: Option<bool>,
) -> &'a mut Self
pub fn set_chat_is_forum<'a>( &'a mut self, chat_is_forum: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.
sourcepub fn get_chat_has_username<'a>(&'a self) -> Option<bool>
pub fn get_chat_has_username<'a>(&'a self) -> Option<bool>
Optional. 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.
sourcepub fn set_chat_has_username<'a>(
&'a mut self,
chat_has_username: Option<bool>,
) -> &'a mut Self
pub fn set_chat_has_username<'a>( &'a mut self, chat_has_username: Option<bool>, ) -> &'a mut Self
Optional. 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.
sourcepub fn get_chat_is_created<'a>(&'a self) -> Option<bool>
pub fn get_chat_is_created<'a>(&'a self) -> Option<bool>
Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
sourcepub fn set_chat_is_created<'a>(
&'a mut self,
chat_is_created: Option<bool>,
) -> &'a mut Self
pub fn set_chat_is_created<'a>( &'a mut self, chat_is_created: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
sourcepub fn get_user_administrator_rights<'a>(
&'a self,
) -> Option<&'a ChatAdministratorRights>
pub fn get_user_administrator_rights<'a>( &'a self, ) -> Option<&'a ChatAdministratorRights>
Optional. A JSON-serialized object 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.
sourcepub fn set_user_administrator_rights<'a>(
&'a mut self,
user_administrator_rights: Option<ChatAdministratorRights>,
) -> &'a mut Self
pub fn set_user_administrator_rights<'a>( &'a mut self, user_administrator_rights: Option<ChatAdministratorRights>, ) -> &'a mut Self
Optional. A JSON-serialized object 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.
sourcepub fn get_bot_administrator_rights<'a>(
&'a self,
) -> Option<&'a ChatAdministratorRights>
pub fn get_bot_administrator_rights<'a>( &'a self, ) -> Option<&'a ChatAdministratorRights>
Optional. A JSON-serialized object 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.
sourcepub fn set_bot_administrator_rights<'a>(
&'a mut self,
bot_administrator_rights: Option<ChatAdministratorRights>,
) -> &'a mut Self
pub fn set_bot_administrator_rights<'a>( &'a mut self, bot_administrator_rights: Option<ChatAdministratorRights>, ) -> &'a mut Self
Optional. A JSON-serialized object 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.
sourcepub fn get_bot_is_member<'a>(&'a self) -> Option<bool>
pub fn get_bot_is_member<'a>(&'a self) -> Option<bool>
Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
sourcepub fn set_bot_is_member<'a>(
&'a mut self,
bot_is_member: Option<bool>,
) -> &'a mut Self
pub fn set_bot_is_member<'a>( &'a mut self, bot_is_member: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
sourcepub fn get_request_title<'a>(&'a self) -> Option<bool>
pub fn get_request_title<'a>(&'a self) -> Option<bool>
Optional. Pass True to request the chat’s title
sourcepub fn set_request_title<'a>(
&'a mut self,
request_title: Option<bool>,
) -> &'a mut Self
pub fn set_request_title<'a>( &'a mut self, request_title: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request the chat’s title
sourcepub fn get_request_username<'a>(&'a self) -> Option<bool>
pub fn get_request_username<'a>(&'a self) -> Option<bool>
Optional. Pass True to request the chat’s username
sourcepub fn set_request_username<'a>(
&'a mut self,
request_username: Option<bool>,
) -> &'a mut Self
pub fn set_request_username<'a>( &'a mut self, request_username: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request the chat’s username
sourcepub fn get_request_photo<'a>(&'a self) -> Option<bool>
pub fn get_request_photo<'a>(&'a self) -> Option<bool>
Optional. Pass True to request the chat’s photo
sourcepub fn set_request_photo<'a>(
&'a mut self,
request_photo: Option<bool>,
) -> &'a mut Self
pub fn set_request_photo<'a>( &'a mut self, request_photo: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request the chat’s photo
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 Default for KeyboardButtonRequestChat
impl Default for KeyboardButtonRequestChat
source§fn default() -> KeyboardButtonRequestChat
fn default() -> KeyboardButtonRequestChat
source§impl<'de> Deserialize<'de> for KeyboardButtonRequestChat
impl<'de> Deserialize<'de> for KeyboardButtonRequestChat
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>,
source§impl From<BoxWrapper<Box<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat
impl From<BoxWrapper<Box<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat
source§fn from(t: BoxWrapper<Box<KeyboardButtonRequestChat>>) -> Self
fn from(t: BoxWrapper<Box<KeyboardButtonRequestChat>>) -> Self
source§impl From<BoxWrapper<Unbox<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat
impl From<BoxWrapper<Unbox<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat
source§fn from(t: BoxWrapper<Unbox<KeyboardButtonRequestChat>>) -> Self
fn from(t: BoxWrapper<Unbox<KeyboardButtonRequestChat>>) -> Self
source§impl From<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat
impl From<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat
source§fn from(t: NoSkipKeyboardButtonRequestChat) -> Self
fn from(t: NoSkipKeyboardButtonRequestChat) -> Self
source§impl Hash for KeyboardButtonRequestChat
impl Hash for KeyboardButtonRequestChat
source§impl Into<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat
impl Into<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat
source§fn into(self) -> NoSkipKeyboardButtonRequestChat
fn into(self) -> NoSkipKeyboardButtonRequestChat
source§impl Ord for KeyboardButtonRequestChat
impl Ord for KeyboardButtonRequestChat
source§fn cmp(&self, other: &KeyboardButtonRequestChat) -> Ordering
fn cmp(&self, other: &KeyboardButtonRequestChat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for KeyboardButtonRequestChat
impl PartialEq for KeyboardButtonRequestChat
source§fn eq(&self, other: &KeyboardButtonRequestChat) -> bool
fn eq(&self, other: &KeyboardButtonRequestChat) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for KeyboardButtonRequestChat
impl PartialOrd for KeyboardButtonRequestChat
source§fn partial_cmp(&self, other: &KeyboardButtonRequestChat) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyboardButtonRequestChat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.