GorilinkPlayer

GorilinkPlayer

Represents a guild Player instance

Constructor

new GorilinkPlayer(node, options, manager)

The constructor of GorilinkPlayer

Parameters:
Name Type Description
node GorilinkNode

Your node instance

options Object

Player options

manager GorilinkManager

Your GorilinkManager instance

Source:

Extends

  • EventEmitter

Members

guild :String|Guild

Player guild id

Source:

looped :Number

Player looped status

Source:

manager

GorilinkManager instance

Source:

node

GorilinkNode instance

Source:

paused :Boolean

Player paused status

Source:

playing :Boolean

Player playing status

Source:

position :Number

Player current track position

Source:

queue :Queue

Create a Queue instance

Source:

state :Object

Player states

Source:

(nullable) textChannel :TextChannel

Player textChannel

Source:

timestamp :Number

Created on method play is called

Source:

track :Object

Player current track

Source:

voiceChannel :String|VoiceChannel

Player voiceChannel id

Source:

voiceUpdateState :Object

Player voice state

Source:

Methods

connect(data)

Connects in voiceChannel

Parameters:
Name Type Description
data Object

Discord packet

Source:

destroy()

Destroys the guild player

Source:

getEvent(data)

Handle events cames from Lavalink WebSocket connection

Parameters:
Name Type Description
data Object

Lavalink packet

Source:

loop(op)

Set a loop to player

  • 0 off
  • 1 loop single
  • 2 loop all
Parameters:
Name Type Description
op Number

Number of operation

Source:

pause(pause)

Send pause operation to Lavalink Node

Parameters:
Name Type Description
pause Boolean

Pause state

Source:

play(track, options)

Plays a specific song based on Lavalink base64 string

Parameters:
Name Type Description
track String

Track base64 will be played

options Object

Play options

Source:

seek(pos)

Send seek operation to Lavalink Node

Parameters:
Name Type Description
pos Number

Position to be set

Source:

send(op, data, operationsopt)

Send packets to Lavalink Node You should only use operations if your lavalink supports filters

Parameters:
Name Type Attributes Description
op String

Operation string

data Object

Packet data

operations Object <optional>

Filtering operations

Source:

setEQ(bands)

Send equalizer operation to Lavalink Node

Parameters:
Name Type Description
bands Array

Equalizer bands

Source:

stop()

Send stop operation to Lavalink Node

Source:

volume(vol)

Send volume operation to Lavalink Node

Parameters:
Name Type Description
vol Number

Volume to be set

Source: