-
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
id
User identifier
firstName
First name of the user
lastName
Last name of the user
username
Username of the user
phoneNumber
Phone number of the user
status
Current online status of the user
profilePhoto
Profile photo of the user; 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
isVerified
True, if the user is verified
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
haveAccess
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
type
Type of the user
languageCode
IETF language tag of the user’s language; only available to bots