<commit_before>const cooldown = require('../functions/cooldown.js');
const config = require('../config/config.json');
const snekfetch = require('snekfetch');
exports.run = async(client, msg, args) => {
    if (cooldown(msg, 'love', 60, 'This command has a cooldown of **1 Minute**!')) {
        if (!args[0] || !args[1]) return msg.channel.send('I need two names to calculate the love!');
        if (args[2]) return msg.channel.send('Please only give me 2 names');
        let name1 = args[0];
        let name2 = args[1];
        name1 = name1.startsWith('<@') ? msg.mentions.users.first().username : name1;
        name2 = name2.startsWith('<@') ? msg.mentions.users[1].username : name2;
        let love = await snekfetch.get(`https://love-calculator.p.mashape.com/getPercentage?fname=${name1}&sname=${name2}`)
            .set("X-Mashape-Key", config.LOVEKEY)
            .set("Accept", "application/json");

        let loveName = love.body.fname;
        let loveName2 = love.body.sname;
        let lovePer = love.body.percentage;
        let loveText = love.body.result;
        let heart = lovePer > 50 ? ':heart: ' : ':broken_heart: ';
        msg.channel.send(heart + `${loveName} and ${loveName2} have a ${lovePer}% chance of falling in love!`)<commit_msg>Fixes<commit_after>const cooldown = require('../functions/cooldown.js');
const config = require('../config/config.json');
const snekfetch = require('snekfetch');
exports.run = async(client, msg, args) => {
        if (!args[0] || !args[1]) return msg.channel.send('I need two names to calculate the love!');
        if (args[2]) return msg.channel.send('Please only give me 2 names');
        if (cooldown(msg, 'love', 60, 'This command has a cooldown of **1 Minute**!')) {
        let name1 = args[0];
        let name2 = args[1];
        name1 = name1.startsWith('<@') ? msg.mentions.users.first().username : name1;
        name2 = name2.startsWith('<@') ? msg.mentions.users[1].username : name2;
        let love = await snekfetch.get(`https://love-calculator.p.mashape.com/getPercentage?fname=${name1}&sname=${name2}`)
            .set("X-Mashape-Key", config.LOVEKEY)
            .set("Accept", "application/json");

        let loveName = love.body.fname;
        let loveName2 = love.body.sname;
        let lovePer = love.body.percentage;
        let loveText = love.body.result;
        let heart = lovePer > 50 ? ':heart: ' : ':broken_heart: ';
        msg.channel.send(heart + `${loveName} and ${loveName2} have a ${lovePer}% chance of falling in love!`)
{'fraction_non_alphanumeric': 0.1712707182320442, 'fraction_numerical': 0.018942383583267563, 'mean_word_length': 3.108589951377634, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '7272132', 'n_tokens_mistral': 838, 'n_tokens_neox': 821, 'n_words': 195}