Skip to content

Commit 07eb603

Browse files
committed
public stateUpdate
1 parent 47aaa63 commit 07eb603

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/Discord/Voice/Manager.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,18 @@ public function getClient(string|int|Channel $guildChannelOrId): ?Client
148148
* @param \Discord\Parts\WebSockets\VoiceStateUpdate $state
149149
* @param \Discord\Parts\Channel\Channel $channel
150150
*/
151-
protected function stateUpdate(VoiceStateUpdate $state, Channel $channel): void
151+
public function stateUpdate(VoiceStateUpdate $state, Channel $channel): void
152152
{
153153
if ($state->guild_id != $channel->guild_id) {
154154
return; // This voice state update isn't for our guild.
155155
}
156156

157157
$this->getClient($channel)
158-
->setData(['session' => $state->session_id, 'deaf' => $state->deaf, 'mute' => $state->mute]);
158+
->setData([
159+
'session' => $state->session_id,
160+
'deaf' => $state->deaf,
161+
'mute' => $state->mute
162+
]);
159163

160164
$this->discord->getLogger()->info('received session id for voice session', ['guild' => $channel->guild_id, 'session_id' => $state->session_id]);
161165
}

0 commit comments

Comments
 (0)