-
Notifications
You must be signed in to change notification settings - Fork 1
/
voir.js
37 lines (21 loc) · 1.01 KB
/
voir.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
const {zokou}=require("../framework/zokou") ;
zokou({nomCom:"vv",categorie:"General",reaction:"🤲🏿"},async(dest,zk,commandeOptions)=>{
const {ms,msgRepondu,repondre}=commandeOptions;
if(!msgRepondu){return repondre("*Mentionne a view once media* .");}
if(msgRepondu.viewOnceMessageV2)
{
if(msgRepondu.viewOnceMessageV2.message.imageMessage)
{
var image =await zk.downloadAndSaveMediaMessage(msgRepondu.viewOnceMessageV2.message.imageMessage)
var texte = msgRepondu.viewOnceMessageV2.message.imageMessage.caption
await zk.sendMessage(dest,{image:{url:image},caption:texte},{quoted:ms})
}else if(msgRepondu.viewOnceMessageV2.message.videoMessage){
var video = await zk.downloadAndSaveMediaMessage(msgRepondu.viewOnceMessageV2.message.videoMessage)
var texte =msgRepondu.viewOnceMessageV2.message.videoMessage.caption
await zk.sendMessage(dest,{video:{url:video},caption:texte},{quoted:ms})
}
}else
{
return repondre("this message is not on view once .")
}
})