Skip to content

Commit

Permalink
Fix Get Poll Answers pagination default limit from 1000 to 100 (#2780)
Browse files Browse the repository at this point in the history
  • Loading branch information
FreshSupaSulley authored Dec 20, 2024
1 parent 53131b7 commit 5ec2d8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class PollVotersPaginationActionImpl extends PaginationActionImpl<User, P
{
public PollVotersPaginationActionImpl(JDA jda, String channelId, String messageId, long answerId)
{
super(jda, Route.Messages.GET_POLL_ANSWER_VOTERS.compile(channelId, messageId, Long.toString(answerId)), 1, 1000, 1000);
super(jda, Route.Messages.GET_POLL_ANSWER_VOTERS.compile(channelId, messageId, Long.toString(answerId)), 1, 100, 100);
this.order = PaginationOrder.FORWARD;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void testDefaults()
{
assertThatRequestFrom(newAction())
.hasMethod(Method.GET)
.hasCompiledRoute("channels/381886978205155338/polls/1228092239079804968/answers/5?limit=1000&after=0")
.hasCompiledRoute("channels/381886978205155338/polls/1228092239079804968/answers/5?limit=100&after=0")
.whenQueueCalled();
}

Expand All @@ -45,7 +45,7 @@ void testSkipTo()
long randomId = random.nextLong();
assertThatRequestFrom(newAction().skipTo(randomId))
.hasMethod(Method.GET)
.hasQueryParams("limit", "1000", "after", Long.toUnsignedString(randomId))
.hasQueryParams("limit", "100", "after", Long.toUnsignedString(randomId))
.whenQueueCalled();
}

Expand Down

0 comments on commit 5ec2d8e

Please sign in to comment.