Troubleshooting¶
General¶
Occasionally, the API can stop working for whatever reason. If it was working previously and it stopped working on the same version, it means that either we screwed code up or there’s been a change to the Discord API. You can try asking around in the discord.js channel in the API server. You could also make an issue if one relating to a similar issue doesn’t exist. Please post a stacktrace if there is one, and be as detailed as possible - “the API isn’t working” doesn’t help at all.
If there is already an issue, feel free to comment that you’re also experiencing the same thing. This helps to see how widespread the bug is.
You can try reconnecting before submitting an issue, as sometimes some of the servers may be slightly different.
If you’re your bot or client is exiting unexpectedly with no error, this is likely caused by websocket disconnects. Make sure you have autoReconnect
enabled. See Client.
Voice¶
Often, especially if you’re on Windows, voice will not work out of the box. Follow the steps below, one by one.
- Is your system supported? The following are:
- Linux x64 & ia32
- Linux ARM (Raspberry Pi 1 & 2)
- Mac OS X x64
- Windows x64
- Did you install Python 2.7.x correctly? Is it in your PATH?
python -V
. If not, install it correctly or try reinstalling. - Windows - See https://python.org/downloads/
- Linux / Mac OS - Unix systems should already have it installed, but if not, use the OS’s package manager
- Did you install Python 2.7.x correctly? Is it in your PATH?
- Did you install FFMPEG correctly? Is it in your PATH?
ffmpeg -version
. If not, install it correctly or try reinstalling. - Windows - Follow this guide
- Linux / Mac OS - Use your OS’s package manager
- Did you install FFMPEG correctly? Is it in your PATH?
- Did you install the required C++ compiler tool for your OS? If not, install the corresponding program, then try reinstalling discord.js
npm i -S discord.js
- Windows - Visual Studio 2015 with C++ Support enabled
- Linux - build-essential
- Mac OS - Xcode CLI tools
- Did you install the required C++ compiler tool for your OS? If not, install the corresponding program, then try reinstalling discord.js
- If you’re still having problems try
npm cache clean
npm config set msvs_version 2015
npm i -S discord.js
If nothing of the above helped, feel free to jump on the discord.js channel in the API server