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

Searching songs not working #29

Closed kyttarikos closed 3 years ago

kyttarikos commented 3 years ago

So, when I try the play command with a URL as a string, it works. But when it's not, it doesn't search the song, and doesn't send a message for a song to pick.

I already have the events and other things right:

const DisTube = require("distube");
client.distube = new DisTube(client, { searchSongs: true, emitNewSongOnly: true, leaveOnFinish: true })

and this:


const status = (queue) => `Volume: \`${queue.volume}%\` || Loop: \`${queue.repeatMode ? queue.repeatMode == 2 ? "Queue" : "Song" : "Off"}\``;

client.distube
    .on("searchResult", (message, result) => {
        let i = 0;
        message.channel.send(`**Choose an option from below**\n${result.map(song => `**${++i}**. ${song.name} - \`${song.formattedDuration}\``).join("\n")}\n*Enter anything else or wait 60 seconds to cancel*`);
    })
    // DisTubeOptions.searchSongs = true
    .on("searchCancel", (message) => message.channel.send(`${client.emotes.error} | Searching canceled`))
    .on("error", (message, err) => message.channel.send(`${client.emotes.error} | An error encountered: ${err}`))

But when I send a non-link argument, it doesn't search songs, need help...

kyttarikos commented 3 years ago

If I don't respond, please send your answer here or DM me (IsaacM#8749). Thank you!

Jeydin21 commented 3 years ago

It could be that the message is too large to send.

Jeydin21 commented 3 years ago

Does it give an error? If so send it here.

skick1234 commented 3 years ago

I'll closed this because I think it's solved on discord support server. He is inactive.