new QueueBuilder(guild, options)
Create a new queue
Name | Type | Description |
---|---|---|
guild | Object | The guild of the discord server |
options | object | The options for the queue. Automatically configed by Dismusic |
Name | Type | Description |
---|---|---|
guild | object | The guild of the queue |
player | AudioPlayer | The player that is used for playing music |
volume | number | The current volume of this queue |
isPaused | boolean | Tells you whether this queue is paused |
connection | VoiceConnection | | The raw discord.js connection for the voice channel connected |
loopMode | string | The current loop mode of this queue. It is none, queue or song |
tracks | Array. | The current tracks in this queue |
- Source
Methods
(async) addTrack(searchRes)
Add a track to the queue
Name | Type | Description |
---|---|---|
searchRes | object | The results your found |
- Source
(async) addTracks(playlist)
Add multiple tracks to the queue
Name | Type | Description |
---|---|---|
playlist | Array. | The results you found. Good for adding playlists |
- Source
(async) connectTo(channel) → {object}
Connect to a voice channel
Name | Type | Description |
---|---|---|
channel | object | The discord.js voice channel |
- Source
Returns the discord.js connection object
- Type:
- object
(async) getCurrentTrack() → {object}
Get the current track being played
- Source
The current track being played
- Type:
- object
(async) pause()
Pause the player
- Source
(async) play(searchRes)
Play something in the voice channel
Name | Type | Description |
---|---|---|
searchRes | object | The search Results you got from |
- Source
(async) resume()
resume the player
- Source
(async) setLoopMode(mode)
Set the loop mode of this queue
Name | Type | Description |
---|---|---|
mode | string | The mode your want to set. Can be |
- Source
(async) setVolume(amount)
Set the volume of the audio player
Name | Type | Description |
---|---|---|
amount | number | | The amount of volume you want to set |
- Source
(async) skip() → {object}
Skip a track in the queue
- Source
Returns an object that contains the track skipped
- Type:
- object