W
W
WinconeCoder2021-01-10 00:55:06
API
WinconeCoder, 2021-01-10 00:55:06

How to set a Vector for the contacts.importContacts method?

There is a contacts.importContacts method related to the UserAPI.

I use the telegram-mtproto library:
https://github.com/zerobias/telegram-mtproto

In one of the questions I saw this library:

let contact = {
client_id: 1, //long
phone: 'phone', //string
first_name: 'name', //string
last_name: 'name' //strings
};
let cont = new tl.TypeVector({type: 'InputContact', list: [contact]});
return client.callApi('contacts.importContacts', cont, true);


But I can't figure out where tl.TypeVector came from.

Here is the question itself:
https://github.com/zerobias/telegram-mtproto/issues/6

Found this thing:
https://stek29.rocks/tl-schema/latest/method/conta...

And also not quite It is clear how the array I need is formed.

Can you suggest the best way to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WinconeCoder, 2021-01-10
@WinconeCoder

Found a solution.
Answer: no way, it's better to make bots for VK

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question