Update Client.js

update proxy-agent to version 5
This commit is contained in:
Ahmed 2023-11-30 14:12:36 +02:00 committed by GitHub
parent cb03a1a918
commit ed01238368
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1024,7 +1024,7 @@ class Client extends BaseClient {
typeof options.proxy === 'string' && typeof options.proxy === 'string' &&
testImportModule('proxy-agent') === false testImportModule('proxy-agent') === false
) { ) {
throw new Error('MISSING_MODULE', 'proxy-agent', 'npm install proxy-agent'); throw new Error('MISSING_MODULE', 'proxy-agent', 'npm install proxy-agent@5');
} }
if (typeof options.shardCount !== 'number' || isNaN(options.shardCount) || options.shardCount < 1) { if (typeof options.shardCount !== 'number' || isNaN(options.shardCount) || options.shardCount < 1) {
throw new TypeError('CLIENT_INVALID_OPTION', 'shardCount', 'a number greater than or equal to 1'); throw new TypeError('CLIENT_INVALID_OPTION', 'shardCount', 'a number greater than or equal to 1');