CommandPermissionType.parse constructor

CommandPermissionType.parse(
  1. int value
)

Parse a CommandPermissionType from an int.

The value must be a valid command permission type.

Implementation

factory CommandPermissionType.parse(int value) => CommandPermissionType.values.firstWhere(
      (type) => type.value == value,
      orElse: () => throw FormatException('Unknown command permission type', value),
    );