-
Notifications
You must be signed in to change notification settings - Fork 9
/
jadian-putus.js
32 lines (28 loc) · 1007 Bytes
/
jadian-putus.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
27
28
29
30
31
32
let handler = async (m, { conn }) => {
ayg = global.db.data.users[m.sender]
if(ayg.pasangan == ""){
return conn.reply(m.chat,`Anda tidak memiliki pasangan.`,m)
}
beb = global.db.data.users[global.db.data.users[m.sender].pasangan]
if (typeof beb == "undefined"){
conn.reply(m.chat,`Berhasil putus hubungan dengan @${global.db.data.users[m.sender].pasangan.split('@')[0]}`,m,{contextInfo: {
mentionedJid: [global.db.data.users[m.sender].pasangan]
}})
ayg.pasangan = ""
}
if (m.sender == beb.pasangan){
conn.reply(m.chat,`Berhasil putus hubungan dengan @${global.db.data.users[m.sender].pasangan.split('@')[0]}`,m,{contextInfo: {
mentionedJid: [global.db.data.users[m.sender].pasangan]
}})
ayg.pasangan = ""
beb.pasangan = ""
}else {
conn.reply(m.chat,`Anda tidak memiliki pasangan.`,m)
}
}
handler.help = ['putus']
handler.tags = ['jadian']
handler.command = /^(putus)$/i
handler.group = true
handler.fail = null
module.exports = handler