diff --git a/src/rest/APIRequest.js b/src/rest/APIRequest.js index 6ecf577..fe3b166 100644 --- a/src/rest/APIRequest.js +++ b/src/rest/APIRequest.js @@ -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;