mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
voice: fix bug where no audio could be heard if voice region changed
This commit is contained in:
@@ -286,7 +286,7 @@ class VoiceConnection extends EventEmitter {
|
|||||||
reconnect(token, endpoint) {
|
reconnect(token, endpoint) {
|
||||||
this.authentication.token = token;
|
this.authentication.token = token;
|
||||||
this.authentication.endpoint = endpoint;
|
this.authentication.endpoint = endpoint;
|
||||||
|
this.speaking = false;
|
||||||
this.status = VoiceStatus.RECONNECTING;
|
this.status = VoiceStatus.RECONNECTING;
|
||||||
/**
|
/**
|
||||||
* Emitted when the voice connection is reconnecting (typically after a region change).
|
* Emitted when the voice connection is reconnecting (typically after a region change).
|
||||||
@@ -331,7 +331,7 @@ class VoiceConnection extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
cleanup() {
|
cleanup() {
|
||||||
this.player.destroy();
|
this.player.destroy();
|
||||||
|
this.speaking = false;
|
||||||
const { ws, udp } = this.sockets;
|
const { ws, udp } = this.sockets;
|
||||||
|
|
||||||
if (ws) {
|
if (ws) {
|
||||||
|
|||||||
Reference in New Issue
Block a user