diff --git a/src/Discord.Net.Core/Entities/Channels/IChannel.cs b/src/Discord.Net.Core/Entities/Channels/IChannel.cs index b66f778fb..e2df86f2a 100644 --- a/src/Discord.Net.Core/Entities/Channels/IChannel.cs +++ b/src/Discord.Net.Core/Entities/Channels/IChannel.cs @@ -17,14 +17,24 @@ namespace Discord string Name { get; } /// - /// Gets a collection of all users in this channel. + /// Gets a collection of users that are able to view the channel or are currently in this channel. /// + /// + /// + /// The returned collection is an asynchronous enumerable object; one must call + /// to access the individual messages as a + /// collection. + /// + /// This method will attempt to fetch all users that is able to view this channel or is currently in this channel. + /// The library will attempt to split up the requests according to and . + /// In other words, if there are 3000 users, and the constant + /// is 1000, the request will be split into 3 individual requests; thus returning 53individual asynchronous + /// responses, hence the need of flattening. + /// /// The that determines whether the object should be fetched from cache. /// The options to be used when sending the request. /// - /// A paged collection containing a collection of users that can access this channel. Flattening the - /// paginated response into a collection of users with - /// is required if you wish to access the users. + /// Paged collection of users. /// IAsyncEnumerable> GetUsersAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); diff --git a/src/Discord.Net.Core/Entities/Channels/IGuildChannel.cs b/src/Discord.Net.Core/Entities/Channels/IGuildChannel.cs index efa5fb1e8..992bd71fc 100644 --- a/src/Discord.Net.Core/Entities/Channels/IGuildChannel.cs +++ b/src/Discord.Net.Core/Entities/Channels/IGuildChannel.cs @@ -132,14 +132,16 @@ namespace Discord Task AddPermissionOverwriteAsync(IUser user, OverwritePermissions permissions, RequestOptions options = null); /// - /// Gets a collection of users that are able to view the channel. + /// Gets a collection of users that are able to view the channel or are currently in this channel. /// + /// + /// This method follows the same behavior as described in . + /// Please visit its documentation for more details on this method. + /// /// The that determines whether the object should be fetched from cache. /// The options to be used when sending the request. /// - /// A paged collection containing a collection of guild users that can access this channel. Flattening the - /// paginated response into a collection of users with - /// is required if you wish to access the users. + /// Paged collection of users. /// new IAsyncEnumerable> GetUsersAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); /// diff --git a/src/Discord.Net.Core/Extensions/AsyncEnumerableExtensions.cs b/src/Discord.Net.Core/Extensions/AsyncEnumerableExtensions.cs index 56ed68cfe..282d20517 100644 --- a/src/Discord.Net.Core/Extensions/AsyncEnumerableExtensions.cs +++ b/src/Discord.Net.Core/Extensions/AsyncEnumerableExtensions.cs @@ -5,6 +5,11 @@ using System.Threading.Tasks; namespace Discord { /// An extension class for squashing . + /// + /// This set of extension methods will squash an into a + /// single . This is often associated with requests that has a + /// set limit when requesting. + /// public static class AsyncEnumerableExtensions { /// Flattens the specified pages into one asynchronously.