Skip to content

GramIO API Reference / @gramio/scenes/dist

@gramio/scenes/dist

Classes

ClassDescription
SceneScene IS an EventComposer. Inherits the full gramio DSL (.command/.callbackQuery/.hears/.on/.use/.derive/.guard/.branch/.extend/...) and adds scene-specific methods (.params/.state/.exitData/.onEnter/.step/ .ask). Scene-specific data lives on this["~scene"] to avoid colliding with the composer's own ~ slot.

Interfaces

InterfaceDescription
EnterExit-
InActiveSceneHandlerReturn-
InUnknownScene-
ParentSceneFrame-
PossibleInUnknownScene-
SceneEnterHandlerenter(scene, params?) typed via two overloads so each case is checked cleanly without relying on a conditional-rest-args dance (which expect- type's toBeCallableWith can't fully resolve under generic constraints):
ScenesOptions-
ScenesStorageData-
SceneUpdateState-

Type Aliases

Type AliasDescription
AnyScene-
Modify-
SceneDerivesDefinitions-
ScenesStorage-
SceneStepReturn-
StateTypesDefault-
StepHandler-
UpdateData-

Functions

scenes()

scenes(scenes, options?): Plugin<{ }, DeriveDefinitions & object, { }>

Defined in: scenes/index.d.ts:886

Parameters

ParameterType
scenesAnyScene[]
options?ScenesOptions

Returns

Plugin<{ }, DeriveDefinitions & object, { }>


scenesDerives()

scenesDerives<WithCurrentScene>(scenesOrOptions, optionsRaw?): Plugin<{ }, DeriveDefinitions & object, { }>

Defined in: scenes/index.d.ts:797

Type Parameters

Type ParameterDefault type
WithCurrentScene extends booleanfalse

Parameters

ParameterType
scenesOrOptionsAnyScene[] | ScenesDerivesOptions<WithCurrentScene>
optionsRaw?ScenesDerivesOptions<WithCurrentScene>

Returns

Plugin<{ }, DeriveDefinitions & object, { }>