Chat

@Serializable
data class Chat(val id: Long, val type: ChatType, val title: String? = null, val username: String? = null, val firstName: String? = null, val lastName: String? = null, val isForum: Boolean? = null) : IdLong

This object represents a chat.

Api reference

Constructors

Link copied to clipboard
constructor(id: Long, type: ChatType, title: String? = null, username: String? = null, firstName: String? = null, lastName: String? = null, isForum: Boolean? = null)

Properties

Link copied to clipboard
val firstName: String? = null

Optional. First name of the other party in a private chat

Link copied to clipboard
Link copied to clipboard
open override val id: Long

Unique identifier for this chat. 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 signed 64-bit integer or double-precision float type are safe for storing this identifier.

Link copied to clipboard
val isForum: Boolean? = null

Optional. True, if the supergroup chat is a forum (has topics enabled)

Link copied to clipboard
val lastName: String? = null

Optional. Last name of the other party in a private chat

Link copied to clipboard
val title: String? = null

Optional. Title, for supergroups, channels and group chats

Link copied to clipboard

Type of the chat, can be either "private", "group", "supergroup" or "channel"

Link copied to clipboard
val username: String? = null

Optional. Username, for private chats, supergroups and channels if available