Learn R Programming

telegram.bot (version 3.0.0)

user_id: Get a user from environment

Description

Obtain Telegram user id from system variables (in .Renviron) set according to the naming convention R_TELEGRAM_USER_X where X is the user's name.

Usage

user_id(user_name)

Arguments

user_name

The user's name.

Examples

Run this code
if (FALSE) {
# Open the `.Renviron` file
file.edit(path.expand(file.path("~", ".Renviron")))
# Add the line (uncomment and replace  by your Telegram user ID):
# R_TELEGRAM_USER_Me=
# Save and restart R

user_id("Me")
}

Run the code above in your browser using DataLab