Skip to content

$createAutomodRule

$createAutomodRule will create a new Discord Automod Rule for the given guild.

Usage

$createAutomodRule[guildID;name;enabled?;reason?]

Parameters

FieldTypeDescriptionRequired
guildIDnumberThe ID of the guild where the automod rule should be created in.true
namestringThe name of the new Automod Rule.true
enabled?booleanEnable the automod rule?false
reason?stringThe reason displayed in the guild’s audit logs.false

Example(s)

This will create a automod rule which blocks slur words:

1
client.command({
2
name: "createAutomodRule",
3
code: `
4
$createAutomodRule[$guildid;Automod Rule;true;Creating a new rule!]
5
$setAutomodPreset[Slurs]
6
$setAutomodType[Keyword]
7
$setAutomodActions[BlockMessage;$channelId;60;You tried to say slurs, you got blocked!]
8
`
9
});