Struct tgbot::types::ChatInviteLink
source · pub struct ChatInviteLink {
pub creates_join_request: bool,
pub creator: User,
pub invite_link: String,
pub is_primary: bool,
pub is_revoked: bool,
pub expire_date: Option<Integer>,
pub member_limit: Option<Integer>,
pub name: Option<String>,
pub pending_join_request_count: Option<Integer>,
}
Expand description
Represents an invite link for a chat.
Fields§
§creates_join_request: bool
Indicates whether users joining the chat via the link need to be approved by chat administrators.
creator: User
The creator of the link.
invite_link: String
The invite link.
If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.
is_primary: bool
Indicates whether the link is primary.
is_revoked: bool
Indicates whether the link is revoked.
expire_date: Option<Integer>
The point in time (Unix timestamp) when the link will expire or has been expired.
member_limit: Option<Integer>
The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999.
name: Option<String>
The name of the invite link.
pending_join_request_count: Option<Integer>
The number of pending join requests created using this link.
Implementations§
source§impl ChatInviteLink
impl ChatInviteLink
sourcepub fn with_creates_join_request(self, value: bool) -> Self
pub fn with_creates_join_request(self, value: bool) -> Self
Sets a new value for a creates_join_request
flag.
§Arguments
value
- Indicates whether users joining the chat via the link need to be approved by chat administrators.
sourcepub fn with_expire_date(self, value: Integer) -> Self
pub fn with_expire_date(self, value: Integer) -> Self
Sets a new expiration date.
§Arguments
value
- The point in time (Unix timestamp) when the link will expire or has been expired.
sourcepub fn with_is_primary(self, value: bool) -> Self
pub fn with_is_primary(self, value: bool) -> Self
sourcepub fn with_is_revoked(self, value: bool) -> Self
pub fn with_is_revoked(self, value: bool) -> Self
sourcepub fn with_member_limit(self, value: Integer) -> Self
pub fn with_member_limit(self, value: Integer) -> Self
Sets a new member limit
§Arguments
value
- The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999.
sourcepub fn with_pending_join_request_count(self, value: Integer) -> Self
pub fn with_pending_join_request_count(self, value: Integer) -> Self
Sets a new pending join requests count.
§Arguments
value
- The number of pending join requests created using this link.
Trait Implementations§
source§impl Clone for ChatInviteLink
impl Clone for ChatInviteLink
source§fn clone(&self) -> ChatInviteLink
fn clone(&self) -> ChatInviteLink
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChatInviteLink
impl Debug for ChatInviteLink
source§impl<'de> Deserialize<'de> for ChatInviteLink
impl<'de> Deserialize<'de> for ChatInviteLink
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 PartialEq for ChatInviteLink
impl PartialEq for ChatInviteLink
source§fn eq(&self, other: &ChatInviteLink) -> bool
fn eq(&self, other: &ChatInviteLink) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ChatInviteLink
impl PartialOrd for ChatInviteLink
source§fn partial_cmp(&self, other: &ChatInviteLink) -> Option<Ordering>
fn partial_cmp(&self, other: &ChatInviteLink) -> 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 more