From c152c0a814d868266ebb57a1cddd43b75db92091 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sat, 2 Sep 2023 21:10:00 +0700 Subject: [PATCH] fix: proxy is not a constructor #833 #656 --- src/client/websocket/WebSocketShard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index da8fc5c..2cbe384 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -281,7 +281,7 @@ class WebSocketShard extends EventEmitter { let args = { handshakeTimeout: 30_000 }; if (client.options.proxy.length > 0) { const proxy = require('proxy-agent'); - args.agent = new proxy(client.options.proxy); + args.agent = new proxy.ProxyAgent(client.options.proxy); this.debug(`Using proxy ${client.options.proxy}`, args); } // Adding a handshake timeout to just make sure no zombie connection appears.