Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js")
- let db = require("quick.db")
- module.exports.run = async (bot, message, args) => {
- let pUser = message.author.id
- let sUser = message.mentions.users.first()
- if (!sUser) {
- return message.channel.send(`You need to specify who you want to pay! Proper command usage: \`${prefix}propose @user\``)
- }
- const filter = m => m.author.id === sUser.id
- message.channel.send(`<@${sUser.id}>, <@${pUser}> wants to marry you? Type \`I do\` to accept!`)
- message.channel.awaitMessages(filter, {max: 1, time: 10000}).then(collected => {
- let check = collected.first().content
- console.log()
- if (check === "I do" || check === "i do") {
- db.set(`spouse_${pUser.id}`, sUser.id)
- db.set(`spouse_${sUser.id}`, pUser.id)
- return message.channel.send(`🎉 Congratulations! 🎉\n${pUser} and <@${sUser.id}> are now married!`)
- } else {
- return message.channel.send(`@${sUser.id}, that wasn't the right thing to say...`)
- }
- }).catch(err => {
- console.log(err)
- })
- } //End of module.
- module.exports.help = {
- name: "propose",
- alias: ["marry"]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement