yagop / telegram-bot

UNMAINTAINED - A Telegram Bot based on plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Allow sending from external

gsantner opened this issue · comments

Currently there is no way to send messages from bot to client just when the bot has data available.
Because telegram-bot blocks the tg-cli instance (cannot send data to a secret chat, when tg-cli is already in use) I always need to kill the bot instance, send text and then restart bot.
Would be great if the bot could provide some socket or like that to where messages can be sent to ->
e.g. Sending String "msg myUser Hello" localhost:4321 should send Hello to myUser.

commented

tg-cli has that option. Since now it's possible to send arguments to tg-cli from launch.sh

./launch.sh --tcp-port 4321

Other terminal:

nc localhost 4321
dialog_list
ANSWER 1425
User ******: 0 unread
User ******: 0 unread
[...]