<commit_before>exports.names = ['mute', 'unmute'];
exports.hidden = true;
exports.enabled = true;
exports.matchStart = true;
exports.cdAll = 10;
exports.cdUser = 10;
exports.cdStaff = 10;
exports.minRole = PERMISSIONS.RDJ_PLUS;
exports.handler = function (data) {

    var input = data.message.split(' ');

    var command = _.first(input);
    var username = _.rest(input, 1);
    var usernameFormatted = S(username).chompLeft('@').s;

    var user = findUserInList(bot.getUsers(), usernameFormatted);
    if (user !== undefined) {
        if (command == 'unmute') {
            bot.moderateUnmuteUser(user.id);
            console.log('[UNMUTE]', data.from.username + ' unmuted ' + usernameFormatted);
            sendChat('/me ' + usernameFormatted + ' is now unmuted.');
        } else {
            // @TODO - Make this variable
            var mute_duration = PlugAPI.MUTE.LONG;

            bot.moderateMuteUser(user.id, 1, mute_duration);
            console.log('[MUTE]', data.from.username + ' muted ' + usernameFormatted + ' for ' + mute_duration + ' minutes.');
        }
    }

};
<commit_msg>Fixes to mute, updates to cooldown timers<commit_after>exports.names = ['mute', 'unmute'];
exports.hidden = true;
exports.enabled = true;
exports.matchStart = true;
exports.cdAll = 10;
exports.cdUser = 10;
exports.cdStaff = 10;
exports.minRole = PERMISSIONS.RDJ_PLUS;
exports.handler = function (data) {

    var input = data.message.split(' ');

    var command = _.first(input);
    var username = _.rest(input, 1);
    var usernameFormatted = S(username).chompLeft('@').s;

    var user = findUserInList(bot.getUsers(), usernameFormatted);
    if (user !== undefined) {
        if (command == 'unmute') {
            bot.moderateUnmuteUser(user.id);
            console.log('[UNMUTE]', data.from.username + ' unmuted ' + usernameFormatted);
            bot.sendChat('/me ' + usernameFormatted + ' is now unmuted.');
        } else {
            // @TODO - Make this variable
            var mute_duration = PlugAPI.MUTE.LONG;

            bot.moderateMuteUser(user.id, 1, mute_duration);
            console.log('[MUTE]', data.from.username + ' muted ' + usernameFormatted + ' for ' + mute_duration + ' minutes.');
        }
    }

};

{'fraction_non_alphanumeric': 0.14884135472370766, 'fraction_numerical': 0.0071301247771836, 'mean_word_length': 2.7794612794612794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1627392', 'n_tokens_mistral': 747, 'n_tokens_neox': 701, 'n_words': 148}