Interface Chat

A chat. (Can be a private chat, basic group, supergroup, or secret chat).

interface Chat {
    @type: "chat";
    accent_color_id: number;
    action_bar: ChatActionBar;
    available_reactions: ChatAvailableReactions;
    background: ChatBackground;
    background_custom_emoji_id: string;
    block_list: BlockList;
    business_bot_manage_bar: BusinessBotManageBar;
    can_be_deleted_for_all_users?: boolean;
    can_be_deleted_only_for_self?: boolean;
    can_be_reported?: boolean;
    chat_lists: ChatList[];
    client_data: string;
    default_disable_notification?: boolean;
    draft_message: DraftMessage;
    emoji_status: EmojiStatus;
    has_protected_content?: boolean;
    has_scheduled_messages?: boolean;
    id: number;
    is_marked_as_unread?: boolean;
    is_translatable?: boolean;
    last_message: Message;
    last_read_inbox_message_id: number;
    last_read_outbox_message_id: number;
    message_auto_delete_time: number;
    message_sender_id: MessageSender;
    notification_settings: ChatNotificationSettings;
    pending_join_requests: ChatJoinRequestsInfo;
    permissions: ChatPermissions;
    photo: ChatPhotoInfo;
    positions: ChatPosition[];
    profile_accent_color_id: number;
    profile_background_custom_emoji_id: string;
    reply_markup_message_id: number;
    theme_name: string;
    title: string;
    type: ChatType;
    unread_count: number;
    unread_mention_count: number;
    unread_reaction_count: number;
    video_chat: VideoChat;
    view_as_topics?: boolean;
}

Properties

@type: "chat"
accent_color_id: number

Identifier of the accent color for message sender name, and backgrounds of chat photo, reply header, and link preview.

action_bar: ChatActionBar

Information about actions which must be possible to do through the chat action bar; may be null if none.

available_reactions: ChatAvailableReactions

Types of reaction, available in the chat.

background: ChatBackground

Background set for the chat; may be null if none.

background_custom_emoji_id: string

Identifier of a custom emoji to be shown on the reply header and link preview background for messages sent by the chat; 0 if none.

block_list: BlockList

Block list to which the chat is added; may be null if none.

business_bot_manage_bar: BusinessBotManageBar

Information about bar for managing a business bot in the chat; may be null if none.

can_be_deleted_for_all_users?: boolean

True, if the chat messages can be deleted for all users.

can_be_deleted_only_for_self?: boolean

True, if the chat messages can be deleted only for the current user while other users will continue to see the messages.

can_be_reported?: boolean

True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto.

chat_lists: ChatList[]

Chat lists to which the chat belongs. A chat can have a non-zero position in a chat list even it doesn't belong to the chat list and have no position in a chat list even it belongs to the chat list.

client_data: string

Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used.

default_disable_notification?: boolean

Default value of the disable_notification parameter, used when a message is sent to the chat.

draft_message: DraftMessage

A draft of a message in the chat; may be null if none.

emoji_status: EmojiStatus

Emoji status to be shown along with chat title; may be null.

has_protected_content?: boolean

True, if chat content can't be saved locally, forwarded, or copied.

has_scheduled_messages?: boolean

True, if the chat has scheduled messages.

id: number

Chat unique identifier.

is_marked_as_unread?: boolean

True, if the chat is marked as unread.

is_translatable?: boolean

True, if translation of all messages in the chat must be suggested to the user.

last_message: Message

Last message in the chat; may be null if none or unknown.

last_read_inbox_message_id: number

Identifier of the last read incoming message.

last_read_outbox_message_id: number

Identifier of the last read outgoing message.

message_auto_delete_time: number

Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date.

message_sender_id: MessageSender

Identifier of a user or chat that is selected to send messages in the chat; may be null if the user can't change message sender.

notification_settings: ChatNotificationSettings

Notification settings for the chat.

pending_join_requests: ChatJoinRequestsInfo

Information about pending join requests; may be null if none.

permissions: ChatPermissions

Actions that non-administrator chat members are allowed to take in the chat.

Chat photo; may be null.

positions: ChatPosition[]

Positions of the chat in chat lists.

profile_accent_color_id: number

Identifier of the profile accent color for the chat's profile; -1 if none.

profile_background_custom_emoji_id: string

Identifier of a custom emoji to be shown on the background of the chat's profile; 0 if none.

reply_markup_message_id: number

Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.

theme_name: string

If non-empty, name of a theme, set for the chat.

title: string

Chat title.

type: ChatType

Type of the chat.

unread_count: number

Number of unread messages in the chat.

unread_mention_count: number

Number of unread messages with a mention/reply in the chat.

unread_reaction_count: number

Number of messages with unread reactions in the chat.

video_chat: VideoChat

Information about video chat of the chat.

view_as_topics?: boolean

True, if the chat is a forum supergroup that must be shown in the "View as topics" mode, or Saved Messages chat that must be shown in the "View as chats".