Troubleshooting Common Issues
Troubleshooting common issues and errors
Cannot find mediaplex
or opusscript
or @discordjs/opus
or node-opus
To resolve this issue, you need to install the opus encoder. Use one of the following commands based on your preference:
FFmpeg/Avconv not found
Ensure that you have either FFmpeg
or Avconv
available on your system.
Installing FFmpeg or Avconv
We do not recommend using static binaries like ffmpeg-static
as they are not always up-to-date or stable and may
cause issues.
You have several options to get FFmpeg:
- Download it from the official FFmpeg website: www.ffmpeg.org/download.html
- Use the Node Module (ffmpeg-static): npmjs.com/package/ffmpeg-static (Note: Using static binaries like
ffmpeg-static
is not recommended) - You can dockerize your bot with a Node environment (Example : 18.16.0-bullseye) that can have ffmpeg installed. Check Showcase for sample implementations.
- Alternatively, if you prefer using Avconv instead of FFmpeg, install it on your system or place the Avconv executable at the root of your project.
Audio player stops immediately without errors
This issue is most likely caused by the usage of static binaries like ffmpeg-static
. We do not recommend using static binaries as they are not always up-to-date or stable and may cause issues. To fix this issue, make sure to install FFmpeg or Avconv on your system.
Audio player stops after about 30 seconds to 1 minute without errors
This issue is most likely caused by outdated version of discord-voip
. Make sure you are using the latest version of discord-voip
and discord-player
.
"Something" is not working
If you encounter issues and something isn't functioning correctly, try attaching a debug
listener to player.events
to check for any unusual behavior:
If you receive errors such as "something is not a constructor" or "version.split is not a function" or similar, follow these steps:
- If you are using
npm
, removenode_modules
,package-lock.json
, or any lockfiles you have. Then, runnpm cache clean --force
, or use a similar command for your package manager, and finally runnpm install
(or the install command of your package manager). - If the above step does not resolve the issue, consider using another package manager like
yarn
,pnpm
, orbun
.
If you are still unable to resolve the problem, don't hesitate to seek assistance from our official support server.