<commit_before>/*
 * choose.js - Make the bot choose your stupid life decisions.
 *
 * Contributed by Capuccino and Ovyerus
 */

exports.commands = [
    'choose'
];

exports.choose = {
    desc: "Randomly chooses between 2 or more arguments seperated with a '/'.",
    fullDesc: 'Uses a randomiser to pick a random value out of 2 or more given arguments. Arguments must be seperated by a /',
    usage: '<choices (minimum of two)>',
    example: 'coke zero/coke',
    main(bot, ctx) {
        return new Promise((resolve, reject) => {
            let choices = ctx.suffix.split('/');
            if (choices.length < 2) {
                ctx.msg.channel.createMessage(localeManager.t('choose-insufficientArgs', ctx.settings.locale)).then(resolve).catch(reject);
            } else {
                var choice = choices[Math.floor(Math.random() * choices.length)];
                ctx.msg.channel.createMessage(localeManager.t('choose', ctx.settings.locale, {name: ctx.msg.author.username, choice})).then(resolve).catch(reject);
            }
        });
    }
};<commit_msg>naturalized choose<commit_after>/*
 * choose.js - Make the bot choose your stupid life decisions.
 *
 * Contributed by Capuccino and Ovyerus
 */

exports.commands = [
    'choose'
];

exports.choose = {
    desc: "Randomly chooses between 2 or more arguments seperated with a '/'.",
    fullDesc: 'Uses a randomiser to pick a random value out of 2 or more given arguments. Arguments must be seperated by a /',
    usage: '<choices (minimum of two)>',
    example: 'coke zero/coke',
    main(bot, ctx) {
        return new Promise((resolve, reject) => {
            let choices = ctx.suffix.split(' or ');
            if (choices.length < 2) {
                ctx.msg.channel.createMessage(localeManager.t('choose-insufficientArgs', ctx.settings.locale)).then(resolve).catch(reject);
            } else {
                var choice = choices[Math.floor(Math.random() * choices.length)];
                ctx.msg.channel.createMessage(localeManager.t('choose', ctx.settings.locale, {name: ctx.msg.author.username, choice})).then(resolve).catch(reject);
            }
        });
    }
};
{'fraction_non_alphanumeric': 0.1337962962962963, 'fraction_numerical': 0.002777777777777778, 'mean_word_length': 2.66893039049236, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2630498', 'n_tokens_mistral': 645, 'n_tokens_neox': 618, 'n_words': 168}