mirror of
https://github.com/danbulant/discord.js
synced 2026-05-29 12:20:23 +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);
|
||||
});
|
||||
|
||||
connection.on('error', reject);
|
||||
|
||||
connection.once('authenticated', () => {
|
||||
connection.once('ready', () => {
|
||||
resolve(connection);
|
||||
connection.removeListener('error', reject);
|
||||
});
|
||||
connection.on('error', reject);
|
||||
connection.once('disconnect', () => this.connections.delete(channel.guild.id));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue