team-reflex/discord-php
DiscordPHP is a PHP wrapper for Discord’s REST, gateway, and voice APIs. Build Discord bots that run in CLI with ReactPHP-style async handling. Includes limited docs/class reference and community integrations like Laracord for Laravel.
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.
How can I help you explore Laravel packages today?