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
emoji
DiscordEmojiEmoji for the reaction you want to remove, either an emoji or name:id.
user
DiscordUserMember you want to remove the reaction for
reason
stringReason 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
emojiId
ulongEmoji id for the reaction you want to remove
user
DiscordUserMember you want to remove the reaction for
reason
stringReason 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.