QueueBuilder

new QueueBuilder(guild, options)

Create a new queue

Parameters:
NameTypeDescription
guildObject

The guild of the discord server

optionsobject

The options for the queue. Automatically configed by Dismusic

Properties
NameTypeDescription
guildobject

The guild of the queue

playerAudioPlayer

The player that is used for playing music

volumenumber

The current volume of this queue

isPausedboolean

Tells you whether this queue is paused

connectionVoiceConnection | undefined

The raw discord.js connection for the voice channel connected

loopModestring

The current loop mode of this queue. It is none, queue or song

tracksArray.<Object>

The current tracks in this queue

Methods

(async) addTrack(searchRes)

Add a track to the queue

Parameters:
NameTypeDescription
searchResobject

The results your found

(async) addTracks(playlist)

Add multiple tracks to the queue

Parameters:
NameTypeDescription
playlistArray.<Object>

The results you found. Good for adding playlists

(async) connectTo(channel) → {object}

Connect to a voice channel

Parameters:
NameTypeDescription
channelobject

The discord.js voice channel

Returns:

Returns the discord.js connection object

Type: 
object

(async) getCurrentTrack() → {object}

Get the current track being played

Returns:

The current track being played

Type: 
object

(async) pause()

Pause the player

(async) play(searchRes)

Play something in the voice channel

Parameters:
NameTypeDescription
searchResobject

The search Results you got from.search function

(async) resume()

resume the player

(async) setLoopMode(mode)

Set the loop mode of this queue

Parameters:
NameTypeDescription
modestring

The mode your want to set. Can be [ 'queue', 'none', 'song' ]

(async) setVolume(amount)

Set the volume of the audio player

Parameters:
NameTypeDescription
amountnumber | string

The amount of volume you want to set

(async) skip() → {object}

Skip a track in the queue

Returns:

Returns an object that contains the track skipped

Type: 
object