From 21d37ed0cc71b227be0feadc4ffbcd522ca4f00e Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Thu, 13 Feb 2020 23:48:36 +0200 Subject: [PATCH] docs: clarify what zlib-sync does (#3785) * docs: Clarify what zlib-sync does * docs: Update docs site welcome * src/docs: Remove `ws.compress` from docs This is a deprecated parameter and you shouldn't use it unless you have zlib-sync installed, and even then, compression is automatically enabled * docs: Apply suggestion Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> --- README.md | 2 +- docs/general/welcome.md | 2 +- src/util/Constants.js | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3a2957981..c0e35754a 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Using opusscript is only recommended for development environments where @discord For production bots, using @discordjs/opus should be considered a necessity, especially if they're going to be running on multiple servers. ### Optional packages -- [zlib-sync](https://www.npmjs.com/package/zlib-sync) for faster WebSocket data inflation (`npm install zlib-sync`) +- [zlib-sync](https://www.npmjs.com/package/zlib-sync) for WebSocket data compression and inflation (`npm install zlib-sync`) - [erlpack](https://github.com/discordapp/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install discordapp/erlpack`) - One of the following packages can be installed for faster voice packet encryption and decryption: - [sodium](https://www.npmjs.com/package/sodium) (`npm install sodium`) diff --git a/docs/general/welcome.md b/docs/general/welcome.md index 936c01a48..ae90aa259 100644 --- a/docs/general/welcome.md +++ b/docs/general/welcome.md @@ -46,7 +46,7 @@ Using opusscript is only recommended for development environments where @discord For production bots, using @discordjs/opus should be considered a necessity, especially if they're going to be running on multiple servers. ### Optional packages -- [zlib-sync](https://www.npmjs.com/package/zlib-sync) for faster WebSocket data inflation (`npm install zlib-sync`) +- [zlib-sync](https://www.npmjs.com/package/zlib-sync) for WebSocket data compression and inflation (`npm install zlib-sync`) - [erlpack](https://github.com/discordapp/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install discordapp/erlpack`) - One of the following packages can be installed for faster voice packet encryption and decryption: - [sodium](https://www.npmjs.com/package/sodium) (`npm install sodium`) diff --git a/src/util/Constants.js b/src/util/Constants.js index e97adafd1..c3934a3f7 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -61,8 +61,6 @@ exports.DefaultOptions = { * WebSocket options (these are left as snake_case to match the API) * @typedef {Object} WebsocketOptions * @property {number} [large_threshold=250] Number of members in a guild to be considered large - * @property {boolean} [compress=false] Whether to compress data sent on the connection - * (defaults to `false` for browsers) */ ws: { large_threshold: 250,