<commit_before>'use strict';

var co = require('co');
var psn = require('../psn');
var md = require('../markdown');
var moment = require('moment-timezone');

function exec(cmd) {

    var msg = cmd.msg;
    var bot = cmd.bot;
    var name = cmd.args[0];
    var now = moment();
    var joinedAt = 'Unknown';

    // mentions take precedent
    if (msg.mentions.length > 0) {
        name = msg.mentions[0].username;
    } else {
        name = cmd.msg.author.username;
    }

    if (!name) {
        // should not get here..
        return bot.sendMessage(msg, "did you forget something?");
    }
<commit_msg>Fixed PSN lookup without mentions<commit_after>'use strict';

var co = require('co');
var psn = require('../psn');
var md = require('../markdown');
var moment = require('moment-timezone');

function exec(cmd) {

    var msg = cmd.msg;
    var bot = cmd.bot;
    var name = cmd.args[0];
    var now = moment();
    var joinedAt = 'Unknown';

    // mentions take precedent
    if (msg.mentions.length > 0) {
        name = msg.mentions[0].username;
    } else {
        name = cmd.args[0] || cmd.msg.author.username;
    }

    if (!name) {
        // should not get here..
        return bot.sendMessage(msg, "did you forget something?");
    }

{'fraction_non_alphanumeric': 0.1601593625498008, 'fraction_numerical': 0.005577689243027889, 'mean_word_length': 2.4130434782608696, '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': '6025745', 'n_tokens_mistral': 414, 'n_tokens_neox': 398, 'n_words': 113}