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.
Called with a Guild and Channel object when a guild channel's webhooks are is created, updated, or deleted.
$discord->on(Event::WEBHOOKS_UPDATE, function (object $guild, Discord $discord, ?object $channel) {
if ($guild instanceof Guild && $channel instanceof Channel) {
// $guild and $channel was cached
}
// $guild and/or $channel was not in cache:
else {
// "guild" {
// "id": "" // webhook guild ID
// },
// "channel": {
id": "", // webhook channel ID
}
}
});
Requires the Intents::GUILD_WEBHOOKS intent.
How can I help you explore Laravel packages today?