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)



Document to send to your phone from R.


Name of the bot to do the sending.


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


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


Choose to not print successful execution. Defaults to TRUE.


Bot Document sent


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 logcation
# If you used a specific Add_Bot location:
Text_Bot(Msg = Msg, Bot_Name = Bot_Name, Info_Loc = Some_Path)
# If you prefer setting the Token and ID directly here:
Text_Bot(Msg = Msg, Token = TOKEN, ID = Chat_ID)
# }