[ifcbrk] feature: id overload for RemoveReactionAsync (#1310)
* Added id overload for RemoveReactionAsync * Fixed the docs strings
This commit is contained in:
committed by
Christopher F
parent
faf23dee35
commit
c88b1dada7
@@ -96,6 +96,23 @@ namespace Discord
|
||||
/// <seealso cref="IEmote"/>
|
||||
Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null);
|
||||
/// <summary>
|
||||
/// Removes a reaction from message.
|
||||
/// </summary>
|
||||
/// <example>
|
||||
/// The following example removes the reaction, <c>💕</c>, added by the user with ID 84291986575613952 from the message.
|
||||
/// <code language="cs">
|
||||
/// await msg.RemoveReactionAsync(new Emoji("\U0001f495"), 84291986575613952);
|
||||
/// </code>
|
||||
/// </example>
|
||||
/// <param name="emote">The emoji used to react to this message.</param>
|
||||
/// <param name="userId">The ID of the user that added the emoji.</param>
|
||||
/// <param name="options">The options to be used when sending the request.</param>
|
||||
/// <returns>
|
||||
/// A task that represents the asynchronous operation for removing a reaction to this message.
|
||||
/// </returns>
|
||||
/// <seealso cref="IEmote"/>
|
||||
Task RemoveReactionAsync(IEmote emote, ulong userId, RequestOptions options = null);
|
||||
/// <summary>
|
||||
/// Removes all reactions from this message.
|
||||
/// </summary>
|
||||
/// <param name="options">The options to be used when sending the request.</param>
|
||||
|
||||
@@ -50,9 +50,9 @@ namespace Discord.Rest
|
||||
await client.ApiClient.AddReactionAsync(msg.Channel.Id, msg.Id, emote is Emote e ? $"{e.Name}:{e.Id}" : emote.Name, options).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static async Task RemoveReactionAsync(IMessage msg, IUser user, IEmote emote, BaseDiscordClient client, RequestOptions options)
|
||||
public static async Task RemoveReactionAsync(IMessage msg, ulong userId, IEmote emote, BaseDiscordClient client, RequestOptions options)
|
||||
{
|
||||
await client.ApiClient.RemoveReactionAsync(msg.Channel.Id, msg.Id, user.Id, emote is Emote e ? $"{e.Name}:{e.Id}" : emote.Name, options).ConfigureAwait(false);
|
||||
await client.ApiClient.RemoveReactionAsync(msg.Channel.Id, msg.Id, userId, emote is Emote e ? $"{e.Name}:{e.Id}" : emote.Name, options).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static async Task RemoveAllReactionsAsync(IMessage msg, BaseDiscordClient client, RequestOptions options)
|
||||
|
||||
@@ -155,7 +155,10 @@ namespace Discord.Rest
|
||||
=> MessageHelper.AddReactionAsync(this, emote, Discord, options);
|
||||
/// <inheritdoc />
|
||||
public Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null)
|
||||
=> MessageHelper.RemoveReactionAsync(this, user, emote, Discord, options);
|
||||
=> MessageHelper.RemoveReactionAsync(this, user.Id, emote, Discord, options);
|
||||
/// <inheritdoc />
|
||||
public Task RemoveReactionAsync(IEmote emote, ulong userId, RequestOptions options = null)
|
||||
=> MessageHelper.RemoveReactionAsync(this, userId, emote, Discord, options);
|
||||
/// <inheritdoc />
|
||||
public Task RemoveAllReactionsAsync(RequestOptions options = null)
|
||||
=> MessageHelper.RemoveAllReactionsAsync(this, Discord, options);
|
||||
|
||||
@@ -151,7 +151,10 @@ namespace Discord.WebSocket
|
||||
=> MessageHelper.AddReactionAsync(this, emote, Discord, options);
|
||||
/// <inheritdoc />
|
||||
public Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null)
|
||||
=> MessageHelper.RemoveReactionAsync(this, user, emote, Discord, options);
|
||||
=> MessageHelper.RemoveReactionAsync(this, user.Id, emote, Discord, options);
|
||||
/// <inheritdoc />
|
||||
public Task RemoveReactionAsync(IEmote emote, ulong userId, RequestOptions options = null)
|
||||
=> MessageHelper.RemoveReactionAsync(this, userId, emote, Discord, options);
|
||||
/// <inheritdoc />
|
||||
public Task RemoveAllReactionsAsync(RequestOptions options = null)
|
||||
=> MessageHelper.RemoveAllReactionsAsync(this, Discord, options);
|
||||
|
||||
Reference in New Issue
Block a user