createSequentialSink
Creates an update sink that handles updates sequentially, i.e. one after another. No update will be processed before the previous update has not either been processed, or its processing has failed and the error has been handled.
In the context of grammY, this is also the default behavior of the built-in bot
method. Sequential sinks are very predictable and hence are well suited for debugging your bot. They do not scale well and should hence not be used in a larger bot, or one with long-running middleware.
Type Parameters
Y
ts
Y
R
ts
R = unknown
Parameters
handler
ts
handler: UpdateConsumer<Y>
Update consumer
errorHandler
Error handler for when the update consumer rejects
options
ts
options: SinkOptions<Y>
Further options for creating the sink
Return Type
ts
UpdateSink<Y>
An update sink that handles updates one by one