Skip to content

Commit

Permalink
fix: proxy is not a constructor (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
aiko-chan-ai committed Sep 3, 2023
1 parent c152c0a commit 12f96a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rest/APIRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class APIRequest {
if (agent === null) {
if (typeof this.client.options.proxy === 'string' && this.client.options.proxy.length > 0) {
const proxy = require('proxy-agent');
agent = new proxy(this.client.options.proxy);
agent = new proxy.ProxyAgent(this.client.options.proxy);
} else if (this.client.options.http.agent instanceof https.Agent) {
agent = this.client.options.http.agent;
agent.keepAlive = true;
Expand Down

0 comments on commit 12f96a5

Please sign in to comment.