Skip to content

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

Class: Context<Bot> ​

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

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:5244

Parameters ​

ParameterType
optionsContextOptions<Bot>

Returns ​

Context<Bot>

Properties ​

PropertyModifierTypeDefined in
botpublicBotcontexts/index.d.ts:5240
update?publicTelegramUpdatecontexts/index.d.ts:5242
updateId?publicnumbercontexts/index.d.ts:5241
updateTypeprotectedUpdateNamecontexts/index.d.ts:5243

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

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

MDN

Returns ​

string

Methods ​

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:5249

Type Parameters ​

Type Parameter
T extends UpdateName

Parameters ​

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