Table of Contents

Method ModifyAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

ModifyAsync(string, IEnumerable<DiscordRole>, string)

Modifies this emoji.

public Task<DiscordGuildEmoji> ModifyAsync(string name, IEnumerable<DiscordRole> roles = null, string reason = null)

Parameters

name string

New name for this emoji.

roles IEnumerable<DiscordRole>

Roles for which this 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 ManageEmojis 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.