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

feat: message polls #293

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

feat: message polls #293

wants to merge 9 commits into from

Conversation

Droid00000
Copy link
Contributor

@Droid00000 Droid00000 commented Dec 13, 2024

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.

* 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
@Droid00000 Droid00000 changed the title Feature: Polls feat: message polls Jan 27, 2025
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