GramIO API Reference / @gramio/contexts/dist / Chat
Class: Chat
Defined in: contexts/index.d.ts:756
This object represents a chat.
Constructors
Constructor
new Chat(
payload):Chat
Defined in: contexts/index.d.ts:758
Parameters
| Parameter | Type |
|---|---|
payload | TelegramChat |
Returns
Chat
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramChat | contexts/index.d.ts:757 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:760
Returns
string
firstName
Get Signature
get firstName():
string
Defined in: contexts/index.d.ts:780
Optional. First name of the other party in a private chat
Returns
string
id
Get Signature
get id():
number
Defined in: contexts/index.d.ts:764
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.
Returns
number
isDirectMessages
Get Signature
get isDirectMessages():
true
Defined in: contexts/index.d.ts:792
Optional. True, if the chat is the direct messages chat of a channel
Returns
true
isForum
Get Signature
get isForum():
true
Defined in: contexts/index.d.ts:788
Optional. True, if the supergroup chat is a forum (has topics enabled)
Returns
true
lastName
Get Signature
get lastName():
string
Defined in: contexts/index.d.ts:784
Optional. Last name of the other party in a private chat
Returns
string
title
Get Signature
get title():
string
Defined in: contexts/index.d.ts:772
Optional. Title, for supergroups, channels and group chats
Returns
string
type
Get Signature
get type():
TelegramChatType
Defined in: contexts/index.d.ts:768
Type of the chat, can be either “private”, “group”, “supergroup” or “channel”
Returns
username
Get Signature
get username():
string
Defined in: contexts/index.d.ts:776
Optional. Username, for private chats, supergroups and channels if available
Returns
string