music: fix status check

This commit is contained in:
Cynthia Foxwell 2022-12-10 15:37:42 -07:00
parent 606eaf0185
commit 00d6bef759

View file

@ -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":