Method ModifyEmojiAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
ModifyEmojiAsync(DiscordGuildEmoji, string, IEnumerable<DiscordRole>?, string?)
Modifies a this guild's custom emoji.
public Task<DiscordGuildEmoji> ModifyEmojiAsync(DiscordGuildEmoji emoji, string name, IEnumerable<DiscordRole>? roles = null, string? reason = null)
Parameters
emojiDiscordGuildEmojiEmoji to modify.
namestringNew name for the emoji.
rolesIEnumerable<DiscordRole>Roles for which the emoji will be available. This works only if your application is whitelisted as integration.
reasonstringReason for audit log.
Returns
- Task<DiscordGuildEmoji>
The modified emoji.
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageGuildExpressions permission.
- ServerErrorException
Thrown when Discord is unable to process the request.