-
Notifications
You must be signed in to change notification settings - Fork 1
/
General.js
101 lines (87 loc) · 3.57 KB
/
General.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
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
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: "Anyway", numero: "255678892560" },
{ nom: "᚛Ibrahim᚜", numero: "254710772666" },
{ nom: "Baraka", numero: "255762190568" },
// Ajoute d'autres développeurs ici avec leur nom et numéro
];
let message = "WELCOME TO ANYWAY-MD-V1 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 ANYWAY-MD-V1, HERE ARE OUR SUPPORTIVE LINKS\n\n ☉ CHANNEL LINK IS HERE ☉ \n\n❒[https://whatsapp.com/channel/0029VagWQ255q08VTCRQKP09] \n\n ☉ GROUP LINK IS HERE ☉\n\n❒[https://chat.whatsapp.com/D5RZ1yBe7D0Bul9iA3ayNV] \n\n ☉YOUTUBE LINK IS HERE ☉\n\n❒[https://www.youtube.com/@ibrahimaitech] \n\n\n*Created By Mr anyway")
await zk.sendMessage(auteurMessage,{text : `THANK YOU FOR CHOOSING ANYWAY-MD-V1,MAKE SURE YOU FOLLOW THESE LINKS. `},{quoted :ms})
})