import { type UpdateConsumer } from "https://deno.land/x/grammy_runner@v2.0.3/mod.ts";
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: (update: Y) => Promise<void>
Consumes an update and processes it. The returned promise should resolve as soon as the processeing is complete.