Preparing search index...
The search index is not available
telegraf.js - v4.16.3
telegraf.js
Router
Class Router<C>
Deprecated
in favor of
Composer.dispatch
Type Parameters
C
extends
Context
Hierarchy
Router
Implements
MiddlewareObj
<
C
>
Index
Constructors
constructor
Properties
handlers
otherwise
Handler
route
Fn
Methods
middleware
on
otherwise
Constructors
constructor
new
Router
<
C
>
(
routeFn
,
handlers
?
)
:
Router
<
C
>
Type Parameters
C
extends
Context
<
Update
>
Parameters
routeFn
:
RouteFn
<
C
>
handlers
:
Map
<
string
,
Middleware
<
C
>
>
= ...
Returns
Router
<
C
>
Properties
handlers
handlers
:
Map
<
string
,
Middleware
<
C
>
>
= ...
Private
otherwise
Handler
otherwise
Handler
:
Middleware
<
C
>
= ...
Private
Readonly
route
Fn
route
Fn
:
RouteFn
<
C
>
Methods
middleware
middleware
(
)
:
MiddlewareFn
<
C
>
Returns
MiddlewareFn
<
C
>
on
on
(
route
,
...
fns
)
:
Router
<
C
>
Parameters
route
:
string
Rest
...
fns
:
NonemptyReadonlyArray
<
Middleware
<
C
>
>
Rest
Returns
Router
<
C
>
otherwise
otherwise
(
...
fns
)
:
Router
<
C
>
Parameters
Rest
...
fns
:
NonemptyReadonlyArray
<
Middleware
<
C
>
>
Rest
Returns
Router
<
C
>
Settings
Member Visibility
Protected
Private
Inherited
Theme
OS
Light
Dark
On This Page
constructor
handlers
otherwise
Handler
route
Fn
middleware
on
otherwise
telegraf.js -
v4.16.3
Format
Input
Markup
Scenes
Telegraf
Types
Composer
Context
Memory
Session
Store
Router
Telegraf
Telegram
Telegram
Error
Middleware
Obj
Middleware
Middleware
Fn
Narrowed
Context
Session
Store
deunionize
session
Generated using
TypeDoc
Deprecated
in favor of Composer.dispatch