mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
Use node 8 error code (#1557)
This commit is contained in:
@@ -9,7 +9,7 @@ function fetch(Encoder, engineOptions) {
|
|||||||
try {
|
try {
|
||||||
return new Encoder(engineOptions);
|
return new Encoder(engineOptions);
|
||||||
} catch (err) {
|
} 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.
|
// The Opus engine exists, but another error occurred.
|
||||||
throw err;
|
throw err;
|
||||||
|
|||||||
Reference in New Issue
Block a user