setEventType method

Future<void> setEventType(
  1. ModerationEventType event
)

Update the event of this

Example :

await rule.setEventType(ModerationEventType.messageSend);

Implementation

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

  if (response.statusCode == 200) {
    eventType = event;
  }
}