v5.3.12
Temporary fix for voice connection issues
This commit is contained in:
parent
2f9c48b927
commit
5dc2774e0f
2 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "discord-player-play-dl",
|
"name": "discord-player-play-dl",
|
||||||
"version": "5.3.11",
|
"version": "5.3.12",
|
||||||
"description": "Complete framework to facilitate music commands using discord.js and play-dl",
|
"description": "Complete framework to facilitate music commands using discord.js and play-dl",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|
|
@ -68,7 +68,11 @@ class StreamDispatcher extends EventEmitter<VoiceEvents> {
|
||||||
*/
|
*/
|
||||||
this.paused = false;
|
this.paused = false;
|
||||||
|
|
||||||
this.voiceConnection.on("stateChange", async (_, newState) => {
|
this.voiceConnection.on("stateChange", async (oldState, newState) => {
|
||||||
|
if (oldState.status === VoiceConnectionStatus.Ready && newState.status === VoiceConnectionStatus.Connecting) {
|
||||||
|
connection.configureNetworking(); // Temp fix for 1 minute disconnect
|
||||||
|
}
|
||||||
|
|
||||||
if (newState.status === VoiceConnectionStatus.Disconnected) {
|
if (newState.status === VoiceConnectionStatus.Disconnected) {
|
||||||
if (newState.reason === VoiceConnectionDisconnectReason.WebSocketClose && newState.closeCode === 4014) {
|
if (newState.reason === VoiceConnectionDisconnectReason.WebSocketClose && newState.closeCode === 4014) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue