From 1a5e4cf2b8ecf8753647f3d2d0aa9f8525bf9814 Mon Sep 17 00:00:00 2001 From: Snowflake107 <46562212+Snowflake107@users.noreply.github.com> Date: Sun, 4 Jul 2021 19:20:40 +0545 Subject: [PATCH] add resolveQueue method --- src/Player.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Player.ts b/src/Player.ts index de7b484..106aa0b 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -487,6 +487,15 @@ class Player extends EventEmitter { return generateDependencyReport(); } + /** + * Resolves qeuue + * @param {GuildResolvable|Queue} queueLike Queue like object + * @returns {Queue} + */ + resolveQueue(queueLike: GuildResolvable | Queue): Queue { + return this.getQueue(queueLike instanceof Queue ? queueLike.guild : queueLike); + } + *[Symbol.iterator]() { yield* Array.from(this.queues.values()); }