TelegramBot.getUpdates

Receive incoming updates using long polling

  1. Update[] getUpdates(int offset, int limit, Duration timeout, string[] allowed_updates)
    struct TelegramBot
    @trusted
    getUpdates
    (
    int offset = 0
    ,
    int limit = 100
    ,
    Duration timeout = 3.seconds
    ,
    string[] allowed_updates = []
    )
  2. Update[] getUpdates(GetUpdatesMethod m)

Parameters

offset int

Identifier of the first update to be returned

limit int

Limits the number of updates to be retrieved

timeout Duration

Timeout for long polling Should be positive, short polling (timeout == 0) should be used for testing purposes only.

allowed_updates string[]

List the types of updates you want your bot to receive

Return Value

Type: Update[]

An array of updates

Throws

TelegramBotException on errors

See Also

Meta