createUpdateFetcher
Takes a grammY bot and returns an update fetcher function for it. The returned function has built-in retrying behavior that can be configured. After every successful fetching operation, the offset
parameter is correctly incremented. As a result, you can simply invoke the created function multiple times in a row, and you will obtain new updates every time.
The update fetcher function has a default long polling timeout of 30 seconds. Specify source
to configure what values to pass to get
calls.
Type Parameters
Y
ts
Y extends { update_id: number }
R
ts
R
Parameters
bot
A grammY bot
options
ts
options: RunnerOptions
Further options on how to fetch updates