<commit_before>exports.names = ['.lastseen', '.seen', '!lastseen', '!seen'];
exports.hidden = false;
exports.enabled = true;
exports.matchStart = true;
exports.cd_all = 5;
exports.cd_user = 10;
exports.cd_manager = 5;
exports.handler = function (data) {
    if (data.from.role > 1) {
        var params = _.rest(data.message.split(' '), 1);
        if (params.length < 1) {
            bot.sendChat('/me usage: .lastseen username');
            return;
        }

        logger.info('"' + get_param_username(data.message) + '"');

        username = params.join(' ');
        logger.info('"' + username + '"');
        logger.info(params);
        logger.info(S(username));
        logger.info(S(username).chompLeft('@'));
        logger.info(S(username).chompLeft('@').s);
        usernameFormatted = S(username).chompLeft('@').s;

        user = _.findWhere(bot.getUsers(), {username: usernameFormatted});
        if (user) {
            bot.sendChat(usernameFormatted + ' is in the room!');
        } else {
            User.find({where: {username: usernameFormatted}}).on('success', function (row) {
                if (row === null) {
                    bot.sendChat(usernameFormatted + ' was not found.');
                } else {
                    bot.sendChat(row.username + ' was last seen ' + timeSince(row.last_seen) + '.');
                }
            });
        }
    }
};<commit_msg>Switched out bot.sendChat to modMessage!<commit_after>exports.names = ['.lastseen', '.seen', '!lastseen', '!seen'];
exports.hidden = false;
exports.enabled = true;
exports.matchStart = true;
exports.cd_all = 5;
exports.cd_user = 10;
exports.cd_manager = 5;
exports.handler = function (data) {
    if (data.from.role > 1) {
        var params = _.rest(data.message.split(' '), 1);
        if (params.length < 1) {
            bot.sendChat('/me usage: .lastseen username');
            return;
        }

        logger.info('"' + get_param_username(data.message) + '"');

        username = params.join(' ');
        logger.info('"' + username + '"');
        logger.info(params);
        logger.info(S(username));
        logger.info(S(username).chompLeft('@'));
        logger.info(S(username).chompLeft('@').s);
        usernameFormatted = S(username).chompLeft('@').s;

        user = _.findWhere(bot.getUsers(), {username: usernameFormatted});
        if (user) {
            modMessage(data, usernameFormatted + ' is in the room!');
        } else {
            User.find({where: {username: usernameFormatted}}).on('success', function (row) {
                if (row === null) {
                    modMessage(data, usernameFormatted + ' was not found.');
                } else {
                    modMessage(data, row.username + ' was last seen ' + timeSince(row.last_seen) + '.');
                }
            });
        }
    }
};
{'fraction_non_alphanumeric': 0.17070600632244468, 'fraction_numerical': 0.004917456972251493, 'mean_word_length': 2.1644444444444444, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6159499', 'n_tokens_mistral': 871, 'n_tokens_neox': 840, 'n_words': 161}