-
User identifier
Declaration
Swift
public let id: Int32 -
First name of the user
Declaration
Swift
public let firstName: String -
Last name of the user
Declaration
Swift
public let lastName: String -
Username of the user
Declaration
Swift
public let username: String -
Phone number of the user
Declaration
Swift
public let phoneNumber: String -
Current online status of the user
Declaration
Swift
public let status: UserStatus -
Profile photo of the user; may be null
Declaration
Swift
public let profilePhoto: ProfilePhoto? -
The user is a contact of the current user
Declaration
Swift
public let isContact: Bool -
The user is a contact of the current user and the current user is a contact of the user
Declaration
Swift
public let isMutualContact: Bool -
True, if the user is verified
Declaration
Swift
public let isVerified: Bool -
True, if the user is Telegram support account
Declaration
Swift
public let isSupport: Bool -
If non-empty, it contains a human-readable description of the reason why access to this user must be restricted
Declaration
Swift
public let restrictionReason: String -
True, if many users reported this user as a scam
Declaration
Swift
public let isScam: Bool -
If false, the user is inaccessible, and the only information known about the user is inside this class. It can’t be passed to any method except GetUser
Declaration
Swift
public let haveAccess: Bool -
Type of the user
Declaration
Swift
public let type: UserType -
IETF language tag of the user’s language; only available to bots
Declaration
Swift
public let languageCode: String -
init(id:firstName:lastName:username:phoneNumber:status:profilePhoto:isContact:isMutualContact:isVerified:isSupport:restrictionReason:isScam:haveAccess:type:languageCode:)Represents a user
Declaration
Swift
public init(id: Int32, firstName: String, lastName: String, username: String, phoneNumber: String, status: UserStatus, profilePhoto: ProfilePhoto?, isContact: Bool, isMutualContact: Bool, isVerified: Bool, isSupport: Bool, restrictionReason: String, isScam: Bool, haveAccess: Bool, type: UserType, languageCode: String)Parameters
idUser identifier
firstNameFirst name of the user
lastNameLast name of the user
usernameUsername of the user
phoneNumberPhone number of the user
statusCurrent online status of the user
profilePhotoProfile photo of the user; may be null
isContactThe user is a contact of the current user
isMutualContactThe user is a contact of the current user and the current user is a contact of the user
isVerifiedTrue, if the user is verified
isSupportTrue, if the user is Telegram support account
restrictionReasonIf non-empty, it contains a human-readable description of the reason why access to this user must be restricted
isScamTrue, if many users reported this user as a scam
haveAccessIf false, the user is inaccessible, and the only information known about the user is inside this class. It can’t be passed to any method except GetUser
typeType of the user
languageCodeIETF language tag of the user’s language; only available to bots
View on GitHub
Install in Dash
User Structure Reference