This function sends any document from your computer to your phone. This function assumes you have added a bot from Telegram on your phone, noted the Token and added it to the Add_Bot(Token) file. You should have received a confirmation sms after doing this successfully. See ?Add_Bot for information on this. Alternatively, you could simply include your Token and ID as arguments below, but the Add_Bot function will make managing sending messages much simpler. The default location for the bot's saved information is: path.expand("~") (Type this in your console to see the location). If you overrode this, add the Bot's name and the location in the parameters below. Otherwise, add the Token and ID below.

Doc_Bot(Doc_Location, Bot_Name = NULL, Info_Loc = NULL, Token = NULL,
  Silent = TRUE)

Arguments

Doc_Location

Document to send to your phone from R.

Bot_Name

Name of the bot to do the sending.

Info_Loc

Where the RDS file with your needed bot info is saved. Defaults to path.expand("~")

Token

Token of your bot if not using the saved file call from Rbot::Add_Bot()

Silent

Choose to not print successful execution. Defaults to TRUE.

Value

Bot Document sent

Examples

# NOT RUN {
Doc_Location <- YOUR_PDF_LOCATION # e.g. Doc_Location <- "somefile.pdf"
Bot_Name <- "Soldier1"
Doc_Bot(Doc_Location = Doc_Location, Bot_Name = Bot_Name) # assume default location
# }