Method CreateReactionAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
CreateReactionAsync(DiscordEmoji)
Creates a reaction to this message.
public Task CreateReactionAsync(DiscordEmoji emoji)
Parameters
emoji
DiscordEmojiThe emoji you want to react with, either an emoji or name:id
Returns
Exceptions
- UnauthorizedException
Thrown when the client does not have the AddReactions 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.
CreateReactionAsync(ulong)
Creates a reaction to this message.
public Task CreateReactionAsync(ulong emojiId)
Parameters
emojiId
ulongThe id of the emoji you want to react with
Returns
Remarks
This overload only works with guild or application emoji
Exceptions
- UnauthorizedException
Thrown when the client does not have the AddReactions 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.