Table of Contents

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

emoji DiscordGuildEmoji

Emoji to modify.

name string

New name for the emoji.

roles IEnumerable<DiscordRole>

Roles for which the emoji will be available. This works only if your application is whitelisted as integration.

reason string

Reason 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.