getUpdates | R Documentation |
Use this method to receive incoming updates. It returns a
list of Update
objects.
getUpdates(offset = NULL, limit = 100L, timeout = 0L, allowed_updates = NULL)
offset |
(Optional). Identifier of the first update to be returned. |
limit |
(Optional). Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. |
timeout |
(Optional). Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. |
allowed_updates |
(Optional). String or vector of strings with the
types of updates you want your bot to receive. For example, specify
Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. |
1. This method will not work if an outgoing webhook is set up.
2. In order to avoid getting duplicate updates, recalculate offset after
each server response or use Bot
method clean_updates
.
3. To take full advantage of this library take a look at
Updater
.
You can also use it's snake_case equivalent get_updates
.
## Not run: bot <- Bot(token = bot_token("RTelegramBot")) updates <- bot$getUpdates() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.