Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stop_polling

Stop polling


Description

Stops the polling. Requires no parameters.

Usage

stop_polling()

Examples

## Not run: 
# Example of a 'kill' command
kill <- function(bot, update) {
  bot$sendMessage(
    chat_id = update$message$chat_id,
    text = "Bye!"
  )
  # Clean 'kill' update
  bot$getUpdates(offset = update$update_id + 1)
  # Stop the updater polling
  updater$stop_polling()
}

updater <<- updater + CommandHandler("kill", kill)

updater$start_polling(verbose = TRUE) # Send '/kill' to the bot

## End(Not run)

telegram.bot

Develop a 'Telegram Bot' with R

v2.4.0
GPL-3
Authors
Ernest Benedito [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.