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

Bound method isn't working (sometimes) #106

Open
3 tasks done
iamgojoof6eyes opened this issue Nov 11, 2024 · 0 comments
Open
3 tasks done

Bound method isn't working (sometimes) #106

iamgojoof6eyes opened this issue Nov 11, 2024 · 0 comments

Comments

@iamgojoof6eyes
Copy link

Checklist

  • I am sure the error is coming from Pyrogram's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version

Description

Sometimes while using bound methods the method doesn't work however it may or may not throw errors.
I was using success = Message.chat.unban_member(user_id) and was printing success it is showing true in the console however user is not getting unbanned. This is the most recent example I have faced it few more times while using bound methods

Steps to reproduce

Use Message.chat.ban_member(user_id) then use Message.chat.unban_member(user_id)

Code example

from pyrogram.types import Message

@Client.on_message()
async def ban_memberss(_, m: Message):
    u_id = m.from_user.id
    await m.chat.ban_member(u_id)
    success = await m.chat.unban_member(u_id)
    print(success)

Logs

There are no errors for this code I am getting `True` in the console however the user is still banned
@iamgojoof6eyes iamgojoof6eyes changed the title Bound method doesn't work Bound method isn't working (sometimes) Nov 11, 2024
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

1 participant