laracord / framework

A Discord bot micro-framework powered by Laravel.
https://laracord.com
MIT License
33 stars 10 forks source link

🐞 [ Bug ] - While Trying to play audio voice socket closed #116

Closed end3r-man closed 3 months ago

end3r-man commented 3 months ago

as mentioned trying to play audio from a url and its start but not playing and the voice socket is closed


[04:24:25 PM]  INFO  Received session id for voice session.

[04:24:25 PM]  INFO  Received token and endpoint for voice session.

[04:24:26 PM]  INFO  Connected to voice websocket.

[04:24:26 PM]  INFO  Sending identify.

[04:24:26 PM]  INFO  Received voice ready packet.

[04:24:26 PM]  INFO  Connected to voice UDP.

[04:24:26 PM]  WARN  Voice websocket closed.

[04:24:26 PM]  WARN  Reconnecting in 2 seconds.

[04:24:28 PM]  INFO  Connected to voice websocket.

[04:24:28 PM]  INFO  Sending identify.

[04:24:28 PM]  INFO  Received voice ready packet.

[04:24:28 PM]  INFO  Connected to voice UDP.

[04:24:28 PM]  WARN  Voice websocket closed.

[04:24:28 PM]  WARN  Reconnecting in 2 seconds.

[04:24:30 PM]  INFO  Connected to voice websocket.

[04:24:30 PM]  INFO  Sending identify.

[04:24:30 PM]  INFO  Received voice ready packet.

[04:24:30 PM]  INFO  Connected to voice UDP.

[04:24:30 PM]  WARN  Voice websocket closed.

[04:24:30 PM]  WARN  Reconnecting in 2 seconds.

[04:24:33 PM]  INFO  Connected to voice websocket.

[04:24:33 PM]  INFO  Sending identify.

[04:24:33 PM]  INFO  Received voice ready packet.

[04:24:33 PM]  INFO  Connected to voice UDP.

[04:24:33 PM]  WARN  Voice websocket closed.

[04:24:33 PM]  WARN  Reconnecting in 2 seconds.

[04:24:35 PM]  INFO  Connected to voice websocket.

[04:24:35 PM]  INFO  Sending identify.

[04:24:35 PM]  INFO  Received voice ready packet.

[04:24:35 PM]  INFO  Connected to voice UDP.

[04:24:35 PM]  WARN  Voice websocket closed.

[04:24:35 PM]  WARN  Reconnecting in 2 seconds.  ```
end3r-man commented 3 months ago

here is the code



            $this->discord->joinVoiceChannel($channel)->done(function (VoiceClient $vc) {
                $vc->playFile('https://domain.com/test.mp4');
            }, function ($error) {
                echo "Error joining voice channel: " . $error->getMessage();
            }); ```
Log1x commented 3 months ago

I imagine this is related to https://github.com/discord-php/DiscordPHP/pull/1248