Skip to content
Alexander Maassen edited this page May 22, 2023 · 1 revision

Voice State Update

Called with a VoiceStateUpdate object when a member joins, leaves or moves between voice channels.

// use Discord\Parts\WebSockets\VoiceStateUpdate;

$discord->on(Event::VOICE_STATE_UPDATE, function (VoiceStateUpdate $state, Discord $discord, $oldstate) {
    // ...
});

Requires the Intents::GUILD_VOICE_STATES intent.

Voice Server Update

Called with a VoiceServerUpdate object when a voice server is updated in a guild.

// use Discord\Parts\WebSockets\VoiceServerUpdate;

$discord->on(Event::VOICE_SERVER_UPDATE, function (VoiceServerUpdate $guild, Discord $discord) {
    // ...
});
Clone this wiki locally