TelegramBot.pollUpdates

Range-based interface for getUpdates

This is a preferred way to receive updates because it lazily adjusts offset and calls getUpdates when necessary, allowing you to get more than a 100 updates in a single call.

struct TelegramBot
@trusted
pollUpdates
(
Duration timeout = 3.seconds
,
string[] allowed_updates = []
)

Parameters

timeout Duration

Timeout in seconds for long polling

allowed_updates string[]

List the types of updates you want your bot to receive

Return Value

Type: auto

An InputRange of Update

Throws

TelegramBotException on errors

See Also

getUpdates

Meta