From a2520efa1a3b971126f0ef0b3008de1e4289dae4 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Thu, 1 Jun 2017 14:14:42 -0500 Subject: [PATCH] Use node 8 error code (#1557) --- src/client/voice/opus/OpusEngineList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/voice/opus/OpusEngineList.js b/src/client/voice/opus/OpusEngineList.js index 3b69cdaeb..152481745 100644 --- a/src/client/voice/opus/OpusEngineList.js +++ b/src/client/voice/opus/OpusEngineList.js @@ -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;