Class TdApi.User

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.User
Enclosing class:
TdApi

public static class TdApi.User extends TdApi.Object
Represents a user.
  • Field Details

    • id

      public long id
      User identifier.
    • firstName

      public String firstName
      First name of the user.
    • lastName

      public String lastName
      Last name of the user.
    • usernames

      public TdApi.Usernames usernames
      Usernames of the user; may be null.
    • phoneNumber

      public String phoneNumber
      Phone number of the user.
    • status

      public TdApi.UserStatus status
      Current online status of the user.
    • profilePhoto

      public TdApi.ProfilePhoto profilePhoto
      Profile photo of the user; may be null.
    • accentColorId

      public int accentColorId
      Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview.
    • backgroundCustomEmojiId

      public long backgroundCustomEmojiId
      Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
    • profileAccentColorId

      public int profileAccentColorId
      Identifier of the accent color for the user's profile; -1 if none.
    • profileBackgroundCustomEmojiId

      public long profileBackgroundCustomEmojiId
      Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none.
    • emojiStatus

      public TdApi.EmojiStatus emojiStatus
      Emoji status to be shown instead of the default Telegram Premium badge; may be null.
    • isContact

      public boolean isContact
      The user is a contact of the current user.
    • isMutualContact

      public boolean isMutualContact
      The user is a contact of the current user and the current user is a contact of the user.
    • isCloseFriend

      public boolean isCloseFriend
      The user is a close friend of the current user; implies that the user is a contact.
    • verificationStatus

      public TdApi.VerificationStatus verificationStatus
      Information about verification status of the user; may be null if none.
    • isPremium

      public boolean isPremium
      True, if the user is a Telegram Premium user.
    • isSupport

      public boolean isSupport
      True, if the user is Telegram support account.
    • restrictionReason

      public String restrictionReason
      If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
    • hasActiveStories

      public boolean hasActiveStories
      True, if the user has non-expired stories available to the current user.
    • hasUnreadActiveStories

      public boolean hasUnreadActiveStories
      True, if the user has unread non-expired stories available to the current user.
    • restrictsNewChats

      public boolean restrictsNewChats
      True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them.
    • paidMessageStarCount

      public long paidMessageStarCount
      Number of Telegram Stars that must be paid by general user for each sent message to the user. If positive and userFullInfo is unknown, use canSendMessageToUser to check whether the current user must pay.
    • haveAccess

      public boolean haveAccess
      If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method.
    • type

      public TdApi.UserType type
      Type of the user.
    • languageCode

      public String languageCode
      IETF language tag of the user's language; only available to bots.
    • addedToAttachmentMenu

      public boolean addedToAttachmentMenu
      True, if the user added the current bot to attachment menu; only available to bots.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • User

      public User()
      Represents a user.
    • User

      public User(long id, String firstName, String lastName, TdApi.Usernames usernames, String phoneNumber, TdApi.UserStatus status, TdApi.ProfilePhoto profilePhoto, int accentColorId, long backgroundCustomEmojiId, int profileAccentColorId, long profileBackgroundCustomEmojiId, TdApi.EmojiStatus emojiStatus, boolean isContact, boolean isMutualContact, boolean isCloseFriend, TdApi.VerificationStatus verificationStatus, boolean isPremium, boolean isSupport, String restrictionReason, boolean hasActiveStories, boolean hasUnreadActiveStories, boolean restrictsNewChats, long paidMessageStarCount, boolean haveAccess, TdApi.UserType type, String languageCode, boolean addedToAttachmentMenu)
      Represents a user.
      Parameters:
      id - User identifier.
      firstName - First name of the user.
      lastName - Last name of the user.
      usernames - Usernames of the user; may be null.
      phoneNumber - Phone number of the user.
      status - Current online status of the user.
      profilePhoto - Profile photo of the user; may be null.
      accentColorId - Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview.
      backgroundCustomEmojiId - Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
      profileAccentColorId - Identifier of the accent color for the user's profile; -1 if none.
      profileBackgroundCustomEmojiId - Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none.
      emojiStatus - Emoji status to be shown instead of the default Telegram Premium badge; may be null.
      isContact - The user is a contact of the current user.
      isMutualContact - The user is a contact of the current user and the current user is a contact of the user.
      isCloseFriend - The user is a close friend of the current user; implies that the user is a contact.
      verificationStatus - Information about verification status of the user; may be null if none.
      isPremium - True, if the user is a Telegram Premium user.
      isSupport - True, if the user is Telegram support account.
      restrictionReason - If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
      hasActiveStories - True, if the user has non-expired stories available to the current user.
      hasUnreadActiveStories - True, if the user has unread non-expired stories available to the current user.
      restrictsNewChats - True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them.
      paidMessageStarCount - Number of Telegram Stars that must be paid by general user for each sent message to the user. If positive and userFullInfo is unknown, use canSendMessageToUser to check whether the current user must pay.
      haveAccess - If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method.
      type - Type of the user.
      languageCode - IETF language tag of the user's language; only available to bots.
      addedToAttachmentMenu - True, if the user added the current bot to attachment menu; only available to bots.
  • 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.Object
      Returns:
      this.CONSTRUCTOR