Module tdlight.api

Class TdApi.CreateChatInviteLink

Enclosing class:
TdApi

public static final 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

  • Field Details

    • chatId

      public long chatId
      Chat identifier.
    • name

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

      public int expireDate
      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 by the link simultaneously; 0-99999; pass 0 if not limited.
    • createsJoinRequest

      public boolean createsJoinRequest
      True, if the link only creates join request. If true, memberLimit must not be specified.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      See Also:
  • Constructor Details

    • CreateChatInviteLink

      public CreateChatInviteLink()
      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 expireDate, int memberLimit, boolean createsJoinRequest)
      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 - long Chat identifier.
      name - String Invite link name; 0-32 characters.
      expireDate - int Point in time (Unix timestamp) when the link will expire; pass 0 if never.
      memberLimit - int The maximum number of chat members that can join the chat by the link simultaneously; 0-99999; pass 0 if not limited.
      createsJoinRequest - boolean True, if the link only creates join request. If true, memberLimit must not be specified.
    • CreateChatInviteLink

      public CreateChatInviteLink(DataInput input) throws IOException
      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

      Throws:
      IOException
  • Method Details