Closed hmes98318 closed 1 year ago
Describe the bug Connecting to certain voice servers in specific regions causes the connection to crash every minute. It seems to be a Discord issue at the moment.
https://github.com/discordjs/discord.js/issues/9185
A workaround is to remove keepAlive timer/interval.. Add the following code to node_modules/discord-player/dist/VoiceInterface/VoiceUtils.js
node_modules/discord-player/dist/VoiceInterface/VoiceUtils.js
// line 43 conn.on('stateChange', (old_state, new_state) => { const oldNetworking = Reflect.get(old_state, 'networking'); const newNetworking = Reflect.get(new_state, 'networking'); const networkStateChangeHandler = (oldNetworkState, newNetworkState) => { const newUdp = Reflect.get(newNetworkState, 'udp'); clearInterval(newUdp?.keepAliveInterval); } oldNetworking?.off('stateChange', networkStateChangeHandler); newNetworking?.on('stateChange', networkStateChangeHandler); });
Screenshots
Version Information:
https://github.com/Androz2091/discord-player/issues/1630
v1.2.7 sloved.
v1.2.7
Describe the bug Connecting to certain voice servers in specific regions causes the connection to crash every minute.
It seems to be a Discord issue at the moment.
https://github.com/discordjs/discord.js/issues/9185
A workaround is to remove keepAlive timer/interval..
Add the following code to
node_modules/discord-player/dist/VoiceInterface/VoiceUtils.js
Screenshots
Version Information: