ChatInviteLink

@Serializable
data class ChatInviteLink(val inviteLink: String, val creator: User, val createsJoinRequest: Boolean, val isPrimary: Boolean, val isRevoked: Boolean, val name: String? = null, val expireDate: Instant? = null, val memberLimit: Int? = null, val pendingJoinRequestCount: Int? = null, val subscriptionPeriod: Duration? = null, val subscriptionPrice: Int? = null)

Represents an invite link for a chat.

Api reference

Constructors

Link copied to clipboard
constructor(inviteLink: String, creator: User, createsJoinRequest: Boolean, isPrimary: Boolean, isRevoked: Boolean, name: String? = null, expireDate: Instant? = null, memberLimit: Int? = null, pendingJoinRequestCount: Int? = null, subscriptionPeriod: Duration? = null, subscriptionPrice: Int? = null)

Properties

Link copied to clipboard

True, if users joining the chat via the link need to be approved by chat administrators

Link copied to clipboard

Creator of the link

Link copied to clipboard
@Serializable(with = InstantSerializer::class)
val expireDate: Instant? = null

Optional. Point in time (Unix timestamp) when the link will expire or has been expired

Link copied to clipboard

The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with "...".

Link copied to clipboard

True, if the link is primary

Link copied to clipboard

True, if the link is revoked

Link copied to clipboard
val memberLimit: Int? = null

Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999

Link copied to clipboard
val name: String? = null

Optional. Invite link name

Link copied to clipboard

Optional. Number of pending join requests created using this link

Link copied to clipboard
@Serializable(with = DurationSerializer::class)
val subscriptionPeriod: Duration? = null

Optional. The number of seconds the subscription will be active for before the next payment

Link copied to clipboard
val subscriptionPrice: Int? = null

Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link