I had this need to send compressed files/folders through the command line to my telegram bot, and this small script came in handy.
- Find your chat_id by: (your bot token is the token from the botfather )
curl https://api.telegram.org/bot**YourBOTToken**/getUpdates
-
Fill chatid and bot_taken variables inside the script
-
Send Files by:
./SendTelegram file1 file2 file3
- curl
- tar
I believe these dependencies are present in most linux machines.
Some helpful links that made this script possible: