vysheng / tg

telegram-cli
GNU General Public License v2.0
6.42k stars 1.52k forks source link

How to get ID if contact or dialog? #780

Open temapavloff opened 8 years ago

temapavloff commented 8 years ago

I'd like to send message to specific group chat, but I need to know ID of it to do that.

How can I get an ID? When I'm performing contact_list or dialog_list it only returns real names without any additional info:

Chat NYA Framework chat: 0 unread
User Александра Глоба: 0 unread
User Alex Dets: 0 unread
User Stickers: 0 unread
User PollBot: 0 unread
User Vadim Lopatyuk: 0 unread
User BotFather: 0 unread
User FoodBot: 0 unread
User Владислав Безверхий: 0 unread
User ImageBot: 0 unread
User Telegram: 0 unread
User Chin Yu: 0 unread
User Екатерина Козловская: 0 unread
User Вячеслав Гордеев: 0 unread
User Лежит ли ВК?: 0 unread
User Dmitry Kozlovksiy: 0 unread
User Anthony: 0 unread
User Саша Лопатюк: 0 unread
User Boobs bot: 0 unread
User ImageSearch: 0 unread
User Yandex Maps: 0 unread
User Анастасия Фомичева: 0 unread
Chat gik.me GNU/Linux: 0 unread
Chat Церковь поклонения теории вероятности: 0 unread
User Арсений Лебедюшкин: 0 unread
Chat Gikme, pls: 0 unread
Chat Дискотека Gik.me: 3 unread
Chat gik.me pub: 4 unread
kenniki commented 8 years ago

Try JSON.

eliafino commented 8 years ago

Try chat_info gik.me

ahmadsl commented 6 years ago

@kenniki i try json and get peer_id and id. what is id? how can i get username of channel or invitelink of groups? i want join this channel and groups on another telegram client