From 5f081c087d5ec7c67286d1ecc2d18897e40b99bb Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Sat, 15 Jul 2023 12:36:25 +0200 Subject: [PATCH] fix: Add cookie to ytdlOptions --- index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index c200ad0..68413db 100644 --- a/index.js +++ b/index.js @@ -35,7 +35,14 @@ for (const file of systemCommandFiles) { } const player = new Player(client, { - useLegacyFFmpeg: false + useLegacyFFmpeg: false, + ytdlOptions: { + requestOptions: { + headers: { + cookie: process.env.YOUTUBE_COOKIE || '' + } + } + } }); onBeforeCreateStream(async (track) => {