createSpamAutoModerationRule
inline suspend fun GuildBehavior.createSpamAutoModerationRule(name: String, eventType: AutoModerationRuleEventType = MessageSend, builder: SpamAutoModerationRuleCreateBuilder.() -> Unit): SpamAutoModerationRule(source)
Requests to create a new SpamAutoModerationRule in this guild and returns it.
This requires the ManageGuild permission.
Parameters
name
the rule name.
eventType
the rule event type.
Throws
if something went wrong during the request.