-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getUserGifts/getUserGift returns None #3250
Comments
This isn't related to the Bot API server, You receive None from your Bot API library/framework. |
I am using them directly through the tdlib json interface. I used this as an example https://github.com/tdlib/td/blob/master/example/python/tdjson_example.py and tried using this method: https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1get_user_gifts.html when I try to see the response via td_receive I am seeing None if you can show how to call it correctly, I'd really appreciate that I was using td_send({'@type': 'getUserGifts', 'user_id': 762137, 'offset': "", 'limit': 10 }) |
See https://core.telegram.org/tdlib/docs/td__json__client_8h.html for the description of the correct usage of the JSON interface. |
I am already using this. I tried calling a few other methods like getUser or getAvailableGifts and everything works as expected. When I try to call getUserGifts I receive this: b'{'@type': 'error', 'code': 400, 'message': 'Failed to parse JSON object as TDLib request: Unknown class "getUserGifts"', '@client_id': 1}' Please help, I checked the docs a couple of times and I don't see any difference between those methods besides the parameters. |
The error means that your TDLib version doesn't support the request. You use documentation from a different version. |
So I was using these website as mentioned in getting started to build the tdlib. https://tdlib.github.io/td/build.html I've made a search through all of the files and in this repository this function getUserGifts doesn't exist. Other functions do exist like getAvailableGifts and that's why they are working. So where can I get a different version of the tdlib? |
The build instructions build the latest TDLib version. You can find documentation for the latest version at https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl. |
when trying to call almost any method related to gifts I always receive None. also haven't seen that these methods were implemented even though they are mentioned in the docs
The text was updated successfully, but these errors were encountered: