Implement GetBanAsync (#1056)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Discord.Audio;
|
||||
using Discord.Audio;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
@@ -66,6 +66,24 @@ namespace Discord
|
||||
|
||||
/// <summary> Gets a collection of all users banned on this guild. </summary>
|
||||
Task<IReadOnlyCollection<IBan>> GetBansAsync(RequestOptions options = null);
|
||||
/// <summary>
|
||||
/// Gets a ban object for a banned user.
|
||||
/// </summary>
|
||||
/// <param name="user">The banned user.</param>
|
||||
/// <returns>
|
||||
/// An awaitable <see cref="Task"/> containing the ban object, which contains the user information and the
|
||||
/// reason for the ban; <see langword="null"/> if the ban entry cannot be found.
|
||||
/// </returns>
|
||||
Task<IBan> GetBanAsync(IUser user, RequestOptions options = null);
|
||||
/// <summary>
|
||||
/// Gets a ban object for a banned user.
|
||||
/// </summary>
|
||||
/// <param name="userId">The snowflake identifier for the banned user.</param>
|
||||
/// <returns>
|
||||
/// An awaitable <see cref="Task"/> containing the ban object, which contains the user information and the
|
||||
/// reason for the ban; <see langword="null"/> if the ban entry cannot be found.
|
||||
/// </returns>
|
||||
Task<IBan> GetBanAsync(ulong userId, RequestOptions options = null);
|
||||
/// <summary> Bans the provided user from this guild and optionally prunes their recent messages. </summary>
|
||||
/// <param name="pruneDays">The number of days to remove messages from this user for - must be between [0, 7]</param>
|
||||
Task AddBanAsync(IUser user, int pruneDays = 0, string reason = null, RequestOptions options = null);
|
||||
@@ -135,4 +153,4 @@ namespace Discord
|
||||
/// <summary> Deletes an existing emote from this guild. </summary>
|
||||
Task DeleteEmoteAsync(GuildEmote emote, RequestOptions options = null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user