mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
build(peer-deps): use uws fork (#2781)
* feat: use uws fork * chore: update to 149 for uws
This commit is contained in:
@@ -45,7 +45,7 @@ For production bots, using node-opus should be considered a necessity, especiall
|
||||
- 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`)
|
||||
- [libsodium.js](https://www.npmjs.com/package/libsodium-wrappers) (`npm install libsodium-wrappers`)
|
||||
- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws`)
|
||||
- [uws](https://www.npmjs.com/package/@discordjs/uws) for a much faster WebSocket connection (`npm install @discordjs/uws`)
|
||||
- [bufferutil](https://www.npmjs.com/package/bufferutil) for a much faster WebSocket connection when *not* using uws (`npm install bufferutil`)
|
||||
|
||||
## Example usage
|
||||
|
||||
@@ -51,7 +51,7 @@ For production bots, using node-opus should be considered a necessity, especiall
|
||||
- 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`)
|
||||
- [libsodium.js](https://www.npmjs.com/package/libsodium-wrappers) (`npm install libsodium-wrappers`)
|
||||
- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws`)
|
||||
- [uws](https://www.npmjs.com/package/@discordjs/uws) for a much faster WebSocket connection (`npm install @discordjs/uws`)
|
||||
- [bufferutil](https://www.npmjs.com/package/bufferutil) for a much faster WebSocket connection when *not* using uws (`npm install bufferutil`)
|
||||
|
||||
## Example usage
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"erlpack": "discordapp/erlpack",
|
||||
"libsodium-wrappers": "^0.7.3",
|
||||
"sodium": "^2.0.3",
|
||||
"uws": "<=10.148.1",
|
||||
"@discordjs/uws": "^10.149.0",
|
||||
"zlib-sync": "^0.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -69,6 +69,7 @@
|
||||
"https": false,
|
||||
"ws": false,
|
||||
"uws": false,
|
||||
"@discordjs/uws": false,
|
||||
"erlpack": false,
|
||||
"prism-media": false,
|
||||
"opusscript": false,
|
||||
|
||||
@@ -9,7 +9,7 @@ if (browser) {
|
||||
exports.WebSocket = window.WebSocket; // eslint-disable-line no-undef
|
||||
} else {
|
||||
try {
|
||||
exports.WebSocket = require('uws');
|
||||
exports.WebSocket = require('@discordjs/uws');
|
||||
} catch (err) {
|
||||
exports.WebSocket = require('ws');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user