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",
|
"name": "chopin-backend",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "chopin-backend",
|
"name": "chopin-backend",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/voice": "^0.18.0",
|
"@discordjs/voice": "^0.18.0",
|
||||||
|
@@ -18,8 +18,8 @@ async function getStream(song) {
|
|||||||
'Chrome/116.0.5845.97 Safari/537.36',
|
'Chrome/116.0.5845.97 Safari/537.36',
|
||||||
'Accept-Language': 'en-US,en;q=0.9'
|
'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, {
|
let stream = ytdl(song.url, {
|
||||||
quality: 'highestaudio',
|
quality: 'highestaudio',
|
||||||
highWaterMark: 1 << 30,
|
highWaterMark: 1 << 30,
|
||||||
@@ -28,7 +28,6 @@ async function getStream(song) {
|
|||||||
bitrate: 128,
|
bitrate: 128,
|
||||||
requestOptions: {
|
requestOptions: {
|
||||||
headers: headers,
|
headers: headers,
|
||||||
cookies: cookies
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user