2021-04-21 13:30:40 +05:00
|
|
|
# Using Cookies to avoid 429
|
|
|
|
|
|
|
|
```js
|
|
|
|
const { Player } = require("discord-player");
|
|
|
|
|
|
|
|
const player = new Player(client, {
|
2021-06-20 19:22:09 +05:00
|
|
|
ytdlOptions: {
|
2021-04-21 13:30:40 +05:00
|
|
|
requestOptions: {
|
|
|
|
headers: {
|
|
|
|
cookie: "YOUR_YOUTUBE_COOKIE"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2021-04-21 15:39:51 +05:00
|
|
|
```
|
|
|
|
|
|
|
|
> Keep in mind that using `cookies` after getting `429` **does not fix the problem**.
|
|
|
|
> You should use `cookies` before getting `429` which helps to **_reduce_** `Error: Status Code 429`
|