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 support for Message Polls #2836

Merged
merged 1 commit into from Apr 25, 2024
Merged

Conversation

GnomedDev
Copy link
Member

@GnomedDev GnomedDev commented Apr 10, 2024

This PR adds support for Polls attached to messages. This has been tested for deserialising, creating, getting answer voters, and ending a poll.

The builder is designed differently, as there are many required fields, so I used the typestate pattern to prevent the user from using the builder until it is ready.

@github-actions github-actions bot added the model Related to the `model` module. label Apr 10, 2024
@github-actions github-actions bot added the builder Related to the `builder` module. label Apr 11, 2024
@arqunis arqunis added enhancement An improvement to Serenity. discord feature Related to Discord's functionality. labels Apr 12, 2024
@cheesycod
Copy link
Contributor

@GnomedDev Can this be merged ASAP since it's already out and I want to add stuff to my bot related to polls

@GnomedDev
Copy link
Member Author

No? It doesn't work as-is and I haven't implemented much anyway. If you want to take over this PR, feel free, but I'm not paid to work on serenity so I will work when I feel like it.

@cheesycod
Copy link
Contributor

No? It doesn't work as-is and I haven't implemented much anyway. If you want to take over this PR, feel free, but I'm not paid to work on serenity so I will work when I feel like it.

Oh alright, sorry for the comment btw

@github-actions github-actions bot added the http Related to the `http` module. label Apr 20, 2024
@GnomedDev GnomedDev changed the title Add initial poll models Add support for Message Polls Apr 20, 2024
@GnomedDev GnomedDev marked this pull request as ready for review April 20, 2024 23:10
@GnomedDev
Copy link
Member Author

This is ready for review, I've tested the happy paths but it may need a bit more testing, this can be done after merge though as it's not like we are pushing a release right after.

@github-actions github-actions bot added the client Related to the `client` module. label Apr 21, 2024
@GnomedDev GnomedDev merged commit 5c7d8af into serenity-rs:current Apr 25, 2024
22 checks passed
@GnomedDev GnomedDev deleted the poll-support branch April 25, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder Related to the `builder` module. client Related to the `client` module. discord feature Related to Discord's functionality. enhancement An improvement to Serenity. http Related to the `http` module. model Related to the `model` module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants