<commit_before>const translate = require('google-translate-api');

exports.run = async function (msg, args) {
    if (!args[0] || !args[1])
        return msg.edit('Missing required argument(s).');
    const res = await translate(args.slice(2).join(' '), { from: args[0], to: args[1] });
    msg.channel.send({ embed: {
        color: settings.embedColor,
        fields: [
            { name: `Input (${args[0].toLowerCase() === 'auto' ? res.from.language.iso : args[0]})`, value: args.slice(2).join(' ') },
            { name: `Output (${args[1]})`, value: res.text }
        ]
    } });
};

exports.props = {
    name        : 'translate',
    usage       : '{command} <source language | auto> <target language> <text>',
    aliases     : ['ts'],
    description : 'Translates text from one language to the other. Will auto detect source language if you specify `auto` as the source language.'
};<commit_msg>This makes more sense<commit_after>const translate = require('google-translate-api');

exports.run = async function (msg, args) {
    if (!args[2])
        return msg.edit('Missing required arguments.');
    const res = await translate(args.slice(2).join(' '), { from: args[0], to: args[1] });
    msg.channel.send({ embed: {
        color: settings.embedColor,
        fields: [
            { name: `Input (${args[0].toLowerCase() === 'auto' ? res.from.language.iso : args[0]})`, value: args.slice(2).join(' ') },
            { name: `Output (${args[1]})`, value: res.text }
        ]
    } });
};

exports.props = {
    name        : 'translate',
    usage       : '{command} <source language | auto> <target language> <text>',
    aliases     : ['ts'],
    description : 'Translates text from one language to the other. Will auto detect source language if you specify `auto` as the source language.'
};
{'fraction_non_alphanumeric': 0.17676211453744495, 'fraction_numerical': 0.009361233480176211, 'mean_word_length': 2.8991416309012874, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '471448', 'n_tokens_mistral': 541, 'n_tokens_neox': 547, 'n_words': 154}