Add Player#filters property

This commit is contained in:
Androz2091 2020-07-04 15:22:10 +02:00
parent a4865ed4c4
commit f3b8342603

View file

@ -83,6 +83,11 @@ class Player {
for (const prop in options) { for (const prop in options) {
this.options[prop] = options[prop] this.options[prop] = options[prop]
} }
/**
* Default filters for the queues created with this player.
* @type {Filters}
*/
this.filters = filters
// Listener to check if the channel is empty // Listener to check if the channel is empty
client.on('voiceStateUpdate', (oldState, newState) => this._handleVoiceStateUpdate(oldState, newState)) client.on('voiceStateUpdate', (oldState, newState) => this._handleVoiceStateUpdate(oldState, newState))
@ -242,7 +247,7 @@ class Player {
const queue = new Queue(voiceChannel.guild.id) const queue = new Queue(voiceChannel.guild.id)
queue.voiceConnection = connection queue.voiceConnection = connection
queue.filters = {} queue.filters = {}
Object.keys(filters).forEach((f) => { Object.keys(this.filters).forEach((f) => {
queue.filters[f] = false queue.filters[f] = false
}) })
let result = null let result = null