mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
* Add internal support for @discordjs/opus * Remove redundant try/catch * fix: use setBitrate method in @discordjs/opus * chore: tidy up opus imports * fix: correct imports for DiscordJsOpusEngine * chore: update docs to prefer @discordjs/opus * chore: bump prism-media to 0.0.4 to allow ffmpeg-static
24 lines
1.3 KiB
Markdown
24 lines
1.3 KiB
Markdown
# Frequently Asked Questions
|
|
These are just questions that get asked frequently, that usually have a common resolution.
|
|
If you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).
|
|
Always make sure to read the documentation.
|
|
|
|
## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽
|
|
Update to Node.js 6.0.0 or newer.
|
|
|
|
## How do I get voice working?
|
|
- Install FFMPEG.
|
|
- 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`
|
|
- **Ubuntu 16.04:** `sudo apt install ffmpeg`
|
|
- **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 @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 @discordjs/opus` in your bot's directory should successfully build it. Woo!
|