voice: more debug information

This commit is contained in:
Amish Shah
2019-02-11 17:22:17 +00:00
parent ab55acffdb
commit a705edfd0d
4 changed files with 7 additions and 4 deletions

View File

@@ -64,6 +64,8 @@ class ClientVoiceManager {
return;
} else {
connection = new VoiceConnection(this, channel);
connection.on('debug', msg => this.client.emit('debug', `[VOICE (${channel.guild.id})]: ${msg}`));
connection.authenticate();
this.connections.set(channel.guild.id, connection);
}
@@ -72,8 +74,6 @@ class ClientVoiceManager {
reject(reason);
});
connection.on('debug', msg => this.client.emit('debug', `[VOICE (${channel.guild.id})]: ${msg}`));
connection.once('authenticated', () => {
connection.once('ready', () => {
resolve(connection);