createEmoji abstract method

Future<IBaseGuildEmoji> createEmoji(
  1. String name, {
  2. List<SnowflakeEntity>? roles,
  3. AttachmentBuilder? emojiAttachment,
})

Allows to create new guild emoji. name is required. You can allow to set roles to restrict emoji usage. Put your image in emojiAttachment field.

var emojiFile = File("weed.png");
var emoji = await guild.createEmoji("weed", emojiAttachment: AttachmentBuilder.file(emojiFile));

Implementation

Future<IBaseGuildEmoji> createEmoji(String name, {List<SnowflakeEntity>? roles, AttachmentBuilder? emojiAttachment});