From e141deb7ef4934b9121c69fa2b45129cdb0e9782 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 2 Dec 2016 21:42:49 -0500 Subject: [PATCH] Update installation info --- README.md | 12 ++++++++---- docs/general/welcome.md | 8 +++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f59ee7d65..1273fba49 100644 --- a/README.md +++ b/README.md @@ -22,18 +22,22 @@ It takes a much more object-oriented approach than most other JS Discord librari Usability and performance are key focuses of discord.js, and it also has nearly 100% coverage of the Discord API. ## Installation -**Node.js 6.0.0 or newer is required.** +**Node.js 6.0.0 or newer is required.** +Ignore any warnings about unmet peer dependencies - all of them are optional. Without voice support: `npm install discord.js --save` With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` -With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` -With a fast websocket client ([uws](https://www.npmjs.com/package/uws)) `npm install discord.js uws --save` -With fast websocket encoding ([erlpack](https://github.com/hammerandchisel/erlpack)) `npm install disscord.js hammerandchisel/erlpack --save` +With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` +### Audio engines The preferred audio engine is node-opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose node-opus. Using opusscript is only recommended for development environments where node-opus is tough to get working. For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers. +### Optional packages +- [uws](https://www.npmjs.com/package/uws) for much a much faster WebSocket connection (`npm install uws --save`) +- [erlpack](https://github.com/hammerandchisel/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install hammerandchisel/erlpack --save`) + ## Example Usage ```js const Discord = require('discord.js'); diff --git a/docs/general/welcome.md b/docs/general/welcome.md index 6e2e07a9b..468239573 100644 --- a/docs/general/welcome.md +++ b/docs/general/welcome.md @@ -26,16 +26,22 @@ It takes a much more object-oriented approach than most other JS Discord librari Usability and performance are key focuses of discord.js, and it also has nearly 100% coverage of the Discord API. ## Installation -**Node.js 6.0.0 or newer is required.** +**Node.js 6.0.0 or newer is required.** +Ignore any warnings about unmet peer dependencies - all of them are optional. Without voice support: `npm install discord.js --save` With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` +### Audio engines The preferred audio engine is node-opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose node-opus. Using opusscript is only recommended for development environments where node-opus is tough to get working. For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers. +### Optional packages +- [uws](https://www.npmjs.com/package/uws) for much a much faster WebSocket connection (`npm install uws --save`) +- [erlpack](https://github.com/hammerandchisel/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install hammerandchisel/erlpack --save`) + ## Web distributions Web builds of discord.js that are fully capable of running in browsers are available [here](https://github.com/hydrabolt/discord.js/tree/webpack). These are built by [Webpack 2](https://webpack.js.org/). The API is identical, but rather than using `require('discord.js')`,