User

data class User(id: Int, isBot: Boolean, firstName: String, lastName: String?, username: String?, languageCode: String?, canJoinGroups: Boolean, canReadAllGroupMessages: Boolean, supportsInlineQueries: Boolean)

This object represents a Telegram user or bot.

Parameters

id

Unique identifier for this user or bot

isBot

True, if this user is a bot

firstName

User's or bot's first name

lastName

Optional. User's or bot's last name

username

Optional. User's or bot's username

languageCode

Optional. IETF language tag of the user's language

canJoinGroups

Optional. True, if the bot can be invited to groups. Returned only in getMe.

canReadAllGroupMessages

Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.

supportsInlineQueries

Optional. True, if the bot supports inline queries. Returned only in getMe.

Constructors

User
Link copied to clipboard
common
fun User(id: Int, isBot: Boolean, firstName: String, lastName: String? = null, username: String? = null, languageCode: String? = null, canJoinGroups: Boolean = false, canReadAllGroupMessages: Boolean = false, supportsInlineQueries: Boolean = false)
Unique identifier for this user or bot

Functions

component1
Link copied to clipboard
common
operator fun component1(): Int
component2
Link copied to clipboard
common
operator fun component2(): Boolean
component3
Link copied to clipboard
common
operator fun component3(): String
component4
Link copied to clipboard
common
operator fun component4(): String?
component5
Link copied to clipboard
common
operator fun component5(): String?
component6
Link copied to clipboard
common
operator fun component6(): String?
component7
Link copied to clipboard
common
operator fun component7(): Boolean
component8
Link copied to clipboard
common
operator fun component8(): Boolean
component9
Link copied to clipboard
common
operator fun component9(): Boolean
copy
Link copied to clipboard
common
fun copy(id: Int, isBot: Boolean, firstName: String, lastName: String? = null, username: String? = null, languageCode: String? = null, canJoinGroups: Boolean = false, canReadAllGroupMessages: Boolean = false, supportsInlineQueries: Boolean = false): User
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

canJoinGroups
Link copied to clipboard
common
val canJoinGroups: Boolean = false
Optional.
canReadAllGroupMessages
Link copied to clipboard
common
val canReadAllGroupMessages: Boolean = false
Optional.
firstName
Link copied to clipboard
common
val firstName: String
User's or bot's first name
id
Link copied to clipboard
common
val id: Int
Unique identifier for this user or bot
isBot
Link copied to clipboard
common
val isBot: Boolean
True, if this user is a bot
languageCode
Link copied to clipboard
common
val languageCode: String? = null
Optional.
lastName
Link copied to clipboard
common
val lastName: String? = null
Optional.
supportsInlineQueries
Link copied to clipboard
common
val supportsInlineQueries: Boolean = false
Optional.
username
Link copied to clipboard
common
val username: String? = null
Optional.