Discord.JS Music Bot 不播放音乐 YTDL-Core

时间:2020-12-19 07:56:41

标签: discord.js ytdl

我是名为 Corion 的音乐机器人的共同所有者,我们在削弱 ytdl-core-discord 以支持 ytdl-core 后开始得到它。

我们不知道是什么导致了它,如果我们能得到任何帮助,我们将不胜感激。

2020-12-19T08:26:09.197180+00:00 app[worker.1]: /app/node_modules/prism-media/src/opus/Opus.js:64
2020-12-19T08:26:09.197200+00:00 app[worker.1]:     return this.encoder.decode(buffer, Opus.name === 'opusscript' ? null : this._options.frameSize);
2020-12-19T08:26:09.197201+00:00 app[worker.1]:                         ^
2020-12-19T08:26:09.197202+00:00 app[worker.1]: 
2020-12-19T08:26:09.197202+00:00 app[worker.1]: TypeError: The compressed data passed is corrupted
2020-12-19T08:26:09.197203+00:00 app[worker.1]:     at Decoder._decode (/app/node_modules/prism-media/src/opus/Opus.js:64:25)
2020-12-19T08:26:09.197203+00:00 app[worker.1]:     at Decoder._transform (/app/node_modules/prism-media/src/opus/Opus.js:189:20)
2020-12-19T08:26:09.197204+00:00 app[worker.1]:     at Decoder.Transform._write (node:internal/streams/transform:184:23)
2020-12-19T08:26:09.197204+00:00 app[worker.1]:     at writeOrBuffer (node:internal/streams/writable:388:12)
2020-12-19T08:26:09.197205+00:00 app[worker.1]:     at Decoder.Writable.write (node:internal/streams/writable:333:10)
2020-12-19T08:26:09.197205+00:00 app[worker.1]:     at PassThrough.ondata (node:internal/streams/readable:716:22)
2020-12-19T08:26:09.197206+00:00 app[worker.1]:     at PassThrough.emit (node:events:376:20)
2020-12-19T08:26:09.197206+00:00 app[worker.1]:     at addChunk (node:internal/streams/readable:305:12)
2020-12-19T08:26:09.197206+00:00 app[worker.1]:     at readableAddChunk (node:internal/streams/readable:280:9)
2020-12-19T08:26:09.197207+00:00 app[worker.1]:     at PassThrough.Readable.push (node:internal/streams/readable:219:10)

我们一直在努力解决由 ytdl-core-discord 一起删除该依赖项所导致的问题,但在这一点上,我们几乎走入了死胡同,没有想法。

有人知道如何解决我们的音乐机器人的问题吗?

如果有帮助,这里是我们的依赖项:

{
  "name": "corion",
  "version": "1.4",
  "description": "Discord music bot built with discord.js",
  "main": "index.js",
  "author": "MountainTiger <kieran.perkinton@gmail.com",
  "private": true,
  "homepage": "https://github.com/MountainTiger144/Corion/blob/main/README.md",
  "repository": "https://github.com/MountainTiger144/Corion",
  "bugs": "https://github.com/MountainTiger144/Corion/issues",
  "engines": {
    "node": ">=12.0.0"
  },
  "dependencies": {
    "@discordjs/opus": "^0.3.3",
    "opusscript": "^0.0.7",
    "discord.js": "^12.4.1",
    "ffmpeg-static": "^4.2.7",
    "lyrics-finder": "^21.4.0",
    "simple-youtube-api": "^5.2.1",
    "soundcloud-downloader": "^0.2.0",
    "string-progressbar": "^1.0.1",
    "ytdl-core": "^4.0.5"
  },
  "scripts": {
    "start": "node index.js",
    "trace": "node --trace-warnings"
  }
}

0 个答案:

没有答案