Skip to content

GramIO API Reference / @gramio/contexts/dist / BusinessConnectionContext

Class: BusinessConnectionContext<Bot>

Defined in: contexts/index.d.ts:5315

This object Describes the connection of the bot with a business account.

Extends

Type Parameters

Type Parameter
Bot extends BotLike

Constructors

Constructor

new BusinessConnectionContext<Bot>(options): BusinessConnectionContext<Bot>

Defined in: contexts/index.d.ts:5319

Create new BusinessConnectionContext

Parameters

ParameterType
optionsBusinessConnectionContextOptions<Bot>

Returns

BusinessConnectionContext<Bot>

Overrides

Context.constructor


Constructor

new BusinessConnectionContext(...args): BusinessConnectionContext

Defined in: contexts/index.d.ts:5315

Parameters

ParameterType
...argsany[]

Returns

BusinessConnectionContext

Overrides

Context<Bot>.constructor

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
botpublicBot-Context.botcontexts/index.d.ts:4726
payloadpublicTelegramBusinessConnectionThe raw data that is used for this ContextBusinessConnection.payloadcontexts/index.d.ts:5317
update?publicTelegramUpdate-Context.updatecontexts/index.d.ts:4728
updateId?publicnumber-Context.updateIdcontexts/index.d.ts:4727
updateTypeprotectedUpdateName-Context.updateTypecontexts/index.d.ts:4729

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

Defined in: contexts/index.d.ts:4732

MDN

Returns

string

Inherited from

Context.[toStringTag]


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

Inherited from

BusinessConnection.canReply


date

Get Signature

get date(): number

Defined in: contexts/index.d.ts:1312

Date the connection was established in Unix time

Returns

number

Inherited from

BusinessConnection.date


id

Get Signature

get id(): string

Defined in: contexts/index.d.ts:1300

Unique identifier of the business connection

Returns

string

Inherited from

BusinessConnection.id


isEnabled

Get Signature

get isEnabled(): boolean

Defined in: contexts/index.d.ts:1320

True, if the connection is active

Returns

boolean

Inherited from

BusinessConnection.isEnabled


user

Get Signature

get user(): User

Defined in: contexts/index.d.ts:1304

Business account user that created the business connection

Returns

User

Inherited from

BusinessConnection.user


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

Inherited from

BusinessConnection.userChatId

Methods

clone()

clone(options?): BusinessConnectionContext

Defined in: contexts/index.d.ts:5273

Parameters

ParameterType
options?BusinessConnectionContextOptions

Returns

BusinessConnectionContext

Inherited from

CloneMixin.clone


is()

is<T>(rawTypes): this is InstanceType<ContextsMapping<Bot>[T]> & Bot["__Derives"]["global"] & Bot["__Derives"][T] & (Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})

Defined in: contexts/index.d.ts:4735

Type Parameters

Type Parameter
T extends UpdateName

Parameters

ParameterType
rawTypesMaybeArray<SoftString<T>>

Returns

this is InstanceType<ContextsMapping<Bot>[T]> & Bot["__Derives"]["global"] & Bot["__Derives"][T] & (Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})

Inherited from

Context.is