/**
 * Generates a Ghastly client given a Discord.js client.
 * @param {Function} discordClient - The Discord.js client constructor which acts as the base for the returned client.
 * @param {Object} [clientOptions={}] - Options to specify configuration upon creation of the client.
 * @returns {Ghastly} The Ghastly client.
 */
export default (discordClient, clientOptions = {}) => (
  new (class extends discordClient {
    /**
     * Constructor.
     * @param {Object} [options={}] - Options to configure the client.
     */
    constructor(options = {}) {
      const { ...discordOptions } = options;
      super(discordOptions);
    }

    addCommand(command) {
      return this;
    }
  })(clientOptions)
);

import CommandRegistry from '../command/CommandRegistry';

/**
 * Generates a Ghastly client constructor given a Discord.js client.
 * @param {Function} client - The Discord.js client constructor which acts as
 *   the base for the returned client.
 * @returns {Function} The Ghastly client constructor.
 */
export default client => (
  /**
   * @classdesc The Ghastly client class.
   */
  class Ghastly extends client {
    /**
     * Constructor.
     * @param {Object} [options={}] - Options to configure the client.
     */
    constructor(options = {}) {
      super(options);

      /**
       * The command registry for the client.
       * @type {CommandRegistry}
       */
      this.registry = new CommandRegistry();
    }
  }
);

Change make() to return a class.