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

poll.close causes AttributeError #105

Open
3 tasks done
GulgDev opened this issue Dec 28, 2024 · 0 comments
Open
3 tasks done

poll.close causes AttributeError #105

GulgDev opened this issue Dec 28, 2024 · 0 comments

Comments

@GulgDev
Copy link

GulgDev commented Dec 28, 2024

Checklist

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

Description

This functions tries to access poll.chat, which isn't a valid attribute, leading to this error:

AttributeError: 'Poll' object has no attribute 'chat'

Steps to reproduce

  1. Call poll.stop() in an on_poll handler
  2. You get this error

Code example

from pyrogram import Client
from pyrogram.types import Poll

app = Client(...)

@app.on_poll()
async def on_poll(client: Client, poll: Poll):
    await poll.stop()

app.run()

Logs

No response

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