Closed retrouser955 closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Seems to work with the music bot inside the monorepo
this.player = new Player(this as any, {
ytdlOptions: {
requestOptions: {
headers: {
cookie: process.env.YOUTUBE_COOKIE
}
}
},
skipFFmpeg: true,
ffmpegPath: `${__dirname}/lib`
});
console.log(`FFMPEG PATH IS: ${process.env.FFMPEG_PATH}`)
// Actually log: FFMPEG PATH IS: __dirname/lib
But tests are failing
it("should set process.env.FFMPEG_PATH to given path", () => {
// not actual ffmpeg path. just dummy
new Player(client, {
ffmpegPath: "./packages/ffmpeg"
})
expect(process.env.FFMPEG_PATH).toBe("./packages/ffmpeg")
})
// error
test("should set process.env.FFMPEG_PATH to given path", () => { // not actual ffmpeg path. just dummy new Player(client, { ffmpegPath: "./packages/ffmpeg", ignoreInstance: true }) expect(process.env.FFMPEG_PATH).toBe("./packages/ffmpeg") })
does this work?
Yup works.
Changes
Add ffmpegPath option to player instead of setting the path via process.env.FFMPEG_PATH
Status