Some basic script to send messages or files to your telegram account. Can be used for forwarding information to your phone.
Hello! Thank you for your script! When I run it on my router I get the following:
: not foundd.sh: line 3:
Telegram Sender
usage: [FILENAME] [FILETYPE]
-t,--token Provide Telegram bot token
-c,--chatid Provide ID to Send to
-f,--file File to send
-a,--audio Send as Audio File
-v,--voice Send as Voice File
-d,--document Send as Document aka any filetype
--text Text to Send
Examples:
telegram --text "TEST" -c 1111111 -t BoTtOkEn
telegram -f /somefile -d -c 111111 -t BoTtOkEn
: not foundd.sh: line 21: }
: not foundd.sh: line 22:
: not foundd.sh: line 24:
: not foundd.sh: line 28:
: not foundd.sh: line 29:
/root/tgsend.sh: line 32: syntax error: unexpected word (expecting "in")
What do all these errors mean?
Did you try wget:ing the raw version?
Yes, I downloaded the script with this command: wget https://pastebin.com/raw/LEXk7vfB
didn't you even look at the file after DLing ?
this is why it fails, even when using raw mode.
Should I remove "^M" at the end of each line? How to do it fast? The "replace" function in Midnight Commander's editor couldn't find this, although it displays it and I can delete it manually.
dos2unix FTW
I made my own script that will upload all files from the specified folder and delete them after uploading. Images and videos will be uploaded as images and videos accordingly.