createEmoji method
Future<GuildEmoji>
createEmoji(
- String name, {
- List<
SnowflakeEntity> ? roles, - AttachmentBuilder? emojiAttachment,
Allows to create new guild emoji. name
is required and you have to specify one of other parameters: imageFile
, imageBytes
or encodedImage
.
imageBytes
can be useful if you want to create image from http response.
var emojiFile = new File("weed.png");
vare emoji = await guild.createEmoji("weed, image: emojiFile");
Implementation
Future<GuildEmoji> createEmoji(String name, {List<SnowflakeEntity>? roles, AttachmentBuilder? emojiAttachment}) =>
client.httpEndpoints.createEmoji(this.id, name, roles: roles, emojiAttachment: emojiAttachment);