Global

Members

events :EventEmitter

The eventemitter
Type:
  • EventEmitter
Source:

players :Object

Object containing all players by guildID
Type:
  • Object
Source:

Methods

createTrack(url) → {Promise.<Track>}

Creates a track from an URL
Parameters:
Name Type Description
url String
Source:
Returns:
Type
Promise.<Track>

createTrackWithQuery(query) → {Promise.<(Track|YoutubeTrack|Array.<YoutubePlaylistTrack>)>}

Creates a track using a query, tries to find the right type, if not a link, searches for it
Parameters:
Name Type Description
query String Either a url or a search
Source:
Returns:
Type
Promise.<(Track|YoutubeTrack|Array.<YoutubePlaylistTrack>)>

createTrackWithSearch(query) → {Promise.<YoutubeTrack>}

Creates a YoutubeTrack using a search Query
Parameters:
Name Type Description
query String The search query
Source:
Returns:
Type
Promise.<YoutubeTrack>

createYoutubePlaylistTrack(url) → {Promise.<Array.<YoutubePlaylistTrack>>}

Creates an array with YoutubePlaylistTracks from an URL
Parameters:
Name Type Description
url String
Source:
Returns:
Type
Promise.<Array.<YoutubePlaylistTrack>>

createYoutubeTrack(url) → {Promise.<YoutubeTrack>}

Creates a YoutubeTrack from an URL
Parameters:
Name Type Description
url String
Source:
Returns:
Type
Promise.<YoutubeTrack>

getPlayer(guildId, createPlayeropt) → {Player}

Gets the player for the specified guildID
Parameters:
Name Type Attributes Default Description
guildId GuildID
createPlayer Boolean <optional>
false If the player should be created if it doesn't exist, will create of type class if specified
Source:
Returns:
Type
Player

isInVoice(interaction) → {boolean}

Checks if a user is in a voice channel
Parameters:
Name Type Description
interaction Interaction Interaction from user in question
Source:
Returns:
If check passed
Type
boolean

isInVoiceWithBot(interaction) → {boolean}

Checks if a user is in a voice channel with this bot
Parameters:
Name Type Description
interaction Interaction Interaction from user in question
Source:
Returns:
If check passed
Type
boolean

isVoiceJoinable(interaction) → {boolean}

Checks if a user is in a joinable voice channel
Parameters:
Name Type Description
interaction Interaction Interaction from user in question
Source:
Returns:
If check passed
Type
boolean

removePlayer(guildId)

Deletes the player for the specified guildID
Parameters:
Name Type Description
guildId GuildID
Source: