Skip to content
Advertisement

How to pass data in object_ptr format in python-telegram library

In python-telegram lib; I have a problem with calling methods which require data in object_ptr data type (You can read about it in tdlib documentation)

Exactly my problem is in addContact method. How should I pass data in params ?

I act like this:

JavaScript

The print result is None & no contact is added.

Where is the problem?

This links may be useful:

TDLib addContact Class Reference

TDLib contact Class Reference

Advertisement

Answer

Finaly I found the solution

I should use importContacts method to add contacts by phone number and without knowing user ID.

Also, printing result.error_info will be useful

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement