new Player(client, youtubeToken, options)
+ + + + + + + + + +-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
client |
+
+
+
+
+
+Client
+
+
+
+ |
+
+
+
+
+
+
+ Your Discord Client instance. + + |
+
youtubeToken |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+ Your Youtube Data v3 API key. + + |
+
options |
+
+
+
+
+
+PlayerOptions
+
+
+
+ |
+
+
+
+
+
+
+ The PlayerOptions object. + + |
+
Members
+ + + +client :Client
+ + + + +Your Discord Client instance.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Type:
+-
+
-
+
+
Client
+ + +
+
options :PlayerOptions
+ + + + +Player options.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Type:
+-
+
-
+
+
PlayerOptions
+ + +
+
queues :Array.<Queue>
+ + + + +The guilds data.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Type:
+-
+
-
+
+
Array.<Queue>
+ + +
+
SYA :Youtube
+ + + + +The Simple Youtube API Client.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Type:
+-
+
-
+
+
Youtube
+ + +
+
youtubeToken :string
+ + + + +Your Youtube Data v3 API key.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Type:
+-
+
-
+
+
string
+ + +
+
Methods
+ + + +addToQueue(guildID, songName) → {Promise.<Song>}
+ + + + + +Adds a song to the guild queue.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
guildID |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ + + + | +
songName |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+ The name of the song to add to the queue. + + |
+
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise.<Song>
+ + +
+
clearQueue(guildID) → {Promise.<Queue>}
+ + + + + +Clears the guild queue, but not the current song.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
guildID |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ + + + | +
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise.<Queue>
+ + +
+
getQueue(guildID) → {Promise.<Queue>}
+ + + + + +Gets the guild queue.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
guildID |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ + + + | +
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise.<Queue>
+ + +
+
isPlaying(guildID) → {Boolean}
+ + + + + +Whether a guild is currently playing songs
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
guildID |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+ The guild ID to check + + |
+
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Boolean
+ + +
+
Whether the guild is currently playing songs
+pause(guildID) → {Promise.<Song>}
+ + + + + +Pauses the current song.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
guildID |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ + + + | +
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise.<Song>
+ + +
+
play(voiceChannel, songName) → {Promise.<Song>}
+ + + + + +Plays a song in a voice channel.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
voiceChannel |
+
+
+
+
+
+voiceChannel
+
+
+
+ |
+
+
+
+
+
+
+ The voice channel in which the song will be played. + + |
+
songName |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+ The name of the song to play. + + |
+
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise.<Song>
+ + +
+
resume(guildID) → {Promise.<Song>}
+ + + + + +Resumes the current song.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
guildID |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ + + + | +
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise.<Song>
+ + +
+
setVolume(guildID, percent) → {Promise.<void>}
+ + + + + +Updates the volume.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
guildID |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ + + + | +
percent |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ + + + | +
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise.<void>
+ + +
+
skip(guildID) → {Promise.<Queue>}
+ + + + + +Skips a song.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
guildID |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ + + + | +
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise.<Queue>
+ + +
+
stop(guildID) → {Promise.<void>}
+ + + + + +Stops playing music.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
guildID |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ + + + | +
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise.<void>
+ + +
+