gpt4 book ai didi

node.js - Heroku Discord.js ffmpeg

转载 作者:行者123 更新时间:2023-12-04 23:11:54 27 4
gpt4 key购买 nike

我写了一个不和谐的音乐机器人,我使用了ffmpeg,所以我把可执行文件放在botfolder中,现在我想把机器人推到heroku中,安装了npm包,但是在heroku中出现了这个错误:

2021-01-01T02:48:33.038447+00:00 app[Worker.1]: Error: FFmpeg/avconv not found!
2021-01-01T02:48:33.038488+00:00 app[Worker.1]: at Function.getInfo (/app/node_modules/prism-media/src/core/FFmpeg.js:142:11)
2021-01-01T02:48:33.038489+00:00 app[Worker.1]: at Function.create (/app/node_modules/prism-media/src/core/FFmpeg.js:155:38)
2021-01-01T02:48:33.038490+00:00 app[Worker.1]: at new FFmpeg (/app/node_modules/prism-media/src/core/FFmpeg.js:44:27)
2021-01-01T02:48:33.038491+00:00 app[Worker.1]: at AudioPlayer.playUnknown (/app/node_modules/discord.js/src/client/voice/player/BasePlayer.js:47:20)
2021-01-01T02:48:33.038491+00:00 app[Worker.1]: at VoiceConnection.play (/app/node_modules/discord.js/src/client/voice/util/PlayInterface.js:71:28)
2021-01-01T02:48:33.038492+00:00 app[Worker.1]: at play (/app/index.js:335:47)
2021-01-01T02:48:33.038493+00:00 app[Worker.1]: at Client.<anonymous> (/app/index.js:143:17)
2021-01-01T02:48:33.038493+00:00 app[Worker.1]: at processTicksAndRejections (internal/process/task_queues.js:97:5)

最佳答案

现在可以了,只需要添加 ffmpeg-static

关于node.js - Heroku Discord.js ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65527029/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com