Player

new Player(client, authCodes)

Create a new Dismusic Player

Parameters:
NameTypeDescription
clientObject

The discord.js Client you want to use

authCodesAuthCodes | undefined

The auth code for spotify

Methods

(async) createQueue(guild, options) → {QueueBuilder}

Create a new queue

Parameters:
NameTypeDescription
guildobject

the guild you want to create a queue for

optionsobject

The options for creating a queue

Returns:

The queue you just created

Type: 
QueueBuilder

existsQueue(guild) → {boolean}

Check if the queue exists in a guild

Parameters:
NameTypeDescription
guildobject

the guild you want to validate

Returns:

true if the guild exists in the queue, false otherwise

Type: 
boolean

(async) getQueue(guild) → {QueueBuilder}

Get the existing Queue of a guild

Parameters:
NameTypeDescription
guildobject

The guild of the queue you want to get

Returns:

The queue of guild

Type: 
QueueBuilder

injectCustomData(param) → {any}

Inject custom data to your tracks

Parameters:
NameTypeDescription
paramobject

target: "the target you want to inject", key: "the key that will be injected into the target", value: "the value that will be injected into the target"

Returns:

injected target

Type: 
any

Search a track

Parameters:
NameTypeDescription
queryString

The query you want to search

engineString

The place where you want to search. Can be 'YouTube' or 'SoundCloud'