forked from Anzad378/BWB-XMD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGeneral.js
More file actions
103 lines (88 loc) · 3.62 KB
/
General.js
File metadata and controls
103 lines (88 loc) · 3.62 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//prince coder//
const { zokou } = require("../framework/zokou");
const {getAllSudoNumbers,isSudoTableNotEmpty} = require("../bdd/sudo")
const conf = require("../set");
zokou({ nomCom: "owner", categorie: "General", reaction: "🚘" }, async (dest, zk, commandeOptions) => {
const { ms , mybotpic } = commandeOptions;
const thsudo = await isSudoTableNotEmpty()
if (thsudo) {
let msg = `*My Super-User*\n
*Owner Number*\n :
- 🌟 @${conf.NUMERO_OWNER}
------ *other sudos* -----\n`
let sudos = await getAllSudoNumbers()
for ( const sudo of sudos) {
if (sudo) { // Vérification plus stricte pour éliminer les valeurs vides ou indéfinies
sudonumero = sudo.replace(/[^0-9]/g, '');
msg += `- 💼 @${sudonumero}\n`;
} else {return}
} const ownerjid = conf.NUMERO_OWNER.replace(/[^0-9]/g) + "@s.whatsapp.net";
const mentionedJid = sudos.concat([ownerjid])
console.log(sudos);
console.log(mentionedJid)
zk.sendMessage(
dest,
{
image : { url : mybotpic() },
caption : msg,
mentions : mentionedJid
}
)
} else {
const vcard =
'BEGIN:VCARD\n' + // metadata of the contact card
'VERSION:3.0\n' +
'FN:' + conf.OWNER_NAME + '\n' + // full name
'ORG:undefined;\n' + // the organization of the contact
'TEL;type=CELL;type=VOICE;waid=' + conf.NUMERO_OWNER + ':+' + conf.NUMERO_OWNER + '\n' + // WhatsApp ID + phone number
'END:VCARD';
zk.sendMessage(dest, {
contacts: {
displayName: conf.OWNER_NAME,
contacts: [{ vcard }],
},
},{quoted:ms});
}
});
zokou({ nomCom: "dev", categorie: "General", reaction: "🚘" }, async (dest, zk, commandeOptions) => {
const { ms, mybotpic } = commandeOptions;
const devs = [
{ nom: "prince", numero: "255614545735" },
{ nom: "᚛Ibrahim᚜", numero: "254710772666" },
{ nom: "BELTAH TECH", numero: "254114141192" },
// Ajoute d'autres développeurs ici avec leur nom et numéro
];
let message = "WELCOME TO BWB XMD HELP CENTER! ASK FOR HELP FROM ANY OF THE DEVELOPERS BELOW:\n\n";
for (const dev of devs) {
message += `----------------\n• ${dev.nom} : https://wa.me/${dev.numero}\n`;
}
var lien = mybotpic()
if (lien.match(/\.(mp4|gif)$/i)) {
try {
zk.sendMessage(dest, { video: { url: lien }, caption:message }, { quoted: ms });
}
catch (e) {
console.log("🥵🥵 Menu erreur " + e);
repondre("🥵🥵 Menu erreur " + e);
}
}
// Vérification pour .jpeg ou .png
else if (lien.match(/\.(jpeg|png|jpg)$/i)) {
try {
zk.sendMessage(dest, { image: { url: lien }, caption:message }, { quoted: ms });
}
catch (e) {
console.log("🥵🥵 Menu erreur " + e);
repondre("🥵🥵 Menu erreur " + e);
}
}
else {
repondre(lien)
repondre("link error");
}
});
zokou({ nomCom: "support", categorie: "General" }, async (dest, zk, commandeOptions) => {
const { ms, repondre, auteurMessage, } = commandeOptions;
repondre("THANK YOU FOR CHOOSING BWB-XMD, HERE ARE OUR SUPPORTIVE LINKS\n\n ☉ CHANNEL LINK IS HERE ☉ \n\n❒[ https://https://whatsapp.com/channel/0029Vao2hgeChq6HJ5bmlZ3K ] \n\n ☉ GROUP LINK IS HERE ☉\n\n❒[ https://https://chat.whatsapp.com/EFh0BWKa0Uf92A7RgBwpuu ] \n\n ☉YOUTUBE LINK IS HERE ☉\n\n❒[https://youtube.com/@_odhiambo_official?si=n6lKIy2ViQauVS_n] \n\n\n𝑪𝒓𝒆ated by prince")
await zk.sendMessage(auteurMessage,{text : `THANK YOU FOR CHOOSING BWB-XMD,MAKE SURE YOU FOLLOW THESE LINKS. `},{quoted :ms})
})