Skip to content

feat: polls overhaul #10328

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

Merged
merged 52 commits into from
Feb 15, 2025
Merged

feat: polls overhaul #10328

merged 52 commits into from
Feb 15, 2025

Conversation

uhKevinMC
Copy link
Contributor

@uhKevinMC uhKevinMC commented Jun 6, 2024

Please describe the changes this PR makes and why it should be merged:

This PR resolves Issue #10326 and adds methods and properties found in similarly structured classes. This also creates a new manager, dubbed the PollAnswerVoterManager to store users that voted for the poll answer, similar to ReactionUserManager for users that reacted to a reaction.

This PR also patches a bug related to poll expiry dates being nullish in the future when polls have the option not to expire.

please do give feedback on this PR, I don't bite

  • Add Poll Answer Voter/User Manager
  • Add partials for Poll and PollAnswer
  • Add support for partials Poll and PollAnswer in respective events
  • Add typings for new properties, methods, classes, and partials
  • Add tests
  • Case testing
  • Sanity check
  • Finalize PR

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)

Copy link

vercel bot commented Jun 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview Feb 15, 2025 8:10pm
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Feb 15, 2025 8:10pm

@Jiralite Jiralite marked this pull request as ready for review June 6, 2024 07:15
@Jiralite Jiralite requested a review from a team as a code owner June 6, 2024 07:15
@Jiralite Jiralite marked this pull request as draft June 6, 2024 07:15
@Jiralite Jiralite added this to the discord.js 14.16 milestone Jun 6, 2024
@Jiralite Jiralite linked an issue Jun 7, 2024 that may be closed by this pull request
@uhKevinMC uhKevinMC marked this pull request as ready for review June 8, 2024 08:14
@uhKevinMC
Copy link
Contributor Author

I'm not able to test this locally, gotta love yarn..

Feedback on this would be appreciated!

@vladfrangu
Copy link
Member

This needs a rebase

@kodiakhq kodiakhq bot merged commit e3e3c21 into discordjs:main Feb 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Emit poll events on uncached messages
6 participants