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
CHAT_ADMIN_REQUIRED #1405
Comments
This error is likely occurring because the GetMegagroupStats method requires the client to be an administrator in the supergroup. Please assign me this task and I will do my best to fix this issue |
Did u try GetChatMembers instead of GetMegagroupStats ? But it may not be as detailed |
well, that's what i needed first. i will try getchatmembers but it doesn't seem to be thing i'm looking for |
My logic is, there may be something which is not allowing u to be set as admin. Try getting info on yourself using get_chat_member. I think something similar to this: `from pyrogram import Client app = Client("my_account") @app.on_message() app.run()` Replace my_account with your username |
Checklist
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development versionDescription
pyrogram.errors.exceptions.bad_request_400.ChatAdminRequired: Telegram says: [400 CHAT_ADMIN_REQUIRED] - The method requires chat admin privileges (caused by "stats.GetMegagroupStats")
app.invoke is throwing this. i'm chat owner(means i'm admin as well lol)
Steps to reproduce
async def main():
async with Client("my_account", api_id, api_hash) as app:
r = await app.invoke(GetMegagroupStats(channel=await app.resolve_peer(super_group_id)))
print(r)
if name == 'main':
asyncio.run(main())
Code example
No response
Logs
No response
The text was updated successfully, but these errors were encountered: