From d36f528518545e3a5d49bd96eaae91b6118d037a Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Sun, 13 Jun 2021 14:38:13 +0545 Subject: [PATCH] check for metadata while creating queue --- src/Player.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Player.ts b/src/Player.ts index 8b33207..841cdf6 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -21,7 +21,7 @@ class DiscordPlayer extends EventEmitter { if (this.queues.has(guild.id)) return this.queues.get(guild.id) as Queue; const queue = new Queue(this, guild, queueInitOptions); - queue.metadata = queueInitOptions.metadata; + if ("metadata" in queueInitOptions) queue.metadata = queueInitOptions.metadata; this.queues.set(guild.id, queue); return queue as Queue;