UML diagrams / Gateway events
Gateway event map
Every dispatch event DiscordPHP handles, and the class that handles it. The handler updates the cache, then DiscordPHP emits the event under the same name, so Event::MESSAGE_CREATE is what you pass to $discord->on(). The gateway sequence diagram shows the whole path.
Loading the event map…
Events that are not dispatches
READY, RESUMED and GUILD_MEMBERS_CHUNK are handled inside Discord itself. Listen for init to run code once the client has loaded its guilds. Some events never reach the gateway: Discord posts them to your application's Webhook Events URL instead. DiscordPHP receives those through $discord->getWebhookEvents() and emits them the same way as gateway events.