| start_polling | R Documentation |
Starts polling updates from Telegram. You can stop the polling either by
using the the interrupt R command in the session menu or with the
stop_polling method.
start_polling( timeout = 10L, clean = FALSE, allowed_updates = NULL, verbose = FALSE )
timeout |
(Optional). Passed to |
clean |
(Optional). Whether to clean any pending updates on Telegram
servers before actually starting to poll. Default is |
allowed_updates |
(Optional). Passed to |
verbose |
(Optional). If |
## Not run:
# Start polling example
start <- function(bot, update) {
bot$sendMessage(
chat_id = update$message$chat_id,
text = sprintf(
"Hello %s!",
update$message$from$first_name
)
)
}
updater <- Updater("TOKEN") + CommandHandler("start", start)
updater$start_polling(verbose = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.