setLabel method

Future<void> setLabel(
  1. String label
)

Update the label of this

Example :

await rule.setLabel('My label');

Implementation

Future<void> setLabel(String label) async {
  Http http = ioc.singleton(Service.http);
  Response response = await http.patch(url: "/guilds/$guildId/auto-moderation/rules/$id", payload: { 'label': label });

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