如何使用 vcard 在电报 cli 中添加联系人? [英] how to add contacts in telegram-cli by using vcard?
本文介绍了如何使用 vcard 在电报 cli 中添加联系人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 vcard 在电报 cli 中添加我的联系人.但是当我使用这个命令时:
im trying to add my contacts in telegram-cli by using vcard. but when i use this command:
import_card <card>
什么都没发生!它只是转到下一行,没有任何错误,也没有添加联系人.
nothing happen! it just goes to next line without any error and no contact added.
我的电子名片是 VERSION:2.1
my vcard is VERSION:2.1
如何使用 vcard 将我的联系人添加到我的电报帐户?
how can i improt my contacts to my telegram account by using vcard?
推荐答案
Install-Package TLSharp
Install-Package TLSharp
client = new TelegramClient(apiId, apiHash);
await client.ConnectAsync();
var phoneContact = new TLInputPhoneContact() { phone = "", first_name = "", last_name = "" };
var contacts = new List<TLInputPhoneContact>() { phoneContact };
var req = new TeleSharp.TL.Contacts.TLRequestImportContacts() { contacts = new TLVector<TLInputPhoneContact>() { lists = contacts } };
var rrr= await client.SendRequestAsync<TeleSharp.TL.Contacts.TLImportedContacts>(req);
这篇关于如何使用 vcard 在电报 cli 中添加联系人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文