-
Notifications
You must be signed in to change notification settings - Fork 0
/
forcedivorce.js
26 lines (21 loc) · 1.07 KB
/
forcedivorce.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// I'm mean sometimes, and this command reflects it.
const { MessageEmbed, Permissions } = require('discord.js');
const DatabaseManager = require('../../utils/DatabaseManager.js');
const moment = require('moment')
module.exports = {
name: 'forcedivorce',
description: 'Forcibly divorce a couple.',
category: 'fun',
hidefromhelp: true,
enabled: true,
run: async (bot, message, args) => {
if (message.author.id !== '679033218971861010') {
return;
}
const member = message.mentions.members.first() || await message.guild.members.fetch(args[0]).catch(err => err) || await message.guild.members.fetch({ query: args[0], limit: 1 });
let marriage = await DatabaseManager.getMarriage(member.id)
await DatabaseManager.divorce(member.id)
if (!marriage) return message.reply({content: 'They aren\'t married!', allowedMentions: { repliedUser: true }})
message.channel.send('You force divorced <@' + member.id + '> and <@' + marriage.partner + '> after they were together for ' + moment(marriage.time).fromNow(true) + '! ):')
}
}