mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 21:13:30 +01:00
Handle voice errors outside of authenticated event (#3520)
This commit is contained in:
@@ -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));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user