mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-16 11:28:18 +00:00
Errors Standardization (#1246)
* errors and stuff * more errors * all the errors * fix build
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
const { Error } = require('../../../errors');
|
||||
|
||||
const list = [
|
||||
require('./NodeOpusEngine'),
|
||||
require('./OpusScriptEngine'),
|
||||
@@ -30,5 +32,5 @@ exports.fetch = engineOptions => {
|
||||
|
||||
exports.guaranteeOpusEngine = () => {
|
||||
if (typeof opusEngineFound === 'undefined') opusEngineFound = Boolean(exports.fetch());
|
||||
if (!opusEngineFound) throw new Error('Couldn\'t find an Opus engine.');
|
||||
if (!opusEngineFound) throw new Error('OPUS_ENGINE_MISSING');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user