Skip to content
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

Problems with getChat #3191

Closed
TunifyBasic opened this issue Dec 16, 2024 · 3 comments
Closed

Problems with getChat #3191

TunifyBasic opened this issue Dec 16, 2024 · 3 comments

Comments

@TunifyBasic
Copy link

TunifyBasic commented Dec 16, 2024

hello so i am experimenting with tdlib these days and i have problems with get chat

message = event.get("message", {})
content = message.get("content", {})
content_type = content.get("@type")
td_send({'@type': 'getChat', 'id': message.get("chat_id") })

that was the code and it's always fail due to:

{'@type': 'error', 'code': 400, 'message': 'Invalid chat identifier specified', '@client_id': 1}

is this expected or am i missing something?
and btw thx.

@levlam
Copy link
Contributor

levlam commented Dec 16, 2024

Likely, you pass 0 instead of chat_id. Check TDLib logs or print the chat_id before the request.

@TunifyBasic
Copy link
Author

{'@type': 'getChat', 'id': -10013033321xx}
{'@type': 'getChat', 'id': -10017272565xx}
{'@type': 'getChat', 'id': -10019504744xx}
{'@type': 'getChat', 'id': -10021883855xx}
{'@type': 'getChat', 'id': -10017501665xx}

it's something like this i tried also to pass them as if they were strings but also didn't work

@levlam
Copy link
Contributor

levlam commented Dec 16, 2024

The name of the parameter of getChat is chat_id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants