I created a telegram bot that sends quiz with pyrogram, but i want to get the user's answer using a method called Poll.chosen_option and then compare it with the correct answer!! But this method returns None, Please how can i solve that and get what user chosen! Here is my code:
@app.on_message(filters.private & filters.text)
async def my_quiz(client, message : Message):
quiz() # function returns global vars question, answers, answersID
result = await app.send_poll(chat_id=message.chat.id, question=question, options=answers, is_anonymous=False, type="quiz", correct_option_id=answerID)
print(result.poll.chosen_option) # here it returns None, it should return the index of the answer that the user choose