diff --git a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs index 11860629a..4706b629e 100644 --- a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs +++ b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs @@ -410,7 +410,7 @@ namespace Discord /// Task LeaveAsync(RequestOptions options = null); /// - /// Gets amount of bans from the guild. + /// Gets amount of bans from the guild ordered by user ID. /// /// /// @@ -430,7 +430,7 @@ namespace Discord /// IAsyncEnumerable> GetBansAsync(int limit = DiscordConfig.MaxBansPerBatch, RequestOptions options = null); /// - /// Gets amount of bans from the guild starting at the provided + /// Gets amount of bans from the guild starting at the provided ordered by user ID. /// /// /// @@ -452,7 +452,7 @@ namespace Discord /// IAsyncEnumerable> GetBansAsync(ulong fromUserId, Direction dir, int limit = DiscordConfig.MaxBansPerBatch, RequestOptions options = null); /// - /// Gets amount of bans from the guild starting at the provided + /// Gets amount of bans from the guild starting at the provided ordered by user ID. /// /// /// diff --git a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs index f4a2364df..92d598466 100644 --- a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs +++ b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs @@ -334,74 +334,15 @@ namespace Discord.Rest #region Bans - /// - /// Gets amount of bans from the guild. - /// - /// - /// - /// The returned collection is an asynchronous enumerable object; one must call - /// to access the individual messages as a - /// collection. - /// - /// - /// Do not fetch too many bans at once! This may cause unwanted preemptive rate limit or even actual - /// rate limit, causing your bot to freeze! - /// - /// - /// The number of bans to get. - /// The options to be used when sending the request. - /// - /// A paged collection of bans. - /// /param> - /// + /// public IAsyncEnumerable> GetBansAsync(int limit = DiscordConfig.MaxBansPerBatch, RequestOptions options = null) => GuildHelper.GetBansAsync(this, Discord, null, Direction.Before, limit, options); - /// - /// Gets amount of bans from the guild starting at the provided - /// - /// - /// - /// The returned collection is an asynchronous enumerable object; one must call - /// to access the individual messages as a - /// collection. - /// - /// - /// Do not fetch too many bans at once! This may cause unwanted preemptive rate limit or even actual - /// rate limit, causing your bot to freeze! - /// - /// - /// The ID of the user to start to get bans from. - /// The direction of the bans to be gotten. - /// The number of bans to get. - /// The options to be used when sending the request. - /// - /// A paged collection of bans. - /// + /// public IAsyncEnumerable> GetBansAsync(ulong fromUserId, Direction dir, int limit = DiscordConfig.MaxBansPerBatch, RequestOptions options = null) => GuildHelper.GetBansAsync(this, Discord, fromUserId, dir, limit, options); - /// - /// Gets amount of bans from the guild starting at the provided - /// - /// - /// - /// The returned collection is an asynchronous enumerable object; one must call - /// to access the individual messages as a - /// collection. - /// - /// - /// Do not fetch too many bans at once! This may cause unwanted preemptive rate limit or even actual - /// rate limit, causing your bot to freeze! - /// - /// - /// The user to start to get bans from. - /// The direction of the bans to be gotten. - /// The number of bans to get. - /// The options to be used when sending the request. - /// - /// A paged collection of bans. - /// + /// public IAsyncEnumerable> GetBansAsync(IUser fromUser, Direction dir, int limit = DiscordConfig.MaxBansPerBatch, RequestOptions options = null) => GuildHelper.GetBansAsync(this, Discord, fromUser.Id, dir, limit, options); /// diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs index 7a02861ba..49d2cd3bd 100644 --- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs +++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs @@ -622,73 +622,15 @@ namespace Discord.WebSocket #region Bans - /// - /// Gets amount of bans from the guild. - /// - /// - /// - /// The returned collection is an asynchronous enumerable object; one must call - /// to access the individual messages as a - /// collection. - /// - /// - /// Do not fetch too many bans at once! This may cause unwanted preemptive rate limit or even actual - /// rate limit, causing your bot to freeze! - /// - /// - /// The number of bans to get. - /// The options to be used when sending the request. - /// - /// A paged collection of bans. - /// + /// public IAsyncEnumerable> GetBansAsync(int limit = DiscordConfig.MaxBansPerBatch, RequestOptions options = null) => GuildHelper.GetBansAsync(this, Discord, null, Direction.Before, limit, options); - /// - /// Gets amount of bans from the guild starting at the provided - /// - /// - /// - /// The returned collection is an asynchronous enumerable object; one must call - /// to access the individual messages as a - /// collection. - /// - /// - /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual - /// rate limit, causing your bot to freeze! - /// - /// - /// The ID of the user to start to get bans from. - /// The direction of the bans to be gotten. - /// The number of bans to get. - /// The options to be used when sending the request. - /// - /// A paged collection of bans. - /// + /// public IAsyncEnumerable> GetBansAsync(ulong fromUserId, Direction dir, int limit = DiscordConfig.MaxBansPerBatch, RequestOptions options = null) => GuildHelper.GetBansAsync(this, Discord, fromUserId, dir, limit, options); - /// - /// Gets amount of bans from the guild starting at the provided - /// - /// - /// - /// The returned collection is an asynchronous enumerable object; one must call - /// to access the individual messages as a - /// collection. - /// - /// - /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual - /// rate limit, causing your bot to freeze! - /// - /// - /// The user to start to get bans from. - /// The direction of the bans to be gotten. - /// The number of bans to get. - /// The options to be used when sending the request. - /// - /// A paged collection of bans. - /// + /// public IAsyncEnumerable> GetBansAsync(IUser fromUser, Direction dir, int limit = DiscordConfig.MaxBansPerBatch, RequestOptions options = null) => GuildHelper.GetBansAsync(this, Discord, fromUser.Id, dir, limit, options);