<commit_before>/* marry.js - Marry your imaginary waifu or someone
 * 
 * 
 *  Contributed by Capuccino
 */

exports.commands = [
    'marry'
];

exports.marry = {
    desc: 'Marry Someone',
    longDesc: 'Marry your imagfinary waifu or a member in the guild.',
    usage: '<Mention | Name> ',
    main(bot, ctx) {
        return new Promise((resolve, reject) => {
            if (!ctx.args) {
                ctx.msg.channel.createMessage('Mention or cite your partner\'s name.');
            } else if (ctx.args[0].mentions.id === ctx.msg.author.id) {
                ctx.msg.channel.createMessage('Hey! You\'re not allowed to marry yourself.');
            } else {
                // we'll add somth here later
            }
        });
    }
};<commit_msg>:tada: MARRYING SOEONE IS NOW ILLEGAL :tada:<commit_after>/* marry.js - Marry your imaginary waifu or someone
 * 
 * 
 *  Contributed by Capuccino
 */

/* eslint-env node */

exports.commands = [
    'marry'
];

exports.marry = {
    desc: 'Marry Someone',
    longDesc: 'Marry your waifu in the guild.',
    usage: '<Mention>',
    main(bot, ctx) {
        return new Promise((resolve, reject) => {
            if (!ctx.suffix) {
                ctx.createMessage('Mention or cite your partner\'s name.');
            } else if (ctx.msg.mentions[0].id === ctx.msg.author.id) {
                ctx.createMessage('Hey! You\'re not allowed to marry yourself.');
            } else {
                ctx.createMessage(`${ctx.mentions[0]}, Will you marry ${$ctx.msg.author}? (yes/no) (You have 30 seconds to respond).`).then(() => {
                    bot.awaitMessage(ctx.msg.channel.id, ctx.mentions[0].id, 30000).then(m => {
                        if (/y(es)?/i.test(m.content)) {
                            return m.createMessage(`${ctx.msg.author}, congrats! You are now married to ${ctx.msg.mention[0]}!`);
                        } else if (/no?/i.test(m.content)) {
                            return m.createMessage(`I'm sorry ${ctx.msg.author}, but your partner declined.`);
                        }
                    }).catch(() => {
                        ctx.createMessage('Your partner didn\'t respond in time.');
                    });
                }).then(resolve).catch(reject);
            }
        });
    }
};
{'fraction_non_alphanumeric': 0.15100087032201914, 'fraction_numerical': 0.005221932114882507, 'mean_word_length': 1.759903961584634, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '93500', 'n_tokens_mistral': 707, 'n_tokens_neox': 678, 'n_words': 167}