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

Fixing Get Poll Answers endpoint limit from 1000 to 100 #2780

Merged

Conversation

FreshSupaSulley
Copy link
Contributor

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

Corrects the default max and initial limits of the Get Answer Voters endpoint handled in PollVotersPaginationActionImpl.java from 1000 to 100 as specified in the docs. Simply updates the values in its constructor.

Hotfix

Without updating the limit before execution, the request always fails. Because PollVotersPaginationActionImpl is a PaginationAction, users can temporarily correct it by chaining .limit(100) to their request. Example:

pollMessage.retrievePollVoters(answerID).limit(100).queue();

@MinnDevelopment
Copy link
Member

Thank you for fixing this! Please also update the tests to expect the correct values

@MinnDevelopment MinnDevelopment merged commit 5ec2d8e into discord-jda:master Dec 20, 2024
1 check passed
@FreshSupaSulley FreshSupaSulley deleted the fix/get_poll_answers branch December 20, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants