Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update voice sections to use @discordjs/opus #315

Merged
merged 3 commits into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion guide/additional-info/changes-in-v12.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions guide/popular-topics/miscellaneous-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions guide/voice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -38,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`!
:::
Expand Down