Module tdlight.api

Class TdApi.User

Enclosing class:
TdApi

public static final 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.
    • emojiStatus

      public TdApi.EmojiStatus emojiStatus
      Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only.
    • 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.
    • isVerified

      public boolean isVerified
      True, if the user is verified.
    • 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.
    • isScam

      public boolean isScam
      True, if many users reported this user as a scam.
    • isFake

      public boolean isFake
      True, if many users reported this user as a fake account.
    • 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 except GetUser.
    • 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
      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, TdApi.EmojiStatus emojiStatus, boolean isContact, boolean isMutualContact, boolean isVerified, boolean isPremium, boolean isSupport, String restrictionReason, boolean isScam, boolean isFake, boolean haveAccess, TdApi.UserType type, String languageCode, boolean addedToAttachmentMenu)
      Represents a user.
      Parameters:
      id - long User identifier.
      firstName - String First name of the user.
      lastName - String Last name of the user.
      usernames - Usernames Usernames of the user; may be null.
      phoneNumber - String Phone number of the user.
      status - UserStatus Current online status of the user.
      profilePhoto - ProfilePhoto Profile photo of the user; may be null.
      emojiStatus - EmojiStatus Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only.
      isContact - boolean The user is a contact of the current user.
      isMutualContact - boolean The user is a contact of the current user and the current user is a contact of the user.
      isVerified - boolean True, if the user is verified.
      isPremium - boolean True, if the user is a Telegram Premium user.
      isSupport - boolean True, if the user is Telegram support account.
      restrictionReason - String If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
      isScam - boolean True, if many users reported this user as a scam.
      isFake - boolean True, if many users reported this user as a fake account.
      haveAccess - boolean 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 except GetUser.
      type - UserType Type of the user.
      languageCode - String IETF language tag of the user's language; only available to bots.
      addedToAttachmentMenu - boolean True, if the user added the current bot to attachment menu; only available to bots.
    • User

      public User(DataInput input) throws IOException
      Represents a user.
      Throws:
      IOException
  • Method Details