Search results

Types

Classes
Interfaces
Enums
Functions
Type aliases
Constants

Members

Properties
Methods
Getters
Setters
Enum members
Show privates

Other

In this module only

Class Player

extends NodeJS.EventEmitterexternal NodeJS.EventEmitter

Defined in Player.ts

Constructor

constructor(
queue: Mapexternal Map<string, QueueOptionsinterface QueueOptionsutils/QueueOptions>,
guild: Guild,
options?: InitQueueOptionsinterface InitQueueOptionsutils/InitQueueOptions
)

Creates a new Player.

· queue - The Musicord queue
· guild - current guild

Properties

clientVoiceSettings: typeof ClientVoiceSettingsconst ClientVoiceSettingsstructures/ClientVoiceSettings = {
deaf: boolean,
requestToSpeak: boolean,
suppressed: boolean,
__@iterator@40: () => Generatorexternal Generator<never, void, unknown>,
/** Sets if the client is deaf */
setDeaf: (state: boolean) => void,
/** Generates a speak request if needed */
speakRequest: (state: boolean) => void,
/** Sets the suppressed option */
setSuppressed: (state: boolean) => void
}
[src]
readonly guild: Guild[src]
readonly options: AdvancedQueueOptionsinterface AdvancedQueueOptionsutils/AdvancedQueueOptions | any[src]
private _queue: Mapexternal Map<string, QueueOptionsinterface QueueOptionsutils/QueueOptions>[src]
private _songSearcher: SongSearcherclass SongSearcherstructures/SongSearcher = SongSearcherclass SongSearcherstructures/SongSearcher[src]

Methods

get isPlaying(): boolean[src]

Checks if the bot is currently playing

Returns

undefined
get volume(): number[src]

Gets the queue volume

Returns

undefined
get filters(): string[][src]

Gets the queue filters

Returns

undefined
get queue(): Songinterface Songutils/Song[][src]

Gets the queue songs

Returns

undefined
assignVoiceConnection(connection: VoiceConnection): void[src]

Assigns an existing voice connection to the queue.

· connection - https

Returns

undefined
addSong(song: Songinterface Songutils/Song | string): Promiseexternal Promise<void>[src]

Adds a song to the queue.

· song - YT url, custom .mp3 url or searched song

Returns

undefined
addPlaylist(url: string): Promiseexternal Promise<void>[src]

Adds playlist songs to the queue Only the first 100 songs will be added.

· url - undefined

Returns

undefined
setBitrate(value?: number): void[src]

Set the ressource or channel bitrate. Default value is 64000.

· value - undefined

Returns

undefined
createVoiceConnection(): void[src]

Creates a voice connection if a voice channel is stored in the queue.

Returns

undefined
setFilter(filter: string, applied?: boolean): void[src]

Adds a filter to the queue.

· filter - undefined
resetFilters(): void[src]

Resets the filters.

Returns

undefined
getSongs(): Songinterface Songutils/Song[] | undefined[src]

Gets all the queue songs

Returns

undefined
nextSong(): string | undefined[src]

Gets the next song url.

Returns

undefined
stop(): void[src]

Stops the music, resets the queue, and destroys the voice connection.

Returns

undefined
skip(): void[src]

Skips the current song.

Returns

undefined
pause(): void[src]

Pauses the music.

Returns

undefined
resume(): void[src]

Resumes the music (if paused).

Returns

undefined
setVolume(volume: Rangetype Rangeutils/Range<0, 101>): void[src]

Sets the volumesof the queue. Changes the volume immediately if playing.

· volume - undefined
shuffleQueue(): void[src]

Shuffles the queue

Returns

undefined
play(
song: Songinterface Songutils/Song | string,
channel?: VoiceChannel | StageChannel
): Promiseexternal Promise<void>
[src]

Plays a song.

· song - undefined
· channel - undefined

Returns

undefined
generateSongSlideBar(): string | undefined[src]

Generates the current song progress bar.

Returns

undefined
private _setClientVoiceSettings(voiceChannel: VoiceBasedChannel | undefined): void[src]

Sets the client voice settings for the current guild

Returns

undefined
private _handleVoiceState(player: AudioPlayer): Promiseexternal Promise<void>[src]

Awaits player events and handles them.

· player - undefined

Returns

undefined
private _createWritableStream(url: string): WritableStream[src]

Creates a writable stream.

· url - undefined

Returns

undefined
private _generateFFmpegArgsSchema(url: string): string[][src]

Generates FFmpeg args.

· url - undefined

Returns

undefined