Skip to content

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

Class: Context<Bot>

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

Main base context

Extended by

Type Parameters

Type Parameter
Bot extends BotLike

Constructors

Constructor

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

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

Parameters

ParameterType
optionsContextOptions<Bot>

Returns

Context<Bot>

Properties

PropertyModifierTypeDefined in
botpublicBotcontexts/index.d.ts:4726
update?publicTelegramUpdatecontexts/index.d.ts:4728
updateId?publicnumbercontexts/index.d.ts:4727
updateTypeprotectedUpdateNamecontexts/index.d.ts:4729

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string

Methods

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] : {})