skick1234 / DisTube

A powerful Discord.js module for simplifying music commands and effortless playback of various sources with integrated audio filters.
https://distube.js.org
MIT License
423 stars 94 forks source link

There is nothing playing on the queu right now #137

Closed unloopedmido closed 3 years ago

unloopedmido commented 3 years ago

Please describe your problem in as much detail as possible: Whenever I use any commands such as "stop" or "loop", The bot sends me this: There is nothing playing right now. and its code is

const queue = DiscordBot.player.getQueue(interaction.guildId);
if (!queue || queue.playing) {
    return interaction.reply({
        ephermal: true,
        content: 'There is nothing playing on the queue right now.',
    });
}

Further information: My play command's code:

try {
          await interaction.deferReply();
    await wait(1000);
    await interaction.editReply('Song has been added to the queue!');
    await DiscordBot.player.playVoiceChannel(channel, search, queue)
} catch (e) {
    console.log(e);
}

Removing "queue" from await DiscordBot.player.playVoiceChannel(channel, search, queue) doesn't fix it.

skick1234 commented 3 years ago

Basically because it is playing

if (!queue || queue.playing)???

skick1234 commented 3 years ago

And read the docs, the third param of #playVoiceChannel is not a Queue

https://distube.js.org/#/docs/DisTube/beta/class/DisTube?scrollTo=playVoiceChannel