public static class TdApi.User extends TdApi.Object
| Modifier and Type | Field and Description |
|---|---|
int |
accentColorId
Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview.
|
boolean |
addedToAttachmentMenu
True, if the user added the current bot to attachment menu; only available to bots.
|
long |
backgroundCustomEmojiId
Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
|
static int |
CONSTRUCTOR
Identifier uniquely determining type of the object.
|
TdApi.EmojiStatus |
emojiStatus
Emoji status to be shown instead of the default Telegram Premium badge; may be null.
|
java.lang.String |
firstName
First name of the user.
|
boolean |
hasActiveStories
True, if the user has non-expired stories available to the current user.
|
boolean |
hasUnreadActiveStories
True, if the user has unread non-expired stories available to the current user.
|
boolean |
haveAccess
If false, the user is inaccessible, and the only information known about the user is inside this class.
|
long |
id
User identifier.
|
boolean |
isCloseFriend
The user is a close friend of the current user; implies that the user is a contact.
|
boolean |
isContact
The user is a contact of the current user.
|
boolean |
isFake
True, if many users reported this user as a fake account.
|
boolean |
isMutualContact
The user is a contact of the current user and the current user is a contact of the user.
|
boolean |
isPremium
True, if the user is a Telegram Premium user.
|
boolean |
isScam
True, if many users reported this user as a scam.
|
boolean |
isSupport
True, if the user is Telegram support account.
|
boolean |
isVerified
True, if the user is verified.
|
java.lang.String |
languageCode
IETF language tag of the user's language; only available to bots.
|
java.lang.String |
lastName
Last name of the user.
|
java.lang.String |
phoneNumber
Phone number of the user.
|
int |
profileAccentColorId
Identifier of the accent color for the user's profile; -1 if none.
|
long |
profileBackgroundCustomEmojiId
Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none.
|
TdApi.ProfilePhoto |
profilePhoto
Profile photo of the user; may be null.
|
java.lang.String |
restrictionReason
If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
|
boolean |
restrictsNewChats
True, if the user may restrict new chats with non-contacts.
|
TdApi.UserStatus |
status
Current online status of the user.
|
TdApi.UserType |
type
Type of the user.
|
TdApi.Usernames |
usernames
Usernames of the user; may be null.
|
| Constructor and Description |
|---|
User()
Represents a user.
|
User(long id,
java.lang.String firstName,
java.lang.String lastName,
TdApi.Usernames usernames,
java.lang.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,
boolean isVerified,
boolean isPremium,
boolean isSupport,
java.lang.String restrictionReason,
boolean isScam,
boolean isFake,
boolean hasActiveStories,
boolean hasUnreadActiveStories,
boolean restrictsNewChats,
boolean haveAccess,
TdApi.UserType type,
java.lang.String languageCode,
boolean addedToAttachmentMenu)
Represents a user.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConstructor()
Returns an identifier uniquely determining type of the object.
|
toStringpublic long id
public java.lang.String firstName
public java.lang.String lastName
public TdApi.Usernames usernames
public java.lang.String phoneNumber
public TdApi.UserStatus status
public TdApi.ProfilePhoto profilePhoto
public int accentColorId
public long backgroundCustomEmojiId
public int profileAccentColorId
public long profileBackgroundCustomEmojiId
public TdApi.EmojiStatus emojiStatus
public boolean isContact
public boolean isMutualContact
public boolean isCloseFriend
public boolean isVerified
public boolean isPremium
public boolean isSupport
public java.lang.String restrictionReason
public boolean isScam
public boolean isFake
public boolean hasActiveStories
public boolean hasUnreadActiveStories
public boolean restrictsNewChats
public boolean haveAccess
public TdApi.UserType type
public java.lang.String languageCode
public boolean addedToAttachmentMenu
public static final int CONSTRUCTOR
public User()
public User(long id,
java.lang.String firstName,
java.lang.String lastName,
TdApi.Usernames usernames,
java.lang.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,
boolean isVerified,
boolean isPremium,
boolean isSupport,
java.lang.String restrictionReason,
boolean isScam,
boolean isFake,
boolean hasActiveStories,
boolean hasUnreadActiveStories,
boolean restrictsNewChats,
boolean haveAccess,
TdApi.UserType type,
java.lang.String languageCode,
boolean addedToAttachmentMenu)
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.isVerified - True, if the user is verified.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.isScam - True, if many users reported this user as a scam.isFake - True, if many users reported this user as a fake account.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.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.public int getConstructor()
TdApi.ObjectgetConstructor in class TdApi.Object