Chat

data class Chat(val id: Long, val type: String, val title: String? = null, val username: String? = null, val firstName: String? = null, val lastName: String? = null, val isForum: Boolean? = null, val photo: ChatPhoto? = null, val activeUsernames: List<String>? = null, val availableReactions: List<ReactionType>? = null, val accentColorId: Int? = null, val backgroundCustomEmojiId: String? = null, val profileAccentColorId: Int? = null, val profileBackgroundCustomEmojiId: String? = null, val emojiStatusCustomEmojiId: String? = null, val emojiStatusExpirationDate: Int? = null, val bio: String? = null, val hasPrivateForwards: Boolean? = null, val hasRestrictedVoiceAndVideoMessages: Boolean? = null, val joinToSendMessages: Boolean? = null, val joinByRequest: Boolean? = null, val description: String? = null, val inviteLink: String? = null, val pinnedMessage: Message? = null, val permissions: ChatPermissions? = null, val slowModeDelay: Int? = null, val unrestrictBoostCount: Int? = null, val messageAutoDeleteTime: Int? = null, val hasAggressiveAntiSpamEnabled: Boolean? = null, val hasHiddenMembers: Boolean? = null, val hasProtectedContent: Boolean? = null, val hasVisibleHistory: Boolean? = null, val stickerSetName: String? = null, val canSetStickerSet: Boolean? = null, val customEmojiStickerSetName: String? = null, val linkedChatId: Int? = null, val location: ChatLocation? = null)(source)

Chat

This object represents a chat.

(auto-generated)

Author

ForteScarlet

Constructors

Link copied to clipboard
constructor(id: Long, type: String, title: String? = null, username: String? = null, firstName: String? = null, lastName: String? = null, isForum: Boolean? = null, photo: ChatPhoto? = null, activeUsernames: List<String>? = null, availableReactions: List<ReactionType>? = null, accentColorId: Int? = null, backgroundCustomEmojiId: String? = null, profileAccentColorId: Int? = null, profileBackgroundCustomEmojiId: String? = null, emojiStatusCustomEmojiId: String? = null, emojiStatusExpirationDate: Int? = null, bio: String? = null, hasPrivateForwards: Boolean? = null, hasRestrictedVoiceAndVideoMessages: Boolean? = null, joinToSendMessages: Boolean? = null, joinByRequest: Boolean? = null, description: String? = null, inviteLink: String? = null, pinnedMessage: Message? = null, permissions: ChatPermissions? = null, slowModeDelay: Int? = null, unrestrictBoostCount: Int? = null, messageAutoDeleteTime: Int? = null, hasAggressiveAntiSpamEnabled: Boolean? = null, hasHiddenMembers: Boolean? = null, hasProtectedContent: Boolean? = null, hasVisibleHistory: Boolean? = null, stickerSetName: String? = null, canSetStickerSet: Boolean? = null, customEmojiStickerSetName: String? = null, linkedChatId: Int? = null, location: ChatLocation? = null)

Properties

Link copied to clipboard
@SerialName(value = "accent_color_id")
val accentColorId: Int? = null

Optional. Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat.

Link copied to clipboard
@SerialName(value = "active_usernames")
val activeUsernames: List<String>? = null

Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.

Link copied to clipboard
@SerialName(value = "available_reactions")
val availableReactions: List<ReactionType>? = null

Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat.

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

Optional. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat.

Link copied to clipboard
val bio: String? = null

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

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

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

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

Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in getChat.

Link copied to clipboard
val description: String? = null

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

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

Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat.

Link copied to clipboard
@SerialName(value = "emoji_status_expiration_date")
val emojiStatusExpirationDate: Int? = null

Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in getChat.

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

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

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

Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.

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

Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.

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

Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat.

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

Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.

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

Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.

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

Optional. True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat.

Link copied to clipboard
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
@SerialName(value = "invite_link")
val inviteLink: String? = null

Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.

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

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

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

Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.

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

Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.

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

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

Link copied to clipboard
@SerialName(value = "linked_chat_id")
val linkedChatId: Int? = null

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.

Link copied to clipboard
val location: ChatLocation? = null

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

Link copied to clipboard
@SerialName(value = "message_auto_delete_time")
val messageAutoDeleteTime: Int? = null

Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds.

Link copied to clipboard

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

Link copied to clipboard
val photo: ChatPhoto? = null

Optional. Chat photo. Returned only in getChat.

Link copied to clipboard
@SerialName(value = "pinned_message")
val pinnedMessage: Message? = null

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

Link copied to clipboard
@SerialName(value = "profile_accent_color_id")
val profileAccentColorId: Int? = null

Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat.

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

Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat.

Link copied to clipboard
@SerialName(value = "slow_mode_delay")
val slowModeDelay: Int? = null

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

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

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

Link copied to clipboard
val title: String? = null

Optional. Title, for supergroups, channels and group chats

Link copied to clipboard

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

Link copied to clipboard
@SerialName(value = "unrestrict_boost_count")
val unrestrictBoostCount: Int? = null

Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions. Returned only in getChat.

Link copied to clipboard
val username: String? = null

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

Inherited properties

Link copied to clipboard
@get:JvmName(name = "ofChat")
val Chat.chatType: ChatType

Get from Chat.

Link copied to clipboard
@get:JvmName(name = "ofChatOrNull")
val Chat.chatTypeOrNull: ChatType?

Get from Chat or null.