-
Notifications
You must be signed in to change notification settings - Fork 237
Auto Moderations
All auto moderation related events are currently only sent to bot users which have the MANAGE_GUILD
permission.
Called with a Rule
object when an auto moderation rule is created.
$discord->on(Event::AUTO_MODERATION_RULE_CREATE, function (Rule $rule, Discord $discord) {
// ...
});
Requires the Intents::AUTO_MODERATION_CONFIGURATION
intent.
Called with a Rule
object when an auto moderation rule is updated.
$discord->on(Event::AUTO_MODERATION_RULE_UPDATE, function (Rule $rule, Discord $discord, ?Rule $oldRule) {
// ...
});
Called with a Rule
object when an auto moderation rule is deleted.
$discord->on(Event::AUTO_MODERATION_RULE_DELETE, function (Rule $rule, Discord $discord) {
// ...
});
Requires the Intents::AUTO_MODERATION_CONFIGURATION
intent.
Called with an AutoModerationActionExecution
object when an auto moderation rule is triggered and an action is executed (e.g. when a message is blocked).
// use `Discord\Parts\WebSockets\AutoModerationActionExecution`;
$discord->on(Event::AUTO_MODERATION_ACTION_EXECUTION, function (AutoModerationActionExecution $actionExecution, Discord $discord) {
// ...
});
Requires the Intents::AUTO_MODERATION_EXECUTION
intent.
Note: This wiki is currently Work In Progress. Consider reading the docs instead.
- Application Command (Slash based)
Command Client (Message based)
- Activity
- Application
- Guild
- Private Channel
- User
Components
-
ActionRow
- Buttons
- Option (commands)
- SelectMenu
- TextInput
Builders