Method ModifyEmojiAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.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
DiscordGuildEmojiEmoji to modify.
name
stringNew 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
stringReason 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.