Skip to content
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

Add polls support #2219

Merged
merged 118 commits into from
Mar 27, 2025
Merged

Add polls support #2219

merged 118 commits into from
Mar 27, 2025

Conversation

mplatypus
Copy link
Contributor

@mplatypus mplatypus commented Mar 18, 2025

Summary

Adding polls to hikari

Checklist

  • I have run nox and all the pipelines have passed.
  • I have made unittests according to the code I have added/modified/deleted.

Related issues

Closes #1886

PythonTryHard and others added 30 commits May 19, 2024 20:36
Having an `attrs` class with `weakref_slot=False` at the same time as a
predefined `__slots__` will cause `attrs` to throw a fit:
    TypeError: 'property' object is not iterable
...oops

Signed-off-by: PythonTryHard <[email protected]>
added `_serialize_poll_media()` and fixed polls question serialisation.
The removal of the counter has been added, so that the user can choose there own options, however, they may need to add a check because in its current form, you can override other answers.
- De-underscore `answer_payload`.
- Remove unnecessary `dict.get` from `deserialize_poll`.
- Streamline serialization of poll in `_build_message_payload`.
- API endpoint naming consistency.
- Correct typing targeting Python 3.8

Co-authored-by: davfsa <[email protected]>
Signed-off-by: PythonTryHard <[email protected]>
Copy link
Member

@davfsa davfsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be the last ones!

Co-authored-by: davfsa <[email protected]>
Signed-off-by: Platy <[email protected]>
davfsa
davfsa previously approved these changes Mar 21, 2025
Copy link
Member

@davfsa davfsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a bit of better documentation on the changelog, but LGTM!

@davfsa davfsa merged commit 9cccc39 into hikari-py:master Mar 27, 2025
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Support Polls
3 participants