-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Ended poll won't have victor answer #10155
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
Comments
You need to check the Victor answer on the poll_result message, not on the poll object you’ve sent. To access the poll you can wait for the poll_result message and then obtain the reference poll: msg.reference.resolved.poll and from there the Victor_answer |
But what is |
It is a shortcut for iterating through the reference message embed fields and finding the “victor_answer_id” field. |
Sorry I couldn't understand, could you give me an example? |
Poll.victor_answer is a shortcut for handling this embed type on the poll_result message. And to get it you need that data which is obtained on the resolved reference message of the message with poll_result type. |
So I can only get the embed information in the result message, and can't get the answer from the poll? |
Summary
I can't get an answer when I end a poll manually
Reproduction Steps
I don't want the poll to last for hours, so I end it earlier
It works well when I end the poll, and it shows the answer in channel
But even if it has a victor answer, the
victor_answer
is still NoneI've tried:
poll.is_finalized()
but ended up in forever waitingbot.wait_for()
and wait until `message.type == discord.MessageType.poll_result)None of these works
Minimal Reproducible Code
Expected Results
It should return a poll with
victor_answer
instead ofvictor_answer
beingNone
Actual Results
It returned a poll with not attribute
victor_answer
, so trying to print the text will go wrongIntents
discord.Intents.all()
System Information
Checklist
Additional Context
No response
The text was updated successfully, but these errors were encountered: