Package org.drinkless.tdlib

# Class TdApi.CreateChatInviteLink

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.ChatInviteLink>
org.drinkless.tdlib.TdApi.CreateChatInviteLink

Enclosing class:
  `TdApi`

public static class TdApi.CreateChatInviteLink extends TdApi.Function<TdApi.ChatInviteLink>
Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and canInviteUsers right in the chat.

Returns `ChatInviteLink`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

  `TdApi.Function.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `long`
  `chatId`
  Chat identifier.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `boolean`
  `createsJoinRequest`
  Pass true if users joining the chat via the link need to be approved by chat administrators.
  `int`
  `expirationDate`
  Point in time (Unix timestamp) when the link will expire; pass 0 if never.
  `int`
  `memberLimit`
  The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited.
  `String`
  `name`
  Invite link name; 0-32 characters.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CreateChatInviteLink()`
  Default constructor for a function, which creates a new invite link for a chat.
  `CreateChatInviteLink(long chatId, String name, int expirationDate, int memberLimit, boolean createsJoinRequest)`
  Creates a function, which creates a new invite link for a chat.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Function

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### chatId

    public long chatId
    Chat identifier.

  - ### name

    public String name
    Invite link name; 0-32 characters.

  - ### expirationDate

    public int expirationDate
    Point in time (Unix timestamp) when the link will expire; pass 0 if never.

  - ### memberLimit

    public int memberLimit
    The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited.

  - ### createsJoinRequest

    public boolean createsJoinRequest
    Pass true if users joining the chat via the link need to be approved by chat administrators. In this case, memberLimit must be 0.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### CreateChatInviteLink

    public CreateChatInviteLink()
    Default constructor for a function, which creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and canInviteUsers right in the chat.

    Returns `ChatInviteLink`

  - ### CreateChatInviteLink

    public CreateChatInviteLink(long chatId, String name, int expirationDate, int memberLimit, boolean createsJoinRequest)
    Creates a function, which creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and canInviteUsers right in the chat.

    Returns `ChatInviteLink`

    Parameters:
      `chatId` - Chat identifier.
      `name` - Invite link name; 0-32 characters.
      `expirationDate` - Point in time (Unix timestamp) when the link will expire; pass 0 if never.
      `memberLimit` - The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited.
      `createsJoinRequest` - Pass true if users joining the chat via the link need to be approved by chat administrators. In this case, memberLimit must be 0.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Function<TdApi.ChatInviteLink>`
    Returns:
      this.CONSTRUCTOR