code: public JDABuilder useSharding(int shardId, int shardTotal)
      {
          AccountTypeException.check(accountType, AccountType.BOT);
          Checks.notNegative(shardId, "Shard ID");
          Checks.positive(shardTotal, "Shard Total");
          Checks.check(shardId < shardTotal,
              "The shard ID must be lower than the shardTotal! Shard IDs are 0-based.");
          shardInfo = new JDA.ShardInfo(shardId, shardTotal);
          return this;
      }
docs: This will enable sharding mode for JDA.
  <br>In sharding mode, guilds are split up and assigned one of multiple shards (clients).
  <br>The shardId that receives all stuff related to given bot is calculated as follows: shardId == (guildId {@literal >>} 22) % shardTotal;
  <br><b>PMs are only sent to shard 0.</b>
  
  <p>Please note, that a shard will not know about guilds which are not assigned to it.
  
  <p><b>It is not possible to use sharding with an account for {@link net.dv8tion.jda.core.AccountType#CLIENT AccountType.CLIENT}!</b>
  
  @param  shardId
  The id of this shard (starting at 0).
  @param  shardTotal
  The number of overall shards.
  
  @throws net.dv8tion.jda.core.exceptions.AccountTypeException
  If this is used on a JDABuilder for {@link net.dv8tion.jda.core.AccountType#CLIENT AccountType.CLIENT}
  @throws java.lang.IllegalArgumentException
  If the provided shard configuration is invalid
  ({@code 0 <= shardId < shardTotal} with {@code shardTotal > 0})
  
  @return The JDABuilder instance. Useful for chaining.
  
  @see    net.dv8tion.jda.core.JDA#getShardInfo() JDA.getShardInfo()
  @see    net.dv8tion.jda.bot.sharding.ShardManager ShardManager