if (FALSE) {
bot <- Bot(token = bot_token("RTelegramBot"))
chat_id <- user_id("Me")
photos <- bot$getUserProfilePhotos(chat_id = chat_id)
# Download user profile photo
file_id <- photos$photos[[1L]][[1L]]$file_id
bot$getFile(file_id, destfile = "photo.jpg")
}
Run the code above in your browser using DataLab