BinaryONe
changes In Upload
ac47e66
raw
history blame
646 Bytes
from pyrogram import Client
from FileStream.bot import FileStream
@FileStream.on_poll()
def handle_poll(FileStream, poll):
print(f"Poll ID: {poll.id}")
print(f"Question: {poll.question}")
print(f"Options: {poll.options}")
print(f"Options: {poll.answers}")
print(f"Total Voters: {poll.total_voter_count}")
"""
@FileStream.on_poll()
def handle_poll(FileStream, poll, poll_answer):
user_id = poll_answer.user.id
poll_id = poll_answer.poll_id
option_ids = poll_answer.option_ids
print(f"User {user_id} voted in poll {poll_id} for options {option_ids}")
app.loop.create_task(poll_handler(client, poll))
"""