diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 9f84b1073..fd6de7242 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -11,7 +11,7 @@ To get ready to work on the codebase, please do the following: 1. Fork & clone the repository, and make sure you're on the **master** branch 2. Run `npm install` -3. If you're working on voice, also run `npm install node-opus` or `npm install opusscript` +3. If you're working on voice, also run `npm install @discordjs/opus` or `npm install opusscript` 4. Code your heart out! 5. Run `npm test` to run ESLint and ensure any JSDoc changes are valid 6. [Submit a pull request](https://github.com/discordjs/discord.js/compare) diff --git a/README.md b/README.md index 2003f60d5..3ec09092d 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to Ignore any warnings about unmet peer dependencies, as they're all optional. Without voice support: `npm install discordjs/discord.js` -With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discordjs/discord.js node-opus` +With voice support ([@discordjs/opus](https://www.npmjs.com/package/@discordjs/opus)): `npm install discordjs/discord.js @discordjs/opus` With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discordjs/discord.js opusscript` ### 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. +The preferred audio engine is @discordjs/opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose @discordjs/opus. +Using opusscript is only recommended for development environments where @discordjs/opus is tough to get working. +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`) diff --git a/docs/general/faq.md b/docs/general/faq.md index c4ce363d8..d57060dba 100644 --- a/docs/general/faq.md +++ b/docs/general/faq.md @@ -7,8 +7,8 @@ Update to Node.js 10.0.0 or newer. ## How do I get voice working? - Install FFMPEG. -- Install either the `node-opus` package or the `opusscript` package. - node-opus is greatly preferred, due to it having significantly better performance. +- Install either the `@discordjs/opus` package or the `opusscript` package. + @discordjs/opus is greatly preferred, due to it having significantly better performance. ## How do I install FFMPEG? - **npm:** `npm install ffmpeg-binaries` @@ -16,10 +16,10 @@ Update to Node.js 10.0.0 or newer. - **Ubuntu 14.04:** `sudo apt-get install libav-tools` - **Windows:** `npm install ffmpeg-binaries` or see the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg). -## How do I set up node-opus? -- **Ubuntu:** Simply run `npm install node-opus`, and it's done. Congrats! +## How do I set up @discordjs/opus? +- **Ubuntu:** Simply run `npm install @discordjs/opus`, and it's done. Congrats! - **Windows:** Run `npm install --global --production windows-build-tools` in an admin command prompt or PowerShell. - Then, running `npm install node-opus` in your bot's directory should successfully build it. Woo! + Then, running `npm install @discordjs/opus` in your bot's directory should successfully build it. Woo! Other questions can be found at the [official Discord.js guide](https://discordjs.guide/popular-topics/common-questions.html) If you have issues not listed here or on the guide, feel free to ask in the [official Discord.js server](https://discord.gg/bRCvFy9). diff --git a/docs/general/welcome.md b/docs/general/welcome.md index 52cb3135f..936c01a48 100644 --- a/docs/general/welcome.md +++ b/docs/general/welcome.md @@ -37,13 +37,13 @@ discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to Ignore any warnings about unmet peer dependencies, as they're all optional. Without voice support: `npm install discordjs/discord.js` -With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discordjs/discord.js node-opus` +With voice support ([@discordjs/opus](https://www.npmjs.com/package/@discordjs/opus)): `npm install discordjs/discord.js @discordjs/opus` With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discordjs/discord.js opusscript` ### 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. +The preferred audio engine is @discordjs/opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose @discordjs/opus. +Using opusscript is only recommended for development environments where @discordjs/opus is tough to get working. +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`) diff --git a/docs/topics/voice.md b/docs/topics/voice.md index cf336eb57..a716d3e7b 100644 --- a/docs/topics/voice.md +++ b/docs/topics/voice.md @@ -6,13 +6,13 @@ In discord.js, you can use voice by connecting to a `VoiceChannel` to obtain a ` To get started, make sure you have: * FFmpeg - `npm install ffmpeg-static` * an opus encoder, choose one from below: - * `npm install node-opus` (better performance) + * `npm install @discordjs/opus` (better performance) * `npm install opusscript` * a good network connection -The preferred opus 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. +The preferred opus engine is @discordjs/opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose @discordjs/opus. +Using opusscript is only recommended for development environments where @discordjs/opus is tough to get working. +For production bots, using @discordjs/opus should be considered a necessity, especially if they're going to be running on multiple servers. ## Joining a voice channel The example below reacts to a message and joins the sender's voice channel, catching any errors. This is important diff --git a/package.json b/package.json index a52ade25f..230ec4709 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "node": ">=10.2.0" }, "browser": { + "@discordjs/opus": false, "https": false, "ws": false, "erlpack": false,