Method ModifyAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
ModifyAsync(string, IEnumerable<DiscordRole>, string)
Modifies this emoji.
public Task<DiscordGuildEmoji> ModifyAsync(string name, IEnumerable<DiscordRole> roles = null, string reason = null)
Parameters
name
stringNew 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
stringReason for audit log.
Returns
- Task<DiscordGuildEmoji>
The modified emoji.
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageGuildExpressions 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.