From ff8cb63f9fb5432330f3532aa714fd549d0b78eb Mon Sep 17 00:00:00 2001 From: LtLi0n Date: Wed, 6 Nov 2019 01:30:31 +0200 Subject: [PATCH] Fixed GetUsersAsync to use MaxUsersPerBatch const as limit instead of MaxMessagesPerBatch. Requests are now returning up to 1000 guild user entities instead of the previous 100. --- src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs b/src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs index 3f5565ccf..d20aed431 100644 --- a/src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs +++ b/src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs @@ -343,7 +343,7 @@ namespace Discord.Rest ulong? fromUserId, int? limit, RequestOptions options) { return new PagedAsyncEnumerable( - DiscordConfig.MaxMessagesPerBatch, + DiscordConfig.MaxUsersPerBatch, async (info, ct) => { var args = new GetGuildMembersParams @@ -357,7 +357,7 @@ namespace Discord.Rest }, nextPage: (info, lastPage) => { - if (lastPage.Count != DiscordConfig.MaxMessagesPerBatch) + if (lastPage.Count != DiscordConfig.MaxUsersPerBatch) return false; info.Position = lastPage.Max(x => x.Id); return true;