Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #44 from Acnologla/master
Browse files Browse the repository at this point in the history
Added support for filtering
  • Loading branch information
miguelmoraesp authored Nov 16, 2020
2 parents 03ec26d + d919739 commit f368480
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/GorilinkPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,14 @@ class GorilinkPlayer extends EventEmitter {

/**
* Send packets to Lavalink Node
* You should only use operations if your lavalink supports filters
* @param {String} op Operation string
* @param {Object} data Packet data
* @param {Object} [operations] Filtering operations
*/
send(op, data) {
send(op, data, operations = {}) {
if (!this.node.connected) throw new Error('No avaliable websocket connection for this node.')
return this.node.send({ ...data, op, guildId: this.guild })
return this.node.send({ ...data, op, guildId: this.guild, operations })
}
}

Expand Down

0 comments on commit f368480

Please sign in to comment.