GramIO API Reference / @gramio/contexts/dist / BusinessConnectionContext
Class: BusinessConnectionContext<Bot>
Defined in: contexts/index.d.ts:5449
This object Describes the connection of the bot with a business account.
Extends
Context<Bot>.Constructor<BusinessConnectionContext<Bot>>.BusinessConnection.CloneMixin<Bot,BusinessConnectionContext<Bot>,BusinessConnectionContextOptions<Bot>>
Type Parameters
| Type Parameter |
|---|
Bot extends BotLike |
Constructors
Constructor
new BusinessConnectionContext<
Bot>(options):BusinessConnectionContext<Bot>
Defined in: contexts/index.d.ts:5453
Create new BusinessConnectionContext
Parameters
| Parameter | Type |
|---|---|
options | BusinessConnectionContextOptions<Bot> |
Returns
BusinessConnectionContext<Bot>
Overrides
Constructor
new BusinessConnectionContext(...
args):BusinessConnectionContext
Defined in: contexts/index.d.ts:5449
Parameters
| Parameter | Type |
|---|---|
...args | any[] |
Returns
BusinessConnectionContext
Overrides
Context<Bot>.constructor
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
bot | public | Bot | - | Context.bot | contexts/index.d.ts:4856 |
payload | public | TelegramBusinessConnection | The raw data that is used for this Context | BusinessConnection.payload | contexts/index.d.ts:5451 |
update? | public | TelegramUpdate | - | Context.update | contexts/index.d.ts:4858 |
updateId? | public | number | - | Context.updateId | contexts/index.d.ts:4857 |
updateType | protected | UpdateName | - | Context.updateType | contexts/index.d.ts:4859 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:4862
Returns
string
Inherited from
canReply
Get Signature
get canReply():
boolean
Defined in: contexts/index.d.ts:1355
True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours
Returns
boolean
Inherited from
date
Get Signature
get date():
number
Defined in: contexts/index.d.ts:1351
Date the connection was established in Unix time
Returns
number
Inherited from
id
Get Signature
get id():
string
Defined in: contexts/index.d.ts:1339
Unique identifier of the business connection
Returns
string
Inherited from
isEnabled
Get Signature
get isEnabled():
boolean
Defined in: contexts/index.d.ts:1359
True, if the connection is active
Returns
boolean
Inherited from
user
Get Signature
get user():
User
Defined in: contexts/index.d.ts:1343
Business account user that created the business connection
Returns
Inherited from
userChatId
Get Signature
get userChatId():
number
Defined in: contexts/index.d.ts:1347
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
Inherited from
Methods
clone()
clone(
options?):BusinessConnectionContext
Defined in: contexts/index.d.ts:5407
Parameters
| Parameter | Type |
|---|---|
options? | BusinessConnectionContextOptions |
Returns
BusinessConnectionContext
Inherited from
is()
is<
T>(rawTypes):this is InstanceType<ContextsMapping<Bot>[T]> & GetDerives<Bot, T> & (IsAny<Bot["__Derives"]> extends true ? {} : Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})
Defined in: contexts/index.d.ts:4865
Type Parameters
| Type Parameter |
|---|
T extends UpdateName |
Parameters
| Parameter | Type |
|---|---|
rawTypes | MaybeArray<SoftString<T>> |
Returns
this is InstanceType<ContextsMapping<Bot>[T]> & GetDerives<Bot, T> & (IsAny<Bot["__Derives"]> extends true ? {} : Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})