feat(Client): Support Proxy

- https://github.com/discordjs/discord.js/issues/3039#issuecomment-1033955220
- #283
(not tested yet)

Co-Authored-By: Nguyễn Hồng Đức <hongducyb123@gmail.com>
This commit is contained in:
March 7th
2022-08-29 11:10:47 +07:00
parent da93f6364d
commit 00a2b8aa5b
7 changed files with 19 additions and 4 deletions

View File

@@ -40,6 +40,7 @@ const { randomUA } = require('../util/Constants');
* @property {boolean} [autoCookie=true] Automatically add Cookies to Request on startup
* @property {boolean} [patchVoice=true] Automatically patch @discordjs/voice module (support for call)
* @property {boolean} [autoRedeemNitro=false] Automaticlly redeems nitro codes <NOTE: there is no cooldown on the auto redeem>
* @property {string} [proxy] Proxy to use for the WebSocket + REST connection (proxy-agent uri type) {@link https://www.npmjs.com/package/proxy-agent}.
* @property {boolean} [DMSync=false] Automatically synchronize call status (DM and group) at startup (event synchronization) [Warning: May cause rate limit to gateway)
* @property {number} [shardCount=1] The total amount of shards used by all processes of this bot
* (e.g. recommended shard count, shard count of the ShardingManager)
@@ -168,6 +169,7 @@ class Options extends null {
userAgentSuffix: [],
presence: { status: 'online', since: 0, activities: [], afk: false },
sweepers: {},
proxy: '',
ws: {
large_threshold: 50,
compress: false,