setLabel method

Future<void> setLabel(
  1. String label
)

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) async {
  Response response = await ioc.use<HttpService>().patch(url: "/guilds/${manager.guild.id}/emojis/$id", payload: { 'name': label });

  if (response.statusCode == 200) {
    _label = label;
  }
}