GramIO API Reference / @gramio/contexts/dist / BusinessConnection
Class: BusinessConnection
Defined in: contexts/index.d.ts:1292
Describes the connection of the bot with a business account.
Extended by
Constructors
Constructor
new BusinessConnection(
payload):BusinessConnection
Defined in: contexts/index.d.ts:1294
Parameters
| Parameter | Type |
|---|---|
payload | TelegramBusinessConnection |
Returns
BusinessConnection
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramBusinessConnection | contexts/index.d.ts:1293 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:1296
Returns
string
canReply
Get Signature
get canReply():
boolean
Defined in: contexts/index.d.ts:1316
True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours
Returns
boolean
date
Get Signature
get date():
number
Defined in: contexts/index.d.ts:1312
Date the connection was established in Unix time
Returns
number
id
Get Signature
get id():
string
Defined in: contexts/index.d.ts:1300
Unique identifier of the business connection
Returns
string
isEnabled
Get Signature
get isEnabled():
boolean
Defined in: contexts/index.d.ts:1320
True, if the connection is active
Returns
boolean
user
Get Signature
get user():
User
Defined in: contexts/index.d.ts:1304
Business account user that created the business connection
Returns
userChatId
Get Signature
get userChatId():
number
Defined in: contexts/index.d.ts:1308
Identifier of a private chat with the user who created the business connection. 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 64-bit integer or double-precision float type are safe for storing this identifier.
Returns
number