if (FALSE) {
# Start webhook example
start <- function(bot, update) {
bot$sendMessage(
chat_id = update$message$chat_id,
text = sprintf(
"Hello %s!",
update$message$from$first_name
)
)
}
webhook <- Webhook("https://example.com/webhook", "TOKEN") + CommandHandler("start", start)
webhook$start_server()
}
Run the code above in your browser using DataLab