<commit_before>const Discord = require('discord.js')
var db = require('../dbAccess')

this.info = {
  aliases: [
    'Userinfo'
  ],
  helpInfo: {
    show: true,
    category: 'GENERAL',
    name: 'Template',
    usage: 'temp [template]',
    desc: 'Templates a template'
  }
}

this.Command = (data) => {
  if (data.args.length === 0) { // Self info
    db.getUserInfo(data.user.id, [onFind, data])
    return ''
  } else if (data.args.length === 1 && data.message.mentions.users.first()) { // If there is args and mentions
    db.getUserInfo(data.message.mentions.users.first().id, [onFind, data])
    return ''
  } else { // If na
    console.log(`[ERROR] ${data.user.username}#${data.user.discriminator} had an error running \`!info\``)
    return `Unknown Error! Did you mention a username?\n Please report this to the developer!`
  }
}

this.CreateRichEmbed = (userInfo, user) => {
  let constructedTownInfo = ''

  if (userInfo.name != '') { // Character Name
    constructedTownInfo += `**Character Name**: ${userInfo.name}\n`
  } else {
    constructedTownInfo += `**Character Name**: User hasn't set their Character Name!\n`
  }

  if (userInfo.town != '') { // Town Name
    constructedTownInfo += `**Town Name**: ${userInfo.town}\n`
  } else {
    constructedTownInfo += `**Town Name**: User hasn't set their Town Name!\n`
  }

  if (userInfo.fc != '') { // Friend Code
    constructedTownInfo += `**Friend Code**: \`${userInfo.fc}\`\n`
  } else {
    constructedTownInfo += `**Friend Code**: User hasn't set their Friend Code!\n`
  }

  if (userInfo.fruit != '') { // Fruits
    constructedTownInfo += `**Town Fruit**: ${userInfo.fruit}\n`
  } else {
    constructedTownInfo += `**Town Fruit**: User hasn't set their Town Fruit!\n`
  }

  if (userInfo.note != '') {
    constructedTownInfo += `**User Note**: ${userInfo.note}`
  } else {
    constructedTownInfo += `**User Note**: User didn't set any notes!`
  }

  return new Discord.RichEmbed()
  .setColor(`GREEN`)<commit_msg>Added device to !info<commit_after>const Discord = require('discord.js')
var db = require('../dbAccess')

this.info = {
  aliases: [
    'Userinfo'
  ],
  helpInfo: {
    show: true,
    category: 'GENERAL',
    name: 'Template',
    usage: 'temp [template]',
    desc: 'Templates a template'
  }
}

this.Command = (data) => {
  if (data.args.length === 0) { // Self info
    db.getUserInfo(data.user.id, [onFind, data])
    return ''
  } else if (data.args.length === 1 && data.message.mentions.users.first()) { // If there is args and mentions
    db.getUserInfo(data.message.mentions.users.first().id, [onFind, data])
    return ''
  } else { // If na
    console.log(`[ERROR] ${data.user.username}#${data.user.discriminator} had an error running \`!info\``)
    return `Unknown Error! Did you mention a username?\n Please report this to the developer!`
  }
}

this.CreateRichEmbed = (userInfo, user) => {
  let constructedTownInfo = ''

  if (userInfo.name != '') { // Character Name
    constructedTownInfo += `**Character Name**: ${userInfo.name}\n`
  } else {
    constructedTownInfo += `**Character Name**: User hasn't set their Character Name!\n`
  }

  if (userInfo.town != '') { // Town Name
    constructedTownInfo += `**Town Name**: ${userInfo.town}\n`
  } else {
    constructedTownInfo += `**Town Name**: User hasn't set their Town Name!\n`
  }

  if (userInfo.fc != '') { // Friend Code
    constructedTownInfo += `**Friend Code**: \`${userInfo.fc}\`\n`
  } else {
    constructedTownInfo += `**Friend Code**: User hasn't set their Friend Code!\n`
  }

  if (userInfo.fruit != '') { // Fruits
    constructedTownInfo += `**Town Fruit**: ${userInfo.fruit}\n`
  } else {
    constructedTownInfo += `**Town Fruit**: User hasn't set their Town Fruit!\n`
  }

  if (userInfo.device != '') { // Device
    constructedTownInfo += `**Device**: ${userInfo.device}\n`
  } else {
    constructedTownInfo += `**Device**: User hasn't set their device!\n`
  }

  if (userInfo.note != '') {
    constructedTownInfo += `**User Note**: ${userInfo.note}`
  } else {
    constructedTownInfo += `**User Note**: User didn't set any notes!`
  }

  return new Discord.RichEmbed()
  .setColor(`GREEN`)
{'fraction_non_alphanumeric': 0.18203535594839942, 'fraction_numerical': 0.0009555661729574773, 'mean_word_length': 3.325413223140496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2070728', 'n_tokens_mistral': 1423, 'n_tokens_neox': 1370, 'n_words': 352}