|
16 | 16 | use Discord\Discord; |
17 | 17 | use Discord\Factory\SocketFactory; |
18 | 18 | use Discord\Parts\Voice\UserConnected; |
| 19 | +use Discord\Voice\Any; |
19 | 20 | use Discord\Voice\Client; |
| 21 | +use Discord\Voice\Flags; |
20 | 22 | use Discord\Voice\Resumed; |
21 | 23 | use Discord\Voice\SessionDescription; |
22 | 24 | use Discord\Voice\Speaking; |
@@ -207,10 +209,6 @@ public function handleConnection(WebSocket $ws): void |
207 | 209 | //$this->handleUndocumented($data); |
208 | 210 |
|
209 | 211 | switch ($data->op) { |
210 | | - case Op::VOICE_CLIENT_UNKNOWN_15: |
211 | | - case Op::VOICE_CLIENT_UNKNOWN_18: |
212 | | - $this->discord->logger->debug('received unknown opcode', ['data' => json_decode(json_encode($data), true)]); |
213 | | - break; |
214 | 212 | case Op::VOICE_CLIENT_PLATFORM: |
215 | 213 | $this->discord->logger->debug('received platform packet', ['data' => json_decode(json_encode($data->d), true)]); |
216 | 214 | # handlePlatformPerUser |
@@ -412,6 +410,30 @@ protected function handleClientDisconnect(object $data): void |
412 | 410 | unset($this->vc->clientsConnected[$data->d->user_id]); |
413 | 411 | } |
414 | 412 |
|
| 413 | + /** |
| 414 | + * Handles the any event from the voice server. |
| 415 | + * |
| 416 | + * @param Payload $data |
| 417 | + */ |
| 418 | + public function handleAny(object $data): void |
| 419 | + { |
| 420 | + $any = $this->discord->factory(Any::class, (array) $data->d, true); |
| 421 | + |
| 422 | + $this->discord->logger->debug('received any packet', ['data' => $any->__debugInfo()]); |
| 423 | + } |
| 424 | + |
| 425 | + /** |
| 426 | + * Handles the flags event from the voice server. |
| 427 | + * |
| 428 | + * @param Payload $data |
| 429 | + */ |
| 430 | + protected function handleFlags(object $data): void |
| 431 | + { |
| 432 | + $flags = $this->discord->factory(Flags::class, (array) $data->d, true); |
| 433 | + |
| 434 | + $this->discord->logger->debug('received flags packet', ['data' => $flags->__debugInfo()]); |
| 435 | + } |
| 436 | + |
415 | 437 | protected function handleDavePrepareTransition($data): void |
416 | 438 | { |
417 | 439 | $this->discord->logger->debug('DAVE Prepare Transition', ['data' => $data]); |
|
0 commit comments