Chat
This object represents a chat.
fields
| field | type | required | description |
|---|---|---|---|
id | number | required | 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. |
type | "private" | "group" | "supergroup" | "channel" | required | Type of the chat, can be either “private”, “group”, “supergroup” or “channel” |
title | string | optional | Optional. Title, for supergroups, channels and group chats |
username | string | optional | Optional. Username, for private chats, supergroups and channels if available |
first_name | string | optional | Optional. First name of the other party in a private chat |
last_name | string | optional | Optional. Last name of the other party in a private chat |
is_forum | boolean | optional | Optional. True, if the supergroup chat is a forum (has topics enabled) |
is_direct_messages | boolean | optional | Optional. True, if the chat is the direct messages chat of a channel |
import
import type { Chat } from "@yaebal/types";used by
types
- AffiliateInfo
- BusinessMessagesDeleted
- ChatBoostRemoved
- ChatBoostUpdated
- ChatFullInfo
- ChatJoinRequest
- ChatMemberUpdated
- ChecklistTask
- ExternalReplyInfo
- Gift
- Giveaway
- GiveawayWinners
- InaccessibleMessage
- Message
- MessageOriginChannel
- MessageOriginChat
- MessageReactionCountUpdated
- MessageReactionUpdated
- PollAnswer
- PollOption
- Story
- TransactionPartnerChat
- UniqueGift
official Bot API docs: https://core.telegram.org/bots/api/#chat