Sometimes we can't be sure the bot have the required permissions for a specific voice-channel, and it leaves a generic error message for the user.
The bot actually need 2 permissions (CONNECT, SPEAK) from the user voice-channel (message.member.voiceChannel). We can check if the bot doesn't have one of these permissions (message.member.voiceChannel.permissions.has(...)) and throw a less generic error message.
Actually when the discord-bot is making API requests it uses a JWT, which lasts for 1 hour. The bot is meant to be runned continually without interruption, this is where we need to revoke a JWT otherwise the bot won't be able to update data (i.e. a guild prefix).
There is an interval already setup which runs every 30 minutes to generate a new JWT, but instead we should use Axios's interceptors on a 401 failed response since it's the proper way to do it.
We should not pass any options when casually using the HTTP service. It should have better defaults such as Content-Type: application/json or automatically retrieve JWT (see #25).
This version is covered by your current version range and after updating it in your project the build failed.
lerna is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
Native promises are known to be slower (because they are not written in C, but instead in JS) and doesn't provide a lot of features.
Bluebird is a must have for any Node back-end, it is much more faster and use less memory. It has also cool features like promisify callbacks functions and built-in warnings and full stack traces (!).
When the bot already have queued tracks, if you try to add a track and it fails (returns an empty array of tracks or an error) the bot will leave the channel while speaking and having tracks queued.
When playing YouTube videos, the bot randomly don't play entirely YouTube videos. It doesn't have any problem when using other providers such as Soundcloud.
The issue is most probably related to the node-ytdl-core library since that's what we are using internally for video metadata & audio fetch/buffer.