Skip to content

Commit 5ec2d8e

Browse files
Fix Get Poll Answers pagination default limit from 1000 to 100 (#2780)
1 parent 53131b7 commit 5ec2d8e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/net/dv8tion/jda/internal/requests/restaction/pagination/PollVotersPaginationActionImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class PollVotersPaginationActionImpl extends PaginationActionImpl<User, P
3636
{
3737
public PollVotersPaginationActionImpl(JDA jda, String channelId, String messageId, long answerId)
3838
{
39-
super(jda, Route.Messages.GET_POLL_ANSWER_VOTERS.compile(channelId, messageId, Long.toString(answerId)), 1, 1000, 1000);
39+
super(jda, Route.Messages.GET_POLL_ANSWER_VOTERS.compile(channelId, messageId, Long.toString(answerId)), 1, 100, 100);
4040
this.order = PaginationOrder.FORWARD;
4141
}
4242

src/test/java/net/dv8tion/jda/test/entities/message/PollVotersPaginationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void testDefaults()
3535
{
3636
assertThatRequestFrom(newAction())
3737
.hasMethod(Method.GET)
38-
.hasCompiledRoute("channels/381886978205155338/polls/1228092239079804968/answers/5?limit=1000&after=0")
38+
.hasCompiledRoute("channels/381886978205155338/polls/1228092239079804968/answers/5?limit=100&after=0")
3939
.whenQueueCalled();
4040
}
4141

@@ -45,7 +45,7 @@ void testSkipTo()
4545
long randomId = random.nextLong();
4646
assertThatRequestFrom(newAction().skipTo(randomId))
4747
.hasMethod(Method.GET)
48-
.hasQueryParams("limit", "1000", "after", Long.toUnsignedString(randomId))
48+
.hasQueryParams("limit", "100", "after", Long.toUnsignedString(randomId))
4949
.whenQueueCalled();
5050
}
5151

0 commit comments

Comments
 (0)