Androz2091 / discord-player

🎧 Complete framework to simplify the implementation of music commands using discord.js v14
https://discord-player.js.org/
MIT License
605 stars 192 forks source link

SoundCloud links don't work #692

Closed joshuayuen99 closed 2 years ago

joshuayuen99 commented 3 years ago

Describe the bug SoundCloud links don't work. Trying to play one results in the following error:

E:\TundraBot\node_modules\discord-player\dist\Structures\Queue.js:649
                    .arbitraryStream(track.raw.source === "soundcloud" ? yield track.raw.engine.downloadProgressive() : typeof track.raw.engine === "function" ? yield track.raw.engine() : track.raw.engine, {
                                                                                                ^

TypeError: track.raw.engine.downloadProgressive is not a function
    at Queue.<anonymous> (E:\TundraBot\node_modules\discord-player\dist\Structures\Queue.js:649:97)
    at Generator.next (<anonymous>)
    at E:\TundraBot\node_modules\discord-player\dist\Structures\Queue.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (E:\TundraBot\node_modules\discord-player\dist\Structures\Queue.js:4:12)
    at Queue.play (E:\TundraBot\node_modules\discord-player\dist\Structures\Queue.js:616:16)
    at Queue.<anonymous> (E:\TundraBot\node_modules\discord-player\dist\Structures\Queue.js:208:30)
    at Generator.next (<anonymous>)
    at E:\TundraBot\node_modules\discord-player\dist\Structures\Queue.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (E:\TundraBot\node_modules\discord-player\dist\Structures\Queue.js:4:12)
    at StreamDispatcher.<anonymous> (E:\TundraBot\node_modules\discord-player\dist\Structures\Queue.js:186:56)
    at StreamDispatcher.emit (node:events:394:28)
    at AudioPlayer.<anonymous> (E:\TundraBot\node_modules\discord-player\dist\VoiceInterface\StreamDispatcher.js:90:31)
    at AudioPlayer.emit (node:events:394:28)
    at AudioPlayer.set state [as state] (E:\TundraBot\node_modules\discord-player\node_modules\@discordjs\voice\dist\audio\AudioPlayer.js:172:14)

To Reproduce Try to play a SoundCloud link.

Expected behavior The SoundCloud song should play.

Please complete the following information:

twlite commented 3 years ago

Hello, I am unable to reproduce this

Klairm commented 3 years ago

For me, I can't use any link, if I pass a YT or Spotify link, it won't be able to get the song.

https://i.imgur.com/n38iRt1.png

GaryCraft commented 3 years ago

Got the same error Link used TypeError: track.raw.engine.downloadProgressive is not a function at Queue.<anonymous> (E:\program-Archive\git\ZeroMusic\node_modules\discord-player\dist\Structures\Queue.js:702:50) at Generator.next (<anonymous>) at E:\program-Archive\git\ZeroMusic\node_modules\discord-player\dist\Structures\Queue.js:8:71 at new Promise (<anonymous>) at __awaiter (E:\program-Archive\git\ZeroMusic\node_modules\discord-player\dist\Structures\Queue.js:4:12) at Queue.play (E:\program-Archive\git\ZeroMusic\node_modules\discord-player\dist\Structures\Queue.js:649:16) at Object.execute (E:\program-Archive\git\ZeroMusic\commands\music\play.js:96:28) at processTicksAndRejections (node:internal/process/task_queues:96:5)

b0kch01 commented 3 years ago

I found out that this error occurs consistently when you are playing SoundCloud links using the optional downloader module:

const { Player } = require("discord-player");
const { Downloader } = require("@discord-player/downloader");

const player = new Player( ... );
player.use("YOUTUBE_DL", Downloader);

Node - v16.6.1 discord-player - v5.1.0 discord-player/downloader - v3.0.1

twlite commented 2 years ago

Try v5.3.x, re-open if this still persists. I have added a check for downloadProgressive function