-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofile.js
52 lines (33 loc) · 1.37 KB
/
profile.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
const {zokou} = require("../framework/zokou");
const conf = require("../set")
const {jidDecode}=require("@whiskeysockets/baileys")
zokou( {
nomCom : "profile",
categorie : "Fun",
},
async(dest,zk, commandeOptions)=> {
const {ms , arg, repondre,auteurMessage,nomAuteurMessage, msgRepondu , auteurMsgRepondu} = commandeOptions ;
let jid = null
let nom = null ;
if (!msgRepondu) {
jid = auteurMessage;
nom = nomAuteurMessage;
try { ppUrl = await zk.profilePictureUrl(jid , 'image') ; } catch { ppUrl = conf.IMAGE_MENU};
const status = await zk.fetchStatus(jid) ;
mess = {
image : { url : ppUrl },
caption : '*Nom :* '+ nom + '\n*Status :*\n' + status.status
}
} else {
jid = auteurMsgRepondu;
nom ="@"+auteurMsgRepondu.split("@")[0] ;
try { ppUrl = await zk.profilePictureUrl(jid , 'image') ; } catch { ppUrl = conf.IMAGE_MENU};
const status = await zk.fetchStatus(jid) ;
mess = {
image : { url : ppUrl },
caption : '*Name :* '+ nom + '\n*Status :*\n' + status.status,
mentions:[auteurMsgRepondu]
}
} ;
zk.sendMessage(dest,mess,{quoted : ms})
});