Support the "Clear Reactions" endpoint
This commit is contained in:
@@ -38,6 +38,11 @@ namespace Discord.Rest
|
||||
await client.ApiClient.RemoveReactionAsync(msg.Channel.Id, msg.Id, user.Id, emoji, options).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static async Task RemoveAllReactionsAsync(IMessage msg, BaseDiscordClient client, RequestOptions options)
|
||||
{
|
||||
await client.ApiClient.RemoveAllReactionsAsync(msg.Channel.Id, msg.Id, options);
|
||||
}
|
||||
|
||||
public static async Task<IReadOnlyCollection<IUser>> GetReactionUsersAsync(IMessage msg, string emoji,
|
||||
Action<GetReactionUsersParams> func, BaseDiscordClient client, RequestOptions options)
|
||||
{
|
||||
|
||||
@@ -142,6 +142,9 @@ namespace Discord.Rest
|
||||
=> MessageHelper.RemoveReactionAsync(this, user, emoji, Discord, options);
|
||||
public Task RemoveReactionAsync(string emoji, IUser user, RequestOptions options = null)
|
||||
=> MessageHelper.RemoveReactionAsync(this, user, emoji, Discord, options);
|
||||
|
||||
public Task RemoveAllReactionsAsync(RequestOptions options = null)
|
||||
=> MessageHelper.RemoveAllReactionsAsync(this, Discord, options);
|
||||
|
||||
public Task<IReadOnlyCollection<IUser>> GetReactionUsersAsync(string emoji, int limit = 100, ulong? afterUserId = null, RequestOptions options = null)
|
||||
=> MessageHelper.GetReactionUsersAsync(this, emoji, x => { x.Limit = limit; x.AfterUserId = afterUserId.HasValue ? afterUserId.Value : Optional.Create<ulong>(); }, Discord, options);
|
||||
|
||||
Reference in New Issue
Block a user