add resolveQueue method

This commit is contained in:
Snowflake107 2021-07-04 19:20:40 +05:45
parent 4c93c39ec7
commit 1a5e4cf2b8
No known key found for this signature in database
GPG key ID: FA40E3EC5CB6DCD6

View file

@ -487,6 +487,15 @@ class Player extends EventEmitter<PlayerEvents> {
return generateDependencyReport();
}
/**
* Resolves qeuue
* @param {GuildResolvable|Queue} queueLike Queue like object
* @returns {Queue}
*/
resolveQueue<T>(queueLike: GuildResolvable | Queue): Queue<T> {
return this.getQueue(queueLike instanceof Queue ? queueLike.guild : queueLike);
}
*[Symbol.iterator]() {
yield* Array.from(this.queues.values());
}