Method DeleteEmojiAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
DeleteEmojiAsync(DiscordGuildEmoji, string?)
Deletes this guild's custom emoji.
public Task DeleteEmojiAsync(DiscordGuildEmoji emoji, string? reason = null)
Parameters
emoji
DiscordGuildEmojiEmoji to delete.
reason
stringReason for audit log.
Returns
- Task
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageGuildExpressions permission.
- ServerErrorException
Thrown when Discord is unable to process the request.
- NotFoundException
Thrown when the emoji does not exist on this guild
DeleteEmojiAsync(ulong, string?)
Deletes this guild's custom emoji.
public Task DeleteEmojiAsync(ulong emojiId, string? reason = null)
Parameters
emojiId
ulongEmoji to delete.
reason
stringReason for audit log.
Returns
- Task
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageGuildExpressions permission.
- ServerErrorException
Thrown when Discord is unable to process the request.
- NotFoundException
Thrown when the emoji does not exist on this guild