vysheng / tg

telegram-cli
GNU General Public License v2.0
6.47k stars 1.53k forks source link

Changes peer, JSON support? #300

Open m-derevyanko opened 9 years ago

m-derevyanko commented 9 years ago

First of all, thanx for the great work! Everything works just fine for me.

I have 2 issues:

  1. For now i can send messages by 3 ways: a) msg Katya test (Katya is the correct - name of talker) b) msg Katya_Stepanova test (Katya_Stepanova is the first and last name of contact) c) msg user# test (id of Katya account) Is there any opportunity to send message to the phone number of the Katya? Or i shud go to contact info for getting id or full_name of Katya all the time? It works not obvious for me. My mind works like phone-target system) Because i can easily lose moment, when Katya became Natasha, but i still need to write her a message)
  2. May u do some json support for commands sending by client and for read-socket? Like: {type:'message', time: timestamp, 'from':{phone:'XXX', 'id':'xxx', name:'xxx'}, text:'test message'} ?

All community uses this library as platform for their usefull scripts, which have no need of colors, user-friendly-format of chatting and such things. They need simple opportunity for parsing and sending commands. It wud be just great!

I'm trying to code game-bot for telegram chat, and i have no entire obviuos access to all telegram-cli functions

vysheng commented 9 years ago

It is impossible to send by phone. You have to add user as contact first.

As for interface part, it is possible, but now I don't want to do it. It is possible to change output format through lua script.

m-derevyanko commented 9 years ago

@vysheng Вариант с JSON по типу "ну пожалуйста?" не прокатит, да?))