if (FALSE) {
updater <- Updater(token = "TOKEN")
# Create error callback
error_callback <- function(bot, error) {
warning(simpleWarning(conditionMessage(error), call = "Updates polling"))
}
# Register it to the updater's dispatcher
updater$dispatcher$add_error_handler(error_callback)
# or
updater$dispatcher$add_handler(ErrorHandler(error_callback))
# or
updater <- updater + ErrorHandler(error_callback)
}
Run the code above in your browser using DataLab