Method DeleteReactionAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
DeleteReactionAsync(DiscordEmoji, DiscordUser, string?)
Deletes another user's reaction.
public Task DeleteReactionAsync(DiscordEmoji emoji, DiscordUser user, string? reason = null)
Parameters
emojiDiscordEmojiEmoji for the reaction you want to remove, either an emoji or name:id.
userDiscordUserMember you want to remove the reaction for
reasonstringReason for audit logs.
Returns
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageMessages permission.
- NotFoundException
Thrown when the emoji does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.
DeleteReactionAsync(ulong, DiscordUser, string?)
Deletes another user's reaction.
public Task DeleteReactionAsync(ulong emojiId, DiscordUser user, string? reason = null)
Parameters
emojiIdulongEmoji id for the reaction you want to remove
userDiscordUserMember you want to remove the reaction for
reasonstringReason for audit logs.
Returns
Remarks
This overload only works with guild or application emoji
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageMessages permission.
- NotFoundException
Thrown when the emoji does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.