Renamed existing Flatten method to FlattenAsync and added new Flatten method. Also fixed ClientHelper using incorrect guild batch count. (#744)

This commit is contained in:
ObsidianMinor
2018-01-06 21:43:11 -06:00
committed by Christopher F
parent edfbd055bb
commit 5bbd9bba82
4 changed files with 63 additions and 11 deletions

View File

@@ -413,7 +413,7 @@ namespace Discord.Rest
async Task<IReadOnlyCollection<IGuildUser>> IGuild.GetUsersAsync(CacheMode mode, RequestOptions options)
{
if (mode == CacheMode.AllowDownload)
return (await GetUsersAsync(options).Flatten().ConfigureAwait(false)).ToImmutableArray();
return (await GetUsersAsync(options).FlattenAsync().ConfigureAwait(false)).ToImmutableArray();
else
return ImmutableArray.Create<IGuildUser>();
}