我正在使用一个库来通过 bash linux ubuntu 中的命令行访问电报。它是电报cli。参考https://github.com/vysheng/tg
它是一个交互式程序,可以由
./bin/telegram-cli -k tg-server.pub
它输出这些行:
Telegram-cli version 1.1.1, Copyright (C) 2013-2014 Vitaly Valtman
Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type `show_license'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show_license' for details.
I: config dir=[/home/utonto/.telegram-cli]
>
使用“>”提示。要发送消息,在此提示下您必须输入
msg USERNAME This is a test message
我想在我的电脑上运行一个脚本,告诉我工作时的室温。我怎样才能做到这一点?我搜索了 SO 并发现了一个类似的问题。建议使用“expect”命令,我这样做了,但是没有用。也许-当然-因为我是初学者。我也试过
echo "msg USERNAME this is a message |
telegram-cli -k ......"
但它没有用。据您所知,在我的 android 上,我有一个用于电报的电话号码,但我使用另一部电话注册到电报 cli。有人能帮我吗?