ModerationTriggerMetadata.mentions constructor

ModerationTriggerMetadata.mentions({
  1. required int maxMentions,
})

Implementation

factory ModerationTriggerMetadata.mentions ({ required int maxMentions }) {
  if (maxMentions <= 0 || maxMentions > 50) {
    throw InvalidParameterException('The number of mentions must be between 1 and 50 per message ($maxMentions given).');
  }

  return ModerationTriggerMetadata(null, null, null, maxMentions);
}