GramIO API Reference / gramio/dist / Handler
Type Alias: Handler()<T>
Handler<
T> = (context,next) =>unknown
Defined in: gramio/index.d.ts:600
Handler is a function with context and next function arguments
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
context | T |
next | Next |
Returns
unknown
Example
ts
const handler: Handler<ContextType<Bot, "message">> = (context, _next) => context.send("HI!");
bot.on("message", handler)