music: fix status check
This commit is contained in:
parent
606eaf0185
commit
00d6bef759
1 changed files with 2 additions and 4 deletions
|
@ -278,7 +278,7 @@ async function enqueue({
|
||||||
media = await playdl.stream(url);
|
media = await playdl.stream(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connection.status != AudioPlayerStatus.Idle) {
|
if (connection.status && connection.status != AudioPlayerStatus.Idle) {
|
||||||
const queueItem = {
|
const queueItem = {
|
||||||
url,
|
url,
|
||||||
type,
|
type,
|
||||||
|
@ -339,6 +339,7 @@ async function enqueue({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(media);
|
||||||
const resource = createAudioResource(media.stream, {inputType: media.type});
|
const resource = createAudioResource(media.stream, {inputType: media.type});
|
||||||
console.log(resource);
|
console.log(resource);
|
||||||
connection.player.play(resource);
|
connection.player.play(resource);
|
||||||
|
@ -431,9 +432,6 @@ command.callback = async function (
|
||||||
const subcommand = args.shift();
|
const subcommand = args.shift();
|
||||||
let argStr = args.join(" ");
|
let argStr = args.join(" ");
|
||||||
|
|
||||||
console.log(arguments);
|
|
||||||
console.log(subcommand, argStr);
|
|
||||||
|
|
||||||
switch (subcommand) {
|
switch (subcommand) {
|
||||||
case "play":
|
case "play":
|
||||||
case "p":
|
case "p":
|
||||||
|
|
Loading…
Reference in a new issue