mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
Handle voice errors outside of authenticated event (#3520)
This commit is contained in:
parent
2ca74d6b63
commit
bb8333a4f9
1 changed files with 2 additions and 1 deletions
|
|
@ -93,12 +93,13 @@ class ClientVoiceManager {
|
||||||
reject(reason);
|
reject(reason);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connection.on('error', reject);
|
||||||
|
|
||||||
connection.once('authenticated', () => {
|
connection.once('authenticated', () => {
|
||||||
connection.once('ready', () => {
|
connection.once('ready', () => {
|
||||||
resolve(connection);
|
resolve(connection);
|
||||||
connection.removeListener('error', reject);
|
connection.removeListener('error', reject);
|
||||||
});
|
});
|
||||||
connection.on('error', reject);
|
|
||||||
connection.once('disconnect', () => this.connections.delete(channel.guild.id));
|
connection.once('disconnect', () => this.connections.delete(channel.guild.id));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue