setLabel method

Future<void> setLabel(
  1. String label, {
  2. String? reason,
})

Modifies the label of this.

Example :

final Emoji? emoji = guild.emojis.cache.get('240561194958716924');
if (emoji != null) {
  await emoji.setLabel('New label');
}

Implementation

Future<void> setLabel (String label, { String? reason }) async {
  await ioc.use<DiscordApiHttpService>().patch(url: "/guilds/${manager.guild.id}/emojis/$id")
    .payload({ 'name': label })
    .auditLog(reason)
    .build();
}