如何在pythontelegram库中提供object_ptr数据

2024-06-03 12:50:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我在调用需要object_ptr(写在tdlib文档中)数据的方法时遇到问题

确切地说,我指的是addContact方法。我应该如何在params中提供数据

我这样做:

result = t.call_method('addContact',params={'contact' : { 'phone_number' : 'some number' , 'first_name' : 'some name' , 'last_name' : 'some thing' , 'vcard' : '' , 'user_id' : 0 } , 'share_phone_number' : False})
result.wait()
print(result.update)

它打印None,不添加联系人

问题在哪里

以下链接可能有用:

TDLib addContact Class Reference

TDLib contact Class Reference


Tags: 方法namenumberobjectcontactphonesomeparams