import { type UpdateSupplier } from "https://deno.land/x/grammy_runner@v2.0.3/mod.ts";
Update suppliers are objects that can fetch a number of new updates from the
Telegram Bot API. When you call run(bot)
, such an object will be created
automatically for you. It uses the passed bot to fetch updates.
If you want to poll updates from a different source, such as a message queue, you can construct your own update source by passing a custom update supplier.
Properties
supply: (batchSize: number, signal: AbortSignal) => Promise<Y[]>
Requests the next batch of updates of the specified size and returns them
as an array. The request should respect the given AbortSignal
. If the
signal is raised, the currently pending request must be cancelled.