✨ Add Player#filters property
This commit is contained in:
parent
a4865ed4c4
commit
f3b8342603
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue