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
feat: Polls #2408
base: master
Are you sure you want to change the base?
feat: Polls #2408
Conversation
As the main PR is merged, this is effectively ready
Now for the creation of polls, I wasn't entirely sure on the best approach.
But
Due to the extensiveness of the polls API, I feel this is one of those instances where it's beneficial to add extra convenience for the user instead of sticking to it religiously.
If you are able to, please stress test this PR and see if the internally cached vote counts are able to keep up with realtime counts on Discord, especially when bouncing between 1-0 votes on specific answers; this part involves manual deletion and creation of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation suggestions
- fix minor mistakes
- more formal writing
- formatting
"""Add an answer to this poll. | ||
|
||
This function returns the class instance to allow for fluent-style | ||
chaining. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add an example?
Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: UK <41271523+NeloBlivion@users.noreply.github.com>
Summary
Implements polls and related features. WIP while the original PR becomes more stable over the experimental phase.
References:
Notes:
ForAfter reconsidering, this wasn't great. ForPoll
andPollAnswer
,PollMedia
is abstracted to its attributes (e.g.Poll.PollMedia.text
is assigned toPoll.question
). An undocumented attribute_media
still remains.__init__
s you can just pass the strings, but otherwise you'd access throughPoll.question.text
, for example.Will work on a new AsyncIterator for answer.usersCompleteInformation
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.