mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
Added volumeChange event to VoiceInterface (#1207)
VoiceBroadcast relies on this event to initialize a new Opus engine
This commit is contained in:
@@ -25,6 +25,13 @@ class VolumeInterface extends EventEmitter {
|
|||||||
* @param {number} volume The volume that you want to set
|
* @param {number} volume The volume that you want to set
|
||||||
*/
|
*/
|
||||||
setVolume(volume) {
|
setVolume(volume) {
|
||||||
|
/**
|
||||||
|
* Emitted when the volume of this interface changes
|
||||||
|
* @event VolumeInterface#volumeChange
|
||||||
|
* @param {number} oldVolume The old volume of this interface
|
||||||
|
* @param {number} newVolume The new volume of this interface
|
||||||
|
*/
|
||||||
|
this.emit('volumeChange', this._volume, volume);
|
||||||
this._volume = volume;
|
this._volume = volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user