Hey,
whenever I try to play a mp3 File my bot does nothing.
I use the following code:
$bot->joinVoiceChannel($channeltoJoin, false, false)->then( function (VoiceClient $voice) { $voice->playFile(__DIR__ . "./downloads/song.mp3"); } );
I also get no Error in my console except, that the session is no longer valid.
Warning: Undefined array key 700390191008841858 in D:\Dokumente\php projects\mikachubot\bot.php on line 42
[2022-10-22T23:31:03.435604+02:00] DiscordPHP.INFO: received token and endpoint for voice session {"guild":"700390191008841858","token":"f6236ff3278c79df","endpoint":"rotterdam4472.discord.media:443"} []
[2022-10-22T23:31:04.265475+02:00] DiscordPHP.DEBUG: connected to voice websocket [] []
PHP Warning: Undefined array key "session" in D:\Dokumente\php projects\mikachubot\vendor\team-reflex\discord-php\src\Discord\Voice\VoiceClient.php on line 577
Warning: Undefined array key "session" in D:\Dokumente\php projects\mikachubot\vendor\team-reflex\discord-php\src\Discord\Voice\VoiceClient.php on line 577
[2022-10-22T23:31:04.268304+02:00] DiscordPHP.DEBUG: sending identify {"packet":{"op":0,"d":{"server_id":"700390191008841858","user_id":"1033155727352672267","session_id":null,"token":"f6236ff3278c79df"}}} []
[2022-10-22T23:31:04.269327+02:00] DiscordPHP.DEBUG: sending heartbeat [] []
[2022-10-22T23:31:04.347498+02:00] DiscordPHP.DEBUG: received heartbeat ack {"response_time":78.21083068847656} []
[2022-10-22T23:31:04.348418+02:00] DiscordPHP.WARNING: voice websocket closed {"op":4006,"reason":"Session is no longer valid."} []
[2022-10-22T23:31:04.348716+02:00] DiscordPHP.WARNING: received critical opcode - not reconnecting {"op":4006,"reason":"Session is no longer valid."} []
[2022-10-22T23:31:04.348998+02:00] DiscordPHP.WARNING: voice client closed [] []
[2022-10-22T23:31:23.539907+02:00] DiscordPHP.DEBUG: sending heartbeat {"seq":6} []
[2022-10-22T23:31:23.721016+02:00] DiscordPHP.DEBUG: received heartbeat ack {"response_time":180.50384521484375} []
Hey, whenever I try to play a mp3 File my bot does nothing. I use the following code:
$bot->joinVoiceChannel($channeltoJoin, false, false)->then( function (VoiceClient $voice) { $voice->playFile(__DIR__ . "./downloads/song.mp3"); } );
I also get no Error in my console except, that the session is no longer valid.
Warning: Undefined array key 700390191008841858 in D:\Dokumente\php projects\mikachubot\bot.php on line 42 [2022-10-22T23:31:03.435604+02:00] DiscordPHP.INFO: received token and endpoint for voice session {"guild":"700390191008841858","token":"f6236ff3278c79df","endpoint":"rotterdam4472.discord.media:443"} [] [2022-10-22T23:31:04.265475+02:00] DiscordPHP.DEBUG: connected to voice websocket [] [] PHP Warning: Undefined array key "session" in D:\Dokumente\php projects\mikachubot\vendor\team-reflex\discord-php\src\Discord\Voice\VoiceClient.php on line 577
Warning: Undefined array key "session" in D:\Dokumente\php projects\mikachubot\vendor\team-reflex\discord-php\src\Discord\Voice\VoiceClient.php on line 577 [2022-10-22T23:31:04.268304+02:00] DiscordPHP.DEBUG: sending identify {"packet":{"op":0,"d":{"server_id":"700390191008841858","user_id":"1033155727352672267","session_id":null,"token":"f6236ff3278c79df"}}} [] [2022-10-22T23:31:04.269327+02:00] DiscordPHP.DEBUG: sending heartbeat [] [] [2022-10-22T23:31:04.347498+02:00] DiscordPHP.DEBUG: received heartbeat ack {"response_time":78.21083068847656} [] [2022-10-22T23:31:04.348418+02:00] DiscordPHP.WARNING: voice websocket closed {"op":4006,"reason":"Session is no longer valid."} [] [2022-10-22T23:31:04.348716+02:00] DiscordPHP.WARNING: received critical opcode - not reconnecting {"op":4006,"reason":"Session is no longer valid."} [] [2022-10-22T23:31:04.348998+02:00] DiscordPHP.WARNING: voice client closed [] [] [2022-10-22T23:31:23.539907+02:00] DiscordPHP.DEBUG: sending heartbeat {"seq":6} [] [2022-10-22T23:31:23.721016+02:00] DiscordPHP.DEBUG: received heartbeat ack {"response_time":180.50384521484375} []
Is there any solution for this problem?
I'm using PHP 8.1 and DiscordPHP v7.3.1