From 00d6bef759907d0e1fd611a5e4736bee3f398f32 Mon Sep 17 00:00:00 2001 From: Cynthia Date: Sat, 10 Dec 2022 15:37:42 -0700 Subject: [PATCH] music: fix status check --- src/modules/music.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/music.js b/src/modules/music.js index 5c927db..9ffa178 100644 --- a/src/modules/music.js +++ b/src/modules/music.js @@ -278,7 +278,7 @@ async function enqueue({ media = await playdl.stream(url); } - if (connection.status != AudioPlayerStatus.Idle) { + if (connection.status && connection.status != AudioPlayerStatus.Idle) { const queueItem = { url, type, @@ -339,6 +339,7 @@ async function enqueue({ return; } + console.log(media); const resource = createAudioResource(media.stream, {inputType: media.type}); console.log(resource); connection.player.play(resource); @@ -431,9 +432,6 @@ command.callback = async function ( const subcommand = args.shift(); let argStr = args.join(" "); - console.log(arguments); - console.log(subcommand, argStr); - switch (subcommand) { case "play": case "p":