From cb03a1a9184f94b3efc997683f1bcc95c9edcd4a Mon Sep 17 00:00:00 2001 From: Ahmed Date: Thu, 30 Nov 2023 14:11:45 +0200 Subject: [PATCH] Update WebSocketShard.js fix proxy to proxy-agent v5 --- src/client/websocket/WebSocketShard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index 2cbe384..a72a2ad 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -280,8 +280,8 @@ class WebSocketShard extends EventEmitter { let args = { handshakeTimeout: 30_000 }; if (client.options.proxy.length > 0) { - const proxy = require('proxy-agent'); - args.agent = new proxy.ProxyAgent(client.options.proxy); + const ProxyAgent = require('proxy-agent'); + args.agent = new ProxyAgent(client.options.proxy); this.debug(`Using proxy ${client.options.proxy}`, args); } // Adding a handshake timeout to just make sure no zombie connection appears.