<commit_before>const Discord = require('discord.js')
const loadCommand = (command) => require(`../${command}`)
const config = require('../../config.json')
const commandList = require('../../util/commandList.json')
const channelTracker = require('../../util/channelTracker.js')

module.exports = function (bot, message, isCallingCmd, command, callback) {
  if (commandList[command] != null) var commandFile = commandList[command].file
  var rssList = []
  var maxFeedsAllowed = (!config.feedSettings.maxFeeds || isNaN(parseInt(config.feedSettings.maxFeeds))) ? 'Unlimited' : config.feedSettings.maxFeedsAllowed
  maxFeedsAllowed = (config.feedSettings.maxFeedsAllowed == 0) ? 'Unlimited' : config.feedSettings.maxFeedsAllowed

  try {rssList = require(`../../sources/${message.guild.id}.json`).sources} catch(e) {}

  var embedMsg = new Discord.RichEmbed().setColor(config.botSettings.menuColor)

  function isCurrentChannel(channel) {
    if (isNaN(parseInt(channel,10))) {
      if (message.channel.name == channel) return true;
      else return false;
    }
    else {
      if (message.channel.id == channel) return true;
      else return false;
    }
  }

  function getChannel(channel) {
    if (isNaN(parseInt(channel,10)) && bot.channels.find("name", channel) != null) return `${bot.channels.find("name", channel).name}`;
    else if (bot.channels.get(channel) != null) return bot.channels.get(channel).name;
    else return undefined;
  }

  var currentRSSList = [];
  for (var rssIndex in rssList){
    if (isCallingCmd && isCurrentChannel(rssList[rssIndex].channel)) currentRSSList.push( [rssList[rssIndex].link, rssIndex, rssList[rssIndex].title] );
    else if (!isCallingCmd) currentRSSList.push( [rssList[rssIndex].link, rssIndex, rssList[rssIndex].title, getChannel(rssList[rssIndex].channel)] )<commit_msg>fixed typo<commit_after>const Discord = require('discord.js')
const loadCommand = (command) => require(`../${command}`)
const config = require('../../config.json')
const commandList = require('../../util/commandList.json')
const channelTracker = require('../../util/channelTracker.js')

module.exports = function (bot, message, isCallingCmd, command, callback) {
  if (commandList[command] != null) var commandFile = commandList[command].file
  var rssList = []
  var maxFeedsAllowed = (!config.feedSettings.maxFeeds || isNaN(parseInt(config.feedSettings.maxFeeds))) ? 'Unlimited' : (config.feedSettings.maxFeeds == 0) ? 'Unlimited' : config.feedSettings.maxFeeds

  try {rssList = require(`../../sources/${message.guild.id}.json`).sources} catch(e) {}

  var embedMsg = new Discord.RichEmbed().setColor(config.botSettings.menuColor)

  function isCurrentChannel(channel) {
    if (isNaN(parseInt(channel,10))) {
      if (message.channel.name == channel) return true;
      else return false;
    }
    else {
      if (message.channel.id == channel) return true;
      else return false;
    }
  }

  function getChannel(channel) {
    if (isNaN(parseInt(channel,10)) && bot.channels.find("name", channel) != null) return `${bot.channels.find("name", channel).name}`;
    else if (bot.channels.get(channel) != null) return bot.channels.get(channel).name;
    else return undefined;
  }

  var currentRSSList = [];
  for (var rssIndex in rssList){
    if (isCallingCmd && isCurrentChannel(rssList[rssIndex].channel)) currentRSSList.push( [rssList[rssIndex].link, rssIndex, rssList[rssIndex].title] );
    else if (!isCallingCmd) currentRSSList.push( [rssList[rssIndex].link, rssIndex, rssList[rssIndex].title, getChannel(rssList[rssIndex].channel)] )
{'fraction_non_alphanumeric': 0.1586013986013986, 'fraction_numerical': 0.002797202797202797, 'mean_word_length': 4.667194928684627, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7361736', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1108, 'n_words': 223}