Difference between revisions of "Telegram"
(telegram-cli) |
m |
||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
− | I was interested in experimenting with [https://github.com/vysheng/tg telegram-cli] and thought I better add a few notes. | + | I was interested in experimenting with [https://github.com/vysheng/tg telegram-cli], the command-line [https://telegram.org Telegram] interface, and thought I better add a few notes. |
First I installed it with snap, but later found that there's actually a [https://blog.mypapit.net/2015/08/how-to-install-telegram-cli-in-ubuntu-lts-deb.html deb] available which may have been easier. | First I installed it with snap, but later found that there's actually a [https://blog.mypapit.net/2015/08/how-to-install-telegram-cli-in-ubuntu-lts-deb.html deb] available which may have been easier. |
Revision as of 02:15, 1 July 2018
I was interested in experimenting with telegram-cli, the command-line Telegram interface, and thought I better add a few notes.
First I installed it with snap, but later found that there's actually a deb available which may have been easier.
apt install snapd
snap install telegram cli
Then you simply run it with no parameters, and it will ask you for your account phone number. After you enter it you'll receive a code over SMS and in your other Telegram if it's open, enter the code and you're all ready to go. The full list of commands are available in the GitHub wiki here.
You can then run telegram commands in a one-off way from scripts via shell e.g.
telegram-cli -W -e "msg Henry_McFoobas Hi there what's up?!"
If you installed it from snap then the downloads dir for sending files will be somewhere like ~/snap/telegram-cli/SOME_NUMBER/.telegram-cli/downloads, you need to specify the full path when using it from shell, e.g.
telegram-cli -W -e "send_video /home/fred/snap/telegram-cli/25/.telegram-cli/downloads/MyVideo.mp4"