mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Use node 8 error code (#1557)
This commit is contained in:
@@ -9,7 +9,7 @@ function fetch(Encoder, engineOptions) {
|
||||
try {
|
||||
return new Encoder(engineOptions);
|
||||
} catch (err) {
|
||||
if (err.message.includes('Cannot find module')) return null;
|
||||
if (err.code === 'MODULE_NOT_FOUND') return null;
|
||||
|
||||
// The Opus engine exists, but another error occurred.
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user