UpdateConsumer
Update consumers are objects that can process an update from the Telegram Bot API. When you call run(bot)
, such an object will be created automatically for you. The passed bot will process the updates.
If you want your the updates to be consumed by a different source, for instance pushing them to a message queue, you can construct your own update sink by passing a custom update consumer.
Properties
consume
ts
consume: (update: Y) => Promise<void>;
Consumes an update and processes it. The returned promise should resolve as soon as the processeing is complete.