Learn R Programming

telegram.bot (version 3.0.0)

stop_server: Stop the webhook server.

Description

Stops listening on the webhook. Requires no parameters.

Usage

stop_server()

Arguments

Examples

Run this code
if (FALSE) {
# Example of a 'kill' command
kill <- function(bot, update) {
  bot$sendMessage(
    chat_id = update$message$chat_id,
    text = "Bye!"
  )
  # Stop the webhook
  webhook$stop_server()
}

webhook <- Webhook("https://example.com/webhook", "TOKEN") + CommandHandler("start", start)

webhook$start_server()
}

Run the code above in your browser using DataLab