{"size": 1149, "ext": "js", "max_stars_repo_path": "commands/emojify.js", "max_stars_repo_name": "GlitchMasta47/MiniMe", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "commands/emojify.js", "max_issues_repo_name": "GlitchMasta47/MiniMe", "max_issues_repo_issues_event_min_datetime": "2019-03-05T18:21:34.000Z", "max_issues_repo_issues_event_max_datetime": "2019-03-05T18:21:34.000Z", "max_forks_repo_path": "commands/emojify.js", "max_forks_repo_name": "GlitchMasta47/MiniMe", "max_forks_repo_forks_event_min_datetime": "2019-01-20T21:19:33.000Z", "max_forks_repo_forks_event_max_datetime": "2019-01-20T21:19:33.000Z"}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 24.4468085106, "max_line_length": 125, "alphanum_fraction": 0.5691906005}
/* Eris Fixed */

const mapping = {
  ' ': '   ',
  '0': ':zero:',
  '1': ':one:',
  '2': ':two:',
  '3': ':three:',
  '4': ':four:',
  '5': ':five:',
  '6': ':six:',
  '7': ':seven:',
  '8': ':eight:',
  '9': ':nine:',
  '!': ':grey_exclamation:',
  '?': ':grey_question:',
  '#': ':hash:',
  '*': ':asterisk:'
}

'abcdefghijklmnopqrstuvwxyz'.split('').forEach(c => {
  mapping[c] = mapping[c.toUpperCase()] = ` :regional_indicator_${c}:`
})

exports.run = (client, message, args) => {
  try {
    if (args.length < 1) {
      message.channel.createMessage('You must provide some text to emojify!')
    }

    message.channel.createMessage(args.join(' ').split('').map(c => mapping[c] || c).join('')).catch(console.log)
  } catch (err) {
    message.channel.createMessage(`:exclamation: │ There was an error running the command. This incident has been reported.`)
    client.rollbar.error(`Error on emojify commands\n\nError:\n\n ${err}`)
  }
}

exports.help = {
  name: 'emojify',
  description: 'Says your text in big LETTERS.',
  usage: 'emojify <text>',
  fullDesc: 'Says your text in big LETTERS.',
  type: 'fun',
  status: 2,
  aliases: []
}
