-
Notifications
You must be signed in to change notification settings - Fork 100
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: message polls #293
Open
Droid00000
wants to merge
9
commits into
shardlab:main
Choose a base branch
from
Droid00000:Polls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: message polls #293
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* feat: poll object * Appease da rubocop * Event handlers for polls. * Cleanup. * Requirements> * Fix namespace. * Try again. * Remove yield self. * Fix undefined variable. * Minor fix. * Fix variable stuff. * Simple debug. * Fix some stuff with objects. * t * Try to fix some answer stuff. * Wah * Cleanup. * More fixes. * Another fix. * Another attempt at a fix. * Another debug. * c * Fix. * a. * a * Fixup. * Some stuff for interactions. * Minor touch ups. * Minor cleanup. * New answer counts stuff. * mINOR FIX. * Another fix. * Fixup answer counts. * Cleanup. * Minor refactoring. * Minor fix. * Minor fix. * Minor touch ups. * Try for interactions. * minor mistake. * Another attempt fix. * Prepare for polls. * Cleanup. * Fix some shitty specs. * More stuff idk. * Safety. * Moar. * Yard stuff. * Rubocop. * Fixup yard. * Fix docs again. * Consolidate. * Method signature. * KWARGS. * Fixup. * Fix the polls. * Minor changes. * Update webhooks. * Cleanup docs. * Add method #tied? * Remove some aliases. * One last thing. * Add missing attributes.
* feat: poll object * Appease da rubocop * Event handlers for polls. * Cleanup. * Requirements> * Fix namespace. * Try again. * Remove yield self. * Fix undefined variable. * Minor fix. * Fix variable stuff. * Simple debug. * Fix some stuff with objects. * t * Try to fix some answer stuff. * Wah * Cleanup. * More fixes. * Another fix. * Another attempt at a fix. * Another debug. * c * Fix. * a. * a * Fixup. * Some stuff for interactions. * Minor touch ups. * Minor cleanup. * New answer counts stuff. * mINOR FIX. * Another fix. * Fixup answer counts. * Cleanup. * Minor refactoring. * Minor fix. * Minor fix. * Minor touch ups. * Try for interactions. * minor mistake. * Another attempt fix. * Prepare for polls. * Cleanup. * Fix some shitty specs. * More stuff idk. * Safety. * Moar. * Yard stuff. * Rubocop. * Fixup yard. * Fix docs again. * Consolidate. * Method signature. * KWARGS. * Fixup. * Fix the polls. * Minor changes. * Update webhooks. * Cleanup docs. * Add method #tied? * Remove some aliases. * One last thing. * Add missing attributes. * Rubocop
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR tries to add support for polls.
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.