mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 16:52:16 +00:00
Rename VoiceConnection.disconnected event -> disconnect
This commit is contained in:
parent
c96d5ad30e
commit
a04094f0ff
2 changed files with 4 additions and 4 deletions
|
|
@ -243,7 +243,7 @@ class ClientVoiceManager {
|
||||||
this.connections.set(channel.guild.id, voiceConnection);
|
this.connections.set(channel.guild.id, voiceConnection);
|
||||||
voiceConnection.once('ready', () => resolve(voiceConnection));
|
voiceConnection.once('ready', () => resolve(voiceConnection));
|
||||||
voiceConnection.once('error', reject);
|
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() {
|
disconnect() {
|
||||||
this.emit('closing');
|
this.emit('closing');
|
||||||
|
|
@ -119,9 +119,9 @@ class VoiceConnection extends EventEmitter {
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* Emitted when the voice connection disconnects
|
* Emitted when the voice connection disconnects
|
||||||
* @event VoiceConnection#disconnected
|
* @event VoiceConnection#disconnect
|
||||||
*/
|
*/
|
||||||
this.emit('disconnected');
|
this.emit('disconnect');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue