Add support for audit log reasons (#708)
* Add support for audit log reasons * Made changes per discussion
This commit is contained in:
committed by
RogueException
parent
9085e44dda
commit
1ce1c019b3
@@ -281,10 +281,10 @@ namespace Discord.WebSocket
|
||||
public Task<IReadOnlyCollection<RestBan>> GetBansAsync(RequestOptions options = null)
|
||||
=> GuildHelper.GetBansAsync(this, Discord, options);
|
||||
|
||||
public Task AddBanAsync(IUser user, int pruneDays = 0, RequestOptions options = null)
|
||||
=> GuildHelper.AddBanAsync(this, Discord, user.Id, pruneDays, options);
|
||||
public Task AddBanAsync(ulong userId, int pruneDays = 0, RequestOptions options = null)
|
||||
=> GuildHelper.AddBanAsync(this, Discord, userId, pruneDays, options);
|
||||
public Task AddBanAsync(IUser user, int pruneDays = 0, string reason = null, RequestOptions options = null)
|
||||
=> GuildHelper.AddBanAsync(this, Discord, user.Id, pruneDays, reason, options);
|
||||
public Task AddBanAsync(ulong userId, int pruneDays = 0, string reason = null, RequestOptions options = null)
|
||||
=> GuildHelper.AddBanAsync(this, Discord, userId, pruneDays, reason, options);
|
||||
|
||||
public Task RemoveBanAsync(IUser user, RequestOptions options = null)
|
||||
=> GuildHelper.RemoveBanAsync(this, Discord, user.Id, options);
|
||||
|
||||
@@ -122,8 +122,8 @@ namespace Discord.WebSocket
|
||||
|
||||
public Task ModifyAsync(Action<GuildUserProperties> func, RequestOptions options = null)
|
||||
=> UserHelper.ModifyAsync(this, Discord, func, options);
|
||||
public Task KickAsync(RequestOptions options = null)
|
||||
=> UserHelper.KickAsync(this, Discord, options);
|
||||
public Task KickAsync(string reason = null, RequestOptions options = null)
|
||||
=> UserHelper.KickAsync(this, Discord, reason, options);
|
||||
/// <inheritdoc />
|
||||
public Task AddRoleAsync(IRole role, RequestOptions options = null)
|
||||
=> AddRolesAsync(new[] { role }, options);
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Discord.WebSocket
|
||||
GuildPermissions IGuildUser.GuildPermissions => GuildPermissions.Webhook;
|
||||
|
||||
ChannelPermissions IGuildUser.GetPermissions(IGuildChannel channel) => Permissions.ToChannelPerms(channel, GuildPermissions.Webhook.RawValue);
|
||||
Task IGuildUser.KickAsync(RequestOptions options)
|
||||
Task IGuildUser.KickAsync(string reason, RequestOptions options)
|
||||
{
|
||||
throw new NotSupportedException("Webhook users cannot be kicked.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user