AutoModerationEventType.parse constructor

AutoModerationEventType.parse(
  1. int value
)

Parse an AutoModerationEventType from an int.

The value must be a valid auto moderation event type.

Implementation

factory AutoModerationEventType.parse(int value) => AutoModerationEventType.values.firstWhere(
      (type) => type.value == value,
      orElse: () => throw FormatException('Unknown auto moderation event type', value),
    );