User

data class User(val id: Long, val isBot: Boolean = false, val firstName: String, val lastName: String? = null, val username: String? = null, val languageCode: String? = null, val isPremium: Boolean? = null, val addedToAttachmentMenu: Boolean? = null, val canJoinGroups: Boolean? = null, val canReadAllGroupMessages: Boolean? = null, val supportsInlineQueries: Boolean? = null)(source)

User

This object represents a Telegram user or bot.

(auto-generated)

Author

ForteScarlet

Constructors

Link copied to clipboard
constructor(id: Long, isBot: Boolean = false, firstName: String, lastName: String? = null, username: String? = null, languageCode: String? = null, isPremium: Boolean? = null, addedToAttachmentMenu: Boolean? = null, canJoinGroups: Boolean? = null, canReadAllGroupMessages: Boolean? = null, supportsInlineQueries: Boolean? = null)

Properties

Link copied to clipboard
@SerialName(value = "added_to_attachment_menu")
val addedToAttachmentMenu: Boolean? = null

Optional. True, if this user added the bot to the attachment menu

Link copied to clipboard
@SerialName(value = "can_join_groups")
val canJoinGroups: Boolean? = null

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

Link copied to clipboard
@SerialName(value = "can_read_all_group_messages")
val canReadAllGroupMessages: Boolean? = null

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

Link copied to clipboard
@SerialName(value = "first_name")
val firstName: String

User's or bot's first name

Link copied to clipboard
val id: Long

Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

Link copied to clipboard
@SerialName(value = "is_bot")
val isBot: Boolean = false

True, if this user is a bot

Link copied to clipboard
@SerialName(value = "is_premium")
val isPremium: Boolean? = null

Optional. True, if this user is a Telegram Premium user

Link copied to clipboard
@SerialName(value = "language_code")
val languageCode: String? = null

Optional. IETF language tag of the user's language

Link copied to clipboard
@SerialName(value = "last_name")
val lastName: String? = null

Optional. User's or bot's last name

Link copied to clipboard
@SerialName(value = "supports_inline_queries")
val supportsInlineQueries: Boolean? = null

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

Link copied to clipboard
val username: String? = null

Optional. User's or bot's username