text: "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  const DJSPoster_1 = __importDefault(require("./structs/DJSPoster"));
  const ErisPoster_1 = __importDefault(require("./structs/ErisPoster"));
  const DJSSharderPoster_1 = __importDefault(require("./structs/DJSSharderPoster"));
  const RosePoster_1 = __importDefault(require("./structs/RosePoster"));
  /**
   * Create an AutoPoster
   * @param token Top.gg Token
   * @param client Your Discord.js/Eris Client or Discord.js ShardingManager
   * @param options Options
   * @example
   * const AutoPoster = require('topgg-autoposter')
   *
   * AutoPoster('topggtoken', client) // that's it!
   */
  function AutoPoster(token, client, options) {
      if (!token)
          throw new Error('Top.gg token is missing');
      if (!client)
          throw new Error('Client is missing');
      let DiscordJS;
      try {
          DiscordJS = require.cache[require.resolve('discord.js')];
      }
      catch (err) { }
      let Eris;
      try {
          Eris = require.cache[require.resolve('eris')];
      }
      catch (err) { }
      let DR;
      try {
          DR = require.cache[require.resolve('discord-rose')];
      }
      catch (err) { }
      if (DiscordJS && client instanceof DiscordJS.exports.Client)
          return new DJSPoster_1.default(token, client, options);
      if (Eris && client instanceof Eris.exports.Client)
          return new ErisPoster_1.default(token, client, options);
      if (DiscordJS && client instanceof DiscordJS.exports.ShardingManager)
          return new DJSSharderPoster_1.default(token, client, options);
      if (DR && client instanceof DR.exports.Master)
          return new RosePoster_1.default(token, client, options);
      throw new Error('Unsupported client');
  }
  AutoPoster.DJSPoster = DJSPoster_1.default;
  AutoPoster.ErisPoster = ErisPoster_1.default;
  AutoPoster.DJSSharderPost = DJSSharderPoster_1.default;
  AutoPoster.RosePoster = RosePoster_1.default;
  exports.default = AutoPoster;
  