feature: Add MESSAGE_REACTION_REMOVE_EMOJI and RemoveAllReactionsForEmoteAsync (#1544)
* Add event and method * Simplify convert to IEmote
This commit is contained in:
@@ -200,6 +200,10 @@ namespace Discord.WebSocket
|
||||
{
|
||||
_reactions.Clear();
|
||||
}
|
||||
internal void RemoveReactionsForEmote(IEmote emote)
|
||||
{
|
||||
_reactions.RemoveAll(x => x.Emote.Equals(emote));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task AddReactionAsync(IEmote emote, RequestOptions options = null)
|
||||
@@ -214,6 +218,9 @@ namespace Discord.WebSocket
|
||||
public Task RemoveAllReactionsAsync(RequestOptions options = null)
|
||||
=> MessageHelper.RemoveAllReactionsAsync(this, Discord, options);
|
||||
/// <inheritdoc />
|
||||
public Task RemoveAllReactionsForEmoteAsync(IEmote emote, RequestOptions options = null)
|
||||
=> MessageHelper.RemoveAllReactionsForEmoteAsync(this, emote, Discord, options);
|
||||
/// <inheritdoc />
|
||||
public IAsyncEnumerable<IReadOnlyCollection<IUser>> GetReactionUsersAsync(IEmote emote, int limit, RequestOptions options = null)
|
||||
=> MessageHelper.GetReactionUsersAsync(this, emote, limit, Discord, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user