setEnabled method

Future<void> setEnabled(
  1. bool value
)

Update enabled of this

Example :

await rule.setEnabled(true);

Implementation

Future<void> setEnabled(bool value) async {
  Response response = await ioc.use<HttpService>().patch(url: "/guilds/$guildId/auto-moderation/rules/$id", payload: { 'value': value });

  if (response.statusCode == 200) {
    enabled = value;
  }
}