mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Rename VoiceConnection.disconnected event -> disconnect
This commit is contained in:
@@ -243,7 +243,7 @@ class ClientVoiceManager {
|
||||
this.connections.set(channel.guild.id, voiceConnection);
|
||||
voiceConnection.once('ready', () => resolve(voiceConnection));
|
||||
voiceConnection.once('error', reject);
|
||||
voiceConnection.once('disconnected', () => this.connections.delete(channel.guild.id));
|
||||
voiceConnection.once('disconnect', () => this.connections.delete(channel.guild.id));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class VoiceConnection extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect the voice connection, causing a disconnected and closing event to be emitted.
|
||||
* Disconnect the voice connection, causing a disconnect and closing event to be emitted.
|
||||
*/
|
||||
disconnect() {
|
||||
this.emit('closing');
|
||||
@@ -119,9 +119,9 @@ class VoiceConnection extends EventEmitter {
|
||||
});
|
||||
/**
|
||||
* Emitted when the voice connection disconnects
|
||||
* @event VoiceConnection#disconnected
|
||||
* @event VoiceConnection#disconnect
|
||||
*/
|
||||
this.emit('disconnected');
|
||||
this.emit('disconnect');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user