-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
127 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
exports.run = async (client, message, args) => { | ||
client.life.ensure(message.author.id, { | ||
member: message.author.id, | ||
spouse: 0, | ||
job: 0 | ||
}) | ||
|
||
const spouse = client.life.get(message.author.id, 'spouse') | ||
if (spouse === 0) return message.channel.send('You need to have a spouse before you can divorce them.') | ||
|
||
if (args[0] === 'confirm') { | ||
message.channel.send('You divorced your partner.') | ||
client.life.set(message.author.id, 0, 'spouse') | ||
client.life.set(spouse, 0, 'spouse') | ||
} | ||
|
||
else { | ||
message.channel.send('You are about to divorce your partner. Type ;;divorce confirm to confirm this action.') | ||
} | ||
} | ||
|
||
exports.conf = { | ||
enabled: true, | ||
aliases: ['div', 'fixyourlife'], | ||
guildOnly: true, | ||
permLevel: 'User' | ||
} | ||
|
||
exports.help = { | ||
name: 'divorce', | ||
category: 'Fun', | ||
description: 'Divorces your spouse.', | ||
usage: 'divorce' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
const Discord = require('discord.js') | ||
const colors = require('../lib/colors.json') | ||
|
||
exports.run = async (client, message, args) => { | ||
const user = message.mentions.users.first() || client.users.get(args[0]) | ||
if (!user) return message.channel.send('You must mention someone or give their ID!') | ||
if (user.bot === true) return message.channel.send('Don\'t marry bots. They have no feelings... trust me...') | ||
if (user === message.author || message.author.id === user.id) return message.channel.send('It really do be like that sometimes...') | ||
|
||
let proposerID = message.author.id | ||
let proposerName = message.author.username | ||
|
||
client.life.ensure(user.id, { | ||
member: user.id, | ||
spouse: 0, | ||
job: 0 | ||
}) | ||
|
||
client.life.ensure(message.author.id, { | ||
member: message.author.id, | ||
spouse: 0, | ||
job: 0 | ||
}) | ||
|
||
client.inventory.ensure(message.author.id, { | ||
member: message.author.id, | ||
rings: 0, | ||
petfood: 0, | ||
seeds: 0, | ||
}) | ||
|
||
const rings = client.inventory.get(message.author.id, 'rings') | ||
const spouse = client.life.get(message.author.id, 'spouse') | ||
const uSpouse = client.life.get(user.id, 'spouse') | ||
|
||
if (rings === 0) return message.channel.send('You do not have a wedding ring. Buy one in the shop.') | ||
if (spouse !== 0) return message.channel.send('You cannot have more than one spouse.') | ||
if (uSpouse !== 0) return message.channel.send(`${user.tag} already has a spouse.`) | ||
|
||
let embed = new Discord.RichEmbed() | ||
.setDescription(`**${user.tag}**, **${message.author.tag}** is asking for your hand in marriage, would you like to accept?`) | ||
|
||
const noEmoji = message.client.emojis.get('637573919204966410') | ||
message.channel.send(embed).then(message => { | ||
message.react('✅').then(() => message.react(noEmoji)); | ||
|
||
const filter = (reaction, sent) => { | ||
return ['✅', noEmoji].includes(reaction.emoji.name) && sent.id === user.id; | ||
}; | ||
|
||
const proposer = message.guild.members.get("id", proposerID) | ||
|
||
message.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] }) | ||
.then(collected => { | ||
const reaction = collected.first() | ||
|
||
if (reaction.emoji.name === '✅') { | ||
client.life.set(proposerID, user.id, 'spouse') | ||
client.life.set(user.id, proposerID, 'spouse') | ||
client.inventory.set(proposerID, rings - 1, 'rings') | ||
|
||
embed.setDescription(`${user.tag} and ${proposer.user.tag} are now married`) | ||
.setImage('https://media.giphy.com/media/vTfFCC3rSfKco/giphy.gif') | ||
.setColor(colors.pink) | ||
message.channel.send(embed) | ||
} | ||
if (reaction.emoji.id === '637573919204966410') { // No emoji | ||
embed.setTitle(`Sorry **${proposer.user.tag}**, **${user.tag}** declined your proposal.`) | ||
message.edit(embed) | ||
} | ||
}) | ||
.catch(collected => { | ||
message.channel.send(`Sorry ${proposer.user.tag}, the person you proposed to didn't respond, try again later.`) | ||
}); | ||
}) | ||
} | ||
|
||
exports.conf = { | ||
enabled: true, | ||
aliases: ['propose', 'preparetoruinyourlife'], | ||
guildOnly: true, | ||
permLevel: 'User' | ||
} | ||
|
||
exports.help = { | ||
name: 'marry', | ||
category: 'Fun', | ||
description: 'Proposes to <member>.', | ||
usage: 'marry <member>' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ | |
"blue": "#3498DB", | ||
"teal": "#4699AA", | ||
"purple": "#995BBD", | ||
"pink": "#F784D9", | ||
"default": "#995BBD" | ||
} |