Version 1.1.2-rc4 - Ajout de agent Cookie
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "chopin-backend",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "chopin-backend",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@discordjs/voice": "^0.18.0",
|
||||
|
@@ -18,8 +18,8 @@ async function getStream(song) {
|
||||
'Chrome/116.0.5845.97 Safari/537.36',
|
||||
'Accept-Language': 'en-US,en;q=0.9'
|
||||
};
|
||||
var cookies = await JSON.parse(await fs.readFileSync(__glob.COOKIES, 'utf-8'));
|
||||
|
||||
var cookies = await JSON.parse(await fs.readFileSync(__glob.COOKIES, 'utf-8'));
|
||||
ytdl.createAgent(cookies)
|
||||
let stream = ytdl(song.url, {
|
||||
quality: 'highestaudio',
|
||||
highWaterMark: 1 << 30,
|
||||
@@ -28,7 +28,6 @@ async function getStream(song) {
|
||||
bitrate: 128,
|
||||
requestOptions: {
|
||||
headers: headers,
|
||||
cookies: cookies
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user