Skip to content

[FEATURE] messages.getAllChats method not found in Bot class #2512

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

Closed
goedzo opened this issue May 10, 2021 · 5 comments
Closed

[FEATURE] messages.getAllChats method not found in Bot class #2512

goedzo opened this issue May 10, 2021 · 5 comments
Labels
📋 invalid work status: invalid

Comments

@goedzo
Copy link

goedzo commented May 10, 2021

I want to get all the chats my bot is in, and the messages.getAllChats from the API should give these:
https://core.telegram.org/method/messages.getAllChats

However I am unable to find this method in the Bot class.

getChat(chat_id, timeout=None, api_kwargs=None) is implemented in Bot class, so to me it seems logically that getAllChats can also be added to the same object.

Copy link
Member

@Bibo-Joshi Bibo-Joshi added 📋 invalid work status: invalid and removed enhancement labels May 10, 2021
@goedzo
Copy link
Author

goedzo commented May 10, 2021

@Bibo-Joshi Why is this closed? The official API support this feature:
https://core.telegram.org/method/messages.getAllChats

@Bibo-Joshi
Copy link
Member

That's Mtproto, not the bot API. The Bot API documentation is linked in the FAQ entry that I pointed you to.

@goedzo
Copy link
Author

goedzo commented May 10, 2021

@Bibo-Joshi thanks for the quick reply, but now I am a little confused here. What is the difference between Mtproto and the API?
Under the API/Methods, the getAllChats function is listed: https://core.telegram.org/methods
To me this looked like an api method, but from your reply it seems that this is not?

Nevertheless my goal is to get the chatID from all the groups my bot is in. Is this even possible?

@Bibo-Joshi
Copy link
Member

See tdlib/telegram-bot-api#1 (comment)
If you want to know all chats your bot is a member in, you'll have to keep track. See the chatmemberbot.py example in the examples directory.

@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📋 invalid work status: invalid
Projects
None yet
Development

No branches or pull requests

2 participants