src/errors/DJSError.js
function makeDiscordjsError(Base) {
  return class DiscordjsError extends Base {
    constructor(key, ...args) {
      super(message(key, args));
      this[kCode] = key;
      if (Error.captureStackTrace) Error.captureStackTrace(this, DiscordjsError);
    }

    get name() {
      return `${super.name} [${this[kCode]}]`;
    }

    get code() {
      return this[kCode];
    }
  };
}
function makeDiscordjsError(Base) {
  return class DiscordjsError extends Base {
    constructor(key, ...args) {
      super(message(key, args));
      this[kCode] = key;
      if (Error.captureStackTrace) Error.captureStackTrace(this, DiscordjsError);
    }

    get name() {
      return `${super.name} [${this[kCode]}]`;
    }

    get code() {
      return this[kCode];
    }
  };
}
function makeDiscordjsError ( Base ) { return class DiscordjsError extends Base { constructor ( key , ... args ) { super ( message ( key , args ) ) ; this [ kCode ] = key ; if ( Error . captureStackTrace ) Error . captureStackTrace ( this , DiscordjsError ) ; } get name ( ) { return ` ${ super . name } ${ this [ kCode ] } ` ; } get code ( ) { return this [ kCode ] ; } } ; }
Extend an error of some sort into a DiscordjsError.
@param {Error} Base Base error to extend
@returns {DiscordjsError}
Extend an error of some sort into a DiscordjsError .