mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
Use node 8 error code (#1557)
This commit is contained in:
parent
37d6624ef1
commit
a2520efa1a
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue