Chat

data class Chat(id: Int, title: String?, username: String?, firstName: String?, lastName: String?, photo: ChatPhoto?, bio: String?, description: String?, inviteLink: String?, pinnedMessage: Message?, permissions: ChatPermissions?, slowModeDelay: Int?, stickerSetName: String?, canSetStickerSet: Boolean, linkedChatId: Int?, location: ChatLocation?, type: String)

This object represents a chat.

Parameters

id

Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

title

Optional. Title, for supergroups, channels and group chats

username

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

firstName

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

lastName

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

photo

Optional. Chat photo. Returned only in getChat.

bio

Optional. Bio of the other party in a private chat. Returned only in getChat.

description

Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.

inviteLink

Optional. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat.

pinnedMessage

Optional. The most recent pinned message (by sending date). Returned only in getChat.

permissions

Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.

slowModeDelay

Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in getChat.

stickerSetName

Optional. For supergroups, name of group sticker set. Returned only in getChat.

canSetStickerSet

Optional. True, if the bot can change the group sticker set. Returned only in getChat.

linkedChatId

Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.

location

Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.

type

Type of chat, can be either “private”, “group”, “supergroup” or “channel”

Constructors

Chat
Link copied to clipboard
common
fun Chat(id: Int, title: String? = null, username: String? = null, firstName: String? = null, lastName: String? = null, photo: ChatPhoto? = null, bio: String? = null, description: String? = null, inviteLink: String? = null, pinnedMessage: Message? = null, permissions: ChatPermissions? = null, slowModeDelay: Int? = null, stickerSetName: String? = null, canSetStickerSet: Boolean = false, linkedChatId: Int? = null, location: ChatLocation? = null, type: String)
Unique identifier for this chat.

Functions

component1
Link copied to clipboard
common
operator fun component1(): Int
component10
Link copied to clipboard
common
operator fun component10(): Message?
component11
Link copied to clipboard
common
operator fun component11(): ChatPermissions?
component12
Link copied to clipboard
common
operator fun component12(): Int?
component13
Link copied to clipboard
common
operator fun component13(): String?
component14
Link copied to clipboard
common
operator fun component14(): Boolean
component15
Link copied to clipboard
common
operator fun component15(): Int?
component16
Link copied to clipboard
common
operator fun component16(): ChatLocation?
component17
Link copied to clipboard
common
operator fun component17(): String
component2
Link copied to clipboard
common
operator fun component2(): String?
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(): ChatPhoto?
component7
Link copied to clipboard
common
operator fun component7(): String?
component8
Link copied to clipboard
common
operator fun component8(): String?
component9
Link copied to clipboard
common
operator fun component9(): String?
copy
Link copied to clipboard
common
fun copy(id: Int, title: String? = null, username: String? = null, firstName: String? = null, lastName: String? = null, photo: ChatPhoto? = null, bio: String? = null, description: String? = null, inviteLink: String? = null, pinnedMessage: Message? = null, permissions: ChatPermissions? = null, slowModeDelay: Int? = null, stickerSetName: String? = null, canSetStickerSet: Boolean = false, linkedChatId: Int? = null, location: ChatLocation? = null, type: String): Chat
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

bio
Link copied to clipboard
common
val bio: String? = null
Optional.
canSetStickerSet
Link copied to clipboard
common
val canSetStickerSet: Boolean = false
Optional.
description
Link copied to clipboard
common
val description: String? = null
Optional.
firstName
Link copied to clipboard
common
val firstName: String? = null
Optional.
id
Link copied to clipboard
common
val id: Int
Unique identifier for this chat.
inviteLink
Link copied to clipboard
common
val inviteLink: String? = null
Optional.
lastName
Link copied to clipboard
common
val lastName: String? = null
Optional.
linkedChatId
Link copied to clipboard
common
val linkedChatId: Int? = null
Optional.
location
Link copied to clipboard
common
val location: ChatLocation? = null
Optional.
permissions
Link copied to clipboard
common
val permissions: ChatPermissions? = null
Optional.
photo
Link copied to clipboard
common
val photo: ChatPhoto? = null
Optional.
pinnedMessage
Link copied to clipboard
common
val pinnedMessage: Message? = null
Optional.
slowModeDelay
Link copied to clipboard
common
val slowModeDelay: Int? = null
Optional.
stickerSetName
Link copied to clipboard
common
val stickerSetName: String? = null
Optional.
title
Link copied to clipboard
common
val title: String? = null
Optional.
type
Link copied to clipboard
common
val type: String
Type of chat, can be either “private”, “group”, “supergroup” or “channel”
username
Link copied to clipboard
common
val username: String? = null
Optional.