Spaces:
Running
Running
File size: 851 Bytes
a7ff8c9 c96bd11 3eea08e c96bd11 3eea08e ac47e66 eb22c28 a7ff8c9 3eea08e c96bd11 a7ff8c9 4f1c0a3 a7ff8c9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
from pyrogram import Client
from FileStream.bot import FileStream
@FileStream.on_message(filters.command("result"))
async def get_result(FileStream , message):
result = await FileStream.get_messages(chat_id , poll.id)
print(result.poll.chosen_option)
"""
@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))
""" |