-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathpair.js
More file actions
52 lines (44 loc) · 2.6 KB
/
pair.js
File metadata and controls
52 lines (44 loc) · 2.6 KB
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
/**
* @author Zeeshan Altaf
* @warn Do not edit code or edit credits
* @Dont Change This Credits Otherwisw Your Bot Lol
*/
module.exports.config = {
name: "pair",
version: "1.0.0",
hasPermssion: 0,
credits: "Zeeshan Altaf ",
description: "Dont Chang This Credits Otherwise Your Bot Lol",
commandCategory: "Love",
usages: "pair",
cooldowns: 40
};
module.exports.run = async function({ api, event,Threads, Users }) {
const axios = global.nodemodule["axios"];
const fs = global.nodemodule["fs-extra"];
var { participantIDs } =(await Threads.getData(event.threadID)).threadInfo;
var tle = Math.floor(Math.random() * 101);
var namee = (await Users.getData(event.senderID)).name
const botID = api.getCurrentUserID();
const listUserID = event.participantIDs.filter(ID => ID != botID && ID != event.senderID);
var id = listUserID[Math.floor(Math.random() * listUserID.length)];
var name = (await Users.getData(id)).name
var arraytag = [];
arraytag.push({id: event.senderID, tag: namee});
arraytag.push({id: id, tag: name});
let Avatar = (await axios.get( `https://graph.facebook.com/${event.senderID}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, { responseType: "arraybuffer" } )).data;
fs.writeFileSync( __dirname + "/cache/avt.png", Buffer.from(Avatar, "utf-8") );
let gifLove = (await axios.get( `https://i.ibb.co/F5t2HNn/romantic.gif`, { responseType: "arraybuffer" } )).data;
fs.writeFileSync( __dirname + "/cache/giflove.png", Buffer.from(gifLove, "utf-8") );
let Avatar2 = (await axios.get( `https://graph.facebook.com/${id}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, { responseType: "arraybuffer" } )).data;
fs.writeFileSync( __dirname + "/cache/avt2.png", Buffer.from(Avatar2, "utf-8") );
var imglove = [];
imglove.push(fs.createReadStream(__dirname + "/cache/avt.png"));
imglove.push(fs.createReadStream(__dirname + "/cache/giflove.png"));
imglove.push(fs.createReadStream(__dirname + "/cache/avt2.png"));
var msg = {body: `❰Cϴ𝝢Ĝ𝙍Uɭ𝘼Ƭĭϴ𝝢𝘚❱
\n🫀Sada kush rehyao yehe dua hai humyre🙈
\n𝙃𝙀𝘼𝙍𝙏𝘽𝙀𝘼𝙏 𝘾𝙊𝙐𝙉𝙏 ❣︎ ${tle}%
\n`+namee+" "+"💝"+" "+name, mentions: arraytag, attachment: imglove}
return api.sendMessage(msg, event.threadID, event.messageID)
}