<commit_before>// Dependencies
var Promise = require('bluebird');
var parser = require('whacko');

// Includes
var http = require('./util/http.js').func;
var getRoles = require('./util/getRoles.js').func;
var getRole = require('./util/getRole.js').func;
var promise = require('./util/promise.js');
var getVerificationInputs = require('./util/getVerificationInputs.js').func;
var settings = require('../settings.json').getPlayers;

// Args
exports.required = ['group', 'rank'];
exports.optional = ['limit', 'online'];

// Define
var interval = settings.interval; // Players for every set of requests
var delay = settings.delay; // Time (in milliseconds) to wait after every interval
var debug = true; // Prints out information about what the function is doing, good for status updates or debugging

// Because of the complexity of this function, it's easier to have shared variables initiated every time a call is made.
exports.func = function (args) {
  var players = {};
  var added = 0;
  var scanned = 0;
  var rank;
  var limit;
  var online;
  var group;
  var post;
  var pages;
  var total;
  var httpOpt;

  function addPlayer (name, id) {
    if (!players[name]) {
      added++;
      players[name] = id;
    }<commit_msg>Rank should be optional<commit_after>// Dependencies
var Promise = require('bluebird');
var parser = require('whacko');

// Includes
var http = require('./util/http.js').func;
var getRoles = require('./util/getRoles.js').func;
var getRole = require('./util/getRole.js').func;
var promise = require('./util/promise.js');
var getVerificationInputs = require('./util/getVerificationInputs.js').func;
var settings = require('../settings.json').getPlayers;

// Args
exports.required = ['group'];
exports.optional = ['rank', 'limit', 'online'];

// Define
var interval = settings.interval; // Players for every set of requests
var delay = settings.delay; // Time (in milliseconds) to wait after every interval
var debug = true; // Prints out information about what the function is doing, good for status updates or debugging

// Because of the complexity of this function, it's easier to have shared variables initiated every time a call is made.
exports.func = function (args) {
  var players = {};
  var added = 0;
  var scanned = 0;
  var rank;
  var limit;
  var online;
  var group;
  var post;
  var pages;
  var total;
  var httpOpt;

  function addPlayer (name, id) {
    if (!players[name]) {
      added++;
      players[name] = id;
    }
{'fraction_non_alphanumeric': 0.13662085691188358, 'fraction_numerical': 0.0016168148746968471, 'mean_word_length': 3.7596153846153846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7274173', 'n_tokens_mistral': 726, 'n_tokens_neox': 714, 'n_words': 261}