From e6607e803b038a1690d6815574815f5e2f7d2cab Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 16 Jan 2020 11:22:31 +0000 Subject: [PATCH 1/3] Update voice sections to use @discordjs/opus --- guide/additional-info/changes-in-v12.md | 2 +- guide/popular-topics/miscellaneous-examples.md | 2 +- guide/voice/README.md | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/guide/additional-info/changes-in-v12.md b/guide/additional-info/changes-in-v12.md index d719a46bc..ffc5d4399 100644 --- a/guide/additional-info/changes-in-v12.md +++ b/guide/additional-info/changes-in-v12.md @@ -6,7 +6,7 @@ After a long time in development, Discord.js v12 is nearing a stable release, me v12 requires Node 10.2.x or higher to use, so make sure you're up-to-date. To check your Node version, use `node -v` in your terminal or command prompt, and if it's not high enough, update it! There are many resources online to help you get up-to-date. -For now, you do need Git installed and added to your PATH environment, so ensure that's done as well - again, guides are available online for a wide variety of operating systems. Once you have Node up-to-date and Git installed, you can install v12 by running `npm install discordjs/discord.js` in your terminal or command prompt for text-only use, or `npm install discordjs/discord.js node-opus` for voice support. +For now, you do need Git installed and added to your PATH environment, so ensure that's done as well - again, guides are available online for a wide variety of operating systems. Once you have Node up-to-date and Git installed, you can install v12 by running `npm install discordjs/discord.js` in your terminal or command prompt for text-only use, or `npm install discordjs/discord.js @discordjs/opus` for voice support. ## Commonly Used Methods That Changed diff --git a/guide/popular-topics/miscellaneous-examples.md b/guide/popular-topics/miscellaneous-examples.md index 5004dde61..6ffdeaef1 100644 --- a/guide/popular-topics/miscellaneous-examples.md +++ b/guide/popular-topics/miscellaneous-examples.md @@ -17,7 +17,7 @@ npm install --save ytdl-core If you get an error that says 'OPUS_ENGINE_MISSING', you'll need to install one of the opus packages discord.js recommends. ``` -npm install --save node-opus +npm install --save @discordjs/opus ``` If you get an error that says 'FFMPEG not found', this can be resolved by installing ffmpeg. diff --git a/guide/voice/README.md b/guide/voice/README.md index a0e365e00..ad441db3e 100644 --- a/guide/voice/README.md +++ b/guide/voice/README.md @@ -24,7 +24,8 @@ async function play(voiceChannel) { At the bare minimum, you'll need: - An Opus library: - - [`node-opus`](https://github.com/Rantanen/node-opus/) (best performance) + - [`@discordjs/opus`](https://github.com/discordjs/opus) (best performance) + - [`node-opus`](https://github.com/Rantanen/node-opus/) - [`opusscript`](https://github.com/abalabahaha/opusscript/) You may also choose to install the following dependencies. From 1ac7461fe8b81f3197679e4ec025d8f1be6912f4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 16 Jan 2020 11:32:26 +0000 Subject: [PATCH 2/3] Update another reference to node-opus --- guide/voice/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/voice/README.md b/guide/voice/README.md index ad441db3e..29c7a0391 100644 --- a/guide/voice/README.md +++ b/guide/voice/README.md @@ -39,7 +39,7 @@ You may also choose to install the following dependencies. - [`libsodium-wrappers`](https://www.npmjs.com/package/libsodium-wrappers) ::: tip -Outside a development environment, it is recommended for you to use `node-opus` and `sodium` to improve performance and improve the stability of audio playback! +Outside a development environment, it is recommended for you to use `@discordjs/opus` and `sodium` to improve performance and improve the stability of audio playback! If you're struggling to install these dependencies, make sure you have build tools installed first. On Windows, this is as easy as running `npm install --global --production --vs2015 --add-python-to-path windows-build-tools`! ::: From 031da70e0014eb30da66f47c1ef28d618697bb43 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 16 Jan 2020 11:53:57 +0000 Subject: [PATCH 3/3] Use ffmpeg-static, not ffmpeg-binaries --- guide/popular-topics/miscellaneous-examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/popular-topics/miscellaneous-examples.md b/guide/popular-topics/miscellaneous-examples.md index 6ffdeaef1..9fea9c8d5 100644 --- a/guide/popular-topics/miscellaneous-examples.md +++ b/guide/popular-topics/miscellaneous-examples.md @@ -31,7 +31,7 @@ sudo apt-get install ffmpeg On Windows: ``` -npm install ffmpeg-binaries --save +npm install ffmpeg-static --save ``` Additionally, there have been reports that playing audio in this way from the Ubuntu subsystem offered by Windows 10 does not work.