discord-player-play-dl/docs/youtube/proxy.md
2021-06-20 20:07:09 +05:45

16 lines
No EOL
403 B
Markdown

# Using Proxy to avoid 429
```js
const { Player } = require("discord-player");
const HttpsProxyAgent = require("https-proxy-agent");
// Remove "user:pass@" if you don't need to authenticate to your proxy.
const proxy = "http://user:pass@111.111.111.111:8080";
const agent = HttpsProxyAgent(proxy);
const player = new Player(client, {
ytdlOptions: {
requestOptions: { agent }
}
});
```