StreamDispatcher
No description provided
StreamDispatcher extends EventEmitter<VoiceEvents>
Properties
public audioPlayer: any
public audioResource: any
public channel: any
public connectionTimeout: any
public dsp: any
public queue: any
public voiceConnection: any
public static defaultMaxListeners: any
public biquad: any
public equalizer: any
public filters: any
public paused: any
Check if the player has been paused manually
public resampler: any
public status: any
The player status
public streamTime: any
The playback time
public volume: any
The current volume
Methods
public addListener(event, listener): this
Parameter | Type | Optional |
---|---|---|
event | U | ❌ |
listener | VoiceEvents[U] | ❌ |
public createStream(src, ops?): Promise<AudioResource<Track<unknown>>>
Creates stream
Parameter | Type | Optional | Description |
---|---|---|---|
src | Readable | ❌ | The stream source |
ops | CreateStreamOps | ✅ | Options |
public destroy(): void
Destroys this dispatcher
public disconnect(): void
Disconnects from voice
public emit(event, args): boolean
Parameter | Type | Optional |
---|---|---|
event | U | ❌ |
args | Parameters<VoiceEvents[U]> | ❌ |
public end(): void
Stops the player
public eventNames(): Array<U>
public getMaxListeners(): number
public isBuffering(): boolean
Whether or not the player is currently buffering
public isConnecting(): boolean
Whether or not the voice connection is connecting
public isDestroyed(): boolean
Whether or not the voice connection has been destroyed
public isDisconnected(): boolean
Whether or not the voice connection has been destroyed
public isIdle(): boolean
Whether or not the player is currently idle
public isPaused(): boolean
Whether or not the player is currently paused automatically or manually.
public isPlaying(): boolean
Whether or not the player is currently playing
public isReady(): boolean
Whether or not the voice connection is ready to play
public isSignalling(): boolean
Whether or not the voice connection is signalling
public listenerCount(type): number
Parameter | Type | Optional |
---|---|---|
type | keyof VoiceEvents | ❌ |
public listeners(type): Array<VoiceEvents[U]>
Parameter | Type | Optional |
---|---|---|
type | U | ❌ |
public off(event, listener): this
Parameter | Type | Optional |
---|---|---|
event | U | ❌ |
listener | VoiceEvents[U] | ❌ |
public on(event, listener): this
Parameter | Type | Optional |
---|---|---|
event | U | ❌ |
listener | VoiceEvents[U] | ❌ |
public once(event, listener): this
Parameter | Type | Optional |
---|---|---|
event | U | ❌ |
listener | VoiceEvents[U] | ❌ |
public pause(interpolateSilence?): boolean
Pauses the stream playback
Parameter | Type | Optional | Description |
---|---|---|---|
interpolateSilence | boolean | ✅ | If true, the player will play 5 packets of silence after pausing to prevent audio glitches. |
public playStream(resource?): Promise<undefined | StreamDispatcher>
Play stream
Parameter | Type | Optional | Description |
---|---|---|---|
resource | AudioResource<Track<unknown>> | ✅ | The audio resource to play |
public prependListener(event, listener): this
Parameter | Type | Optional |
---|---|---|
event | U | ❌ |
listener | VoiceEvents[U] | ❌ |
public prependOnceListener(event, listener): this
Parameter | Type | Optional |
---|---|---|
event | U | ❌ |
listener | VoiceEvents[U] | ❌ |
public rawListeners(type): Array<VoiceEvents[U]>
Parameter | Type | Optional |
---|---|---|
type | U | ❌ |
public removeAllListeners(event?): this
Parameter | Type | Optional |
---|---|---|
event | keyof VoiceEvents | ✅ |
public removeListener(event, listener): this
Parameter | Type | Optional |
---|---|---|
event | U | ❌ |
listener | VoiceEvents[U] | ❌ |
public resume(): boolean
Resumes the stream playback
public setMaxListeners(n): this
Parameter | Type | Optional |
---|---|---|
n | number | ❌ |
public setVolume(value): boolean
Sets playback volume
Parameter | Type | Optional | Description |
---|---|---|---|
value | number | ❌ | The volume amount |