new Player(client, authCodes)
Create a new Dismusic Player
Parameters:
Name | Type | Description |
---|---|---|
client | Object | The discord.js Client you want to use |
authCodes | AuthCodes | | The auth code for spotify |
Methods
(async) createQueue(guild, options) → {QueueBuilder}
Create a new queue
Parameters:
Name | Type | Description |
---|---|---|
guild | object | the guild you want to create a queue for |
options | object | 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:
Name | Type | Description |
---|---|---|
guild | object | 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:
Name | Type | Description |
---|---|---|
guild | object | 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:
Name | Type | Description |
---|---|---|
param | object | 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
(async) search(query, engine)
Search a track
Parameters:
Name | Type | Description |
---|---|---|
query | String | The query you want to search |
engine | String | The place where you want to search. Can be 'YouTube' or 'SoundCloud' |