* Added id overload for RemoveReactionAsync * Fixed the docs stringstags/2.2.0
| @@ -96,6 +96,23 @@ namespace Discord | |||||
| /// <seealso cref="IEmote"/> | /// <seealso cref="IEmote"/> | ||||
| Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null); | Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null); | ||||
| /// <summary> | /// <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. | /// Removes all reactions from this message. | ||||
| /// </summary> | /// </summary> | ||||
| /// <param name="options">The options to be used when sending the request.</param> | /// <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); | 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) | public static async Task RemoveAllReactionsAsync(IMessage msg, BaseDiscordClient client, RequestOptions options) | ||||
| @@ -155,7 +155,10 @@ namespace Discord.Rest | |||||
| => MessageHelper.AddReactionAsync(this, emote, Discord, options); | => MessageHelper.AddReactionAsync(this, emote, Discord, options); | ||||
| /// <inheritdoc /> | /// <inheritdoc /> | ||||
| public Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null) | 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 /> | /// <inheritdoc /> | ||||
| public Task RemoveAllReactionsAsync(RequestOptions options = null) | public Task RemoveAllReactionsAsync(RequestOptions options = null) | ||||
| => MessageHelper.RemoveAllReactionsAsync(this, Discord, options); | => MessageHelper.RemoveAllReactionsAsync(this, Discord, options); | ||||
| @@ -151,7 +151,10 @@ namespace Discord.WebSocket | |||||
| => MessageHelper.AddReactionAsync(this, emote, Discord, options); | => MessageHelper.AddReactionAsync(this, emote, Discord, options); | ||||
| /// <inheritdoc /> | /// <inheritdoc /> | ||||
| public Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null) | 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 /> | /// <inheritdoc /> | ||||
| public Task RemoveAllReactionsAsync(RequestOptions options = null) | public Task RemoveAllReactionsAsync(RequestOptions options = null) | ||||
| => MessageHelper.RemoveAllReactionsAsync(this, Discord, options); | => MessageHelper.RemoveAllReactionsAsync(this, Discord, options); | ||||