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

Feature: Polls #293

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Feature: Polls #293

wants to merge 1 commit into from

Conversation

Droid00000
Copy link
Contributor

Summary

This PR tries to add support for the entirety of the poll API.

Added

Discordrb::Poll Base class for polls.
Discordrb::Poll::Answer Subclass for poll answers.
Discordrb::Poll::Builder A block style builder that allows for creation of a poll request object.

Discordrb::Events::PollVoteAddEvent Event handler for poll vote add events.
Discordrb::Events::PollVoteRemoveEvent Event handler for poll vote remove events.
Discordrb::EventContainer#poll_vote_add
Discordrb::EventContainer#poll_vote_remove

Discordrb::Channel#send_poll Similar to #send_embed except a poll builder is yielded instead.
Discordrb::API::Channel#get_answer_voters API call for retrieving user objects of poll voters.

Discordrb::API::Channel#end_poll I'm not sure if this endpoint is still supported, so I don't mind removing it.
Discordrb::Message#poll? Method to check if a message object contains a poll.
:server_message_polls, :direct_message_polls Gateway intents for polls.
Discordrb::Webhooks::builder#add_poll Method to add a poll for interactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant