├── .env ├── .gitignore ├── Dockerfile ├── README.md ├── app.json ├── auth ├── auth.json ├── creds-2.json └── mr ├── bdd ├── Mr ├── alive.js ├── antibot.js ├── antilien.js ├── banGroup.js ├── banUser.js ├── cron.js ├── hentai.js ├── level.js ├── mention.js ├── onlyAdmin.js ├── stickcmd.js ├── sudo.js ├── warn.js └── welcome.js ├── commandes ├── Answer.js ├── Fullpp.js ├── General.js ├── Groupe.js ├── Modi.js ├── Reboot.js ├── abu.js ├── afk.js ├── alive.js ├── anime.js ├── audioedit.js ├── blocklist.js ├── canvacord.js ├── check.js ├── clients.js ├── conversion.js ├── convert.js ├── define.js ├── devinette.js ├── events.js ├── fancy.js ├── fun.js ├── games.js ├── git.js ├── gitclone.js ├── groupe.js ├── hentai.js ├── heroku.js ├── igdl-fb-tk.js ├── img.js ├── insult.js ├── logo.js ├── mainlogo.js ├── mainly.js ├── menu.js ├── menu.js.prec ├── mods.js ├── musModi.js ├── musMods.js ├── mustaffacty.js ├── mustaffahr.js ├── musuptime.js ├── parole.js ├── ping.js ├── play.js ├── popkidhand2.js ├── popshand3.js ├── popsstand1.js ├── profile.js ├── proprio.js ├── rank.js ├── reaction.js ├── repo.js ├── sc.js ├── script.js ├── song.js ├── stickcmd.js ├── stickersearch.js ├── style.js ├── tts.js ├── voir.js ├── warn.js ├── weather.js ├── weeb.js ├── weejb.js ├── youtube.js ├── yt-search.js └── ᴠᴠ2.js ├── exemple_de_set.env ├── framework ├── app.js ├── dl │ ├── Function.js │ ├── Mr │ ├── dl.json │ └── ytdl-core.js ├── imgur.js ├── index.js ├── mesfonctions.js ├── stylish-font.js ├── traduction.js ├── unicode.js ├── ytdl-core.js └── zokou.js ├── gif └── gif.json ├── heroku.yml ├── ibrahim.js ├── media ├── antibot.gif ├── chrono.webp ├── deleted-message.jpg ├── lyrics-img.jpg ├── media.json ├── remover.gif └── rm.gif ├── package.json ├── play.js ├── set.env_example └── set.js /.env: -------------------------------------------------------------------------------- 1 | OWNER_NAME="mranyway" 2 | PREFIX="." 3 | PUBLIC_MODE='yes' 4 | AUTO_READ_STATUS="yes" 5 | AUTO_DOWNLOAD_STATUS="no" 6 | BOT_NAME= "anyway-MD" 7 | IMAGE_MENU= "https://telegra.ph/file/0c225f7da5616cdcbec80.jpg" 8 | BOT_OWNER=cracker 9 | NUMERO_OWNER= "255678892560" 10 | OWNER_NAME= "᚛mr anyway᚜" 11 | DATABASE_URL= "postgresql://postgres:bKlIqoOUWFIHOAhKxRWQtGfKfhGKgmRX@viaduct.proxy.rlwy.net:47738/railway" 12 | GITHUB_GIT=https://apis.ibrahimadams.us.kg 13 | WARN_COUNT= "" 14 | OPENAI_API_KEY= "" 15 | STARTING_BOT_MESSAGE='yes' 16 | ANTI_DELETE_MESSAGE='yes' 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /auth 2 | /set.env 3 | /package-lock.json 4 | /node_modules 5 | /store.json 6 | /audio.mp3 7 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:lts-buster 2 | 3 | RUN apt-get update && \ 4 | apt-get install -y \ 5 | ffmpeg \ 6 | imagemagick \ 7 | webp && \ 8 | apt-get upgrade -y && \ 9 | npm i pm2 -g && \ 10 | rm -rf /var/lib/apt/lists/* 11 | 12 | RUN git clone https://github.com/SIMON32883/MR-ANYWAY-MD /root/ToshTech 13 | WORKDIR /root/toshtech/ 14 | 15 | 16 | COPY package.json . 17 | RUN npm install pm2 -g 18 | RUN npm install --legacy-peer-deps 19 | 20 | COPY . . 21 | 22 | EXPOSE 5000 23 | 24 | CMD ["npm", "run" , "ibrahim.js"] 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 𝗪𝗘𝗟𝗖𝗢𝗠E 𝗧𝗢 𝗝𝗔𝗠𝗘𝗦 𝗠𝗗 𝗪𝗛𝗔𝗧𝗦𝗔𝗣𝗣 𝗕𝗢𝗧 2 | 3 | [![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Rockstar-ExtraBold&size=30&pause=1000&color=red¢er=true&vCenter=true&width=350&height=50&lines=`🩸⃟༑༑𝗝𝗔𝗠𝗘𝗦`🩸⃟༑༑+𝗠𝗗+𝗕𝗢𝗧+`🩸⃟༑༑)](https://git.io/typing-svg) 4 | 5 |

6 | 7 | 8 | ## 𝗧𝗛𝗜𝗦 𝗕𝗢𝗧 𝗜𝗦 𝗦𝗔𝗙𝗘 𝗢𝗡 𝗛𝗘𝗥𝗢𝗨𝗞𝗨 𝗗𝗘𝗣𝗟𝗢𝗬𝗠𝗘𝗡𝗧 9 | 10 | [![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Rockstar-ExtraBold&size=30&pause=1000&color=red¢er=true&vCenter=true&width=815&height=60&lines=🩸⃟+✚+✚+✚+✚+✚+✚+✚+✚+✚+✚+✜+✜+✚+✚+✚+✚)](https://git.io/typing-svg) 11 | 12 | 13 | [![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Rockstar-ExtraBold&size=30&pause=1000&color=red¢er=true&vCenter=true&width=815&height=60&lines=𝗝𝗔𝗠𝗘𝗦`🩸⃟༑༑+𝗠𝗗+𝗕𝗢𝗧`🩸⃟༑༑+𝗖𝗥𝗘𝗔𝗧𝗘𝗗+𝗕𝗬+`🩸⃟༑༑𝗝𝗔𝗠𝗘𝗦𝗧𝗘𝗖𝗛)](https://git.io/typing-svg) 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | [![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Rockstar-ExtraBold&size=30&pause=1000&color=red¢er=true&vCenter=true&width=900&height=60&lines=𝗣𝗥𝗢𝗚𝗥𝗘𝗦𝗦`🩸⃟༑༑+𝗙𝗢𝗥+𝗝À𝗠𝗘𝗦`🩸⃟༑༑+𝗠𝗗+𝗕𝗢𝗧+`🩸⃟༑༑)](https://git.io/typing-svg) 22 | 23 | 24 |

James :: Visitor's Count

25 | 26 | 27 | 28 | 29 | 30 | 31 | ## HOW TO GET `🩸⃟༑༑JAMES MD `🩸⃟༑༑BOT 32 | 33 | 34 | [![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Rockstar-ExtraBold&color=red&lines=𝗙𝗢𝗥𝗞🩸⃟+𝗔𝗡𝗗`🩸⃟༑༑+𝗦𝗧𝗔𝗥`🩸⃟༑༑+𝗥𝗘𝗣𝗢)](https://git.io/typing-svg) 35 | 36 | 37 | 38 |

39 | 40 | 41 | 42 | 43 | 44 | 45 | [![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Rockstar-ExtraBold&color=red&lines=𝗦𝗘𝗦𝗦𝗜𝗢𝗡`🩸⃟༑༑+𝗜𝗗+𝗦𝗜𝗧𝗘`🩸⃟༑༑+𝗜𝗦+𝗛𝗘𝗥𝗘`🩸⃟༑༑)](https://git.io/typing-svg) 46 | 47 | 48 | 49 |

50 | 51 | 52 | 53 | [![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Rockstar-ExtraBold&color=yellow&lines=𝐃𝐄𝐏𝐋𝐎𝐘+𝐎𝐍+𝐇𝐄𝐑𝐎𝐊𝐔)](https://git.io/typing-svg) 54 | 55 | 56 | 57 | ## 𝐅𝐎𝐑`🩸⃟༑༑ 𝐎𝐍𝐄-𝐓𝐀𝐏`🩸⃟༑༑ 𝐃𝐄𝐏𝐋𝐎𝐘𝐌𝐄𝐍𝐓 𝐔𝐒𝐄 `🩸⃟༑༑𝐓𝐇𝐈𝐒 𝐁𝐔𝐓𝐓𝐎𝐍 58 | 59 |

60 | 61 | 62 |

63 | 64 | 65 | [![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Rockstar-ExtraBold&size=30&pause=1000&color=0000FF¢er=true&vCenter=true&width=815&height=60&lines=▭`🩸⃟༑༑+▬+`🩸⃟༑༑▭+▬+▭+▬+▭+▬+▭+▬+▭)](https://git.io/typing-svg) 66 | 67 | 68 | 69 | 70 | ## FINAL`🩸⃟༑༑ REMARKS `🩸⃟༑༑ON MY REPO (STATS) 71 | 72 | ![ Stats](https://github-readme-stats.vercel.app/api/pin/?username=jtechde&repo=james&show_owner=true&theme=neon) 73 | 74 | 75 | 76 | 77 | ## CONTACT`🩸⃟༑༑ JAMES `🩸⃟༑༑TECH HERE 78 | DM FOR SERIOUS BUSINESS 79 | 80 |

81 | 82 |

84 | 85 |

87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name":"JAMES-MD", 3 | "description":"Best whatsapp bot created by JAMESTECH", 4 | "keywords":["bot","node","baileys","whatsapp"], 5 | "logo":"https://files.catbox.moe/eg2cgb.jpg", 6 | "repository":"https://github.com/jtech//james", 7 | "succes_url":"/", 8 | "stack":"container", 9 | "env":{ 10 | "PREFIX": 11 | { 12 | "description":"choose your prefix of bot", 13 | "value":".", 14 | "required":true 15 | }, 16 | "ANTICALL": 17 | { 18 | "description":"Enter yes for your bot to reject calls", 19 | "value":"yes", 20 | "required":false 21 | }, 22 | "AUTO_BIO": 23 | { 24 | "description":"Enter yes for your bot to auto bio", 25 | "value":"no", 26 | "required":false 27 | }, 28 | "AUTO_REACT_STATUS": 29 | { 30 | "description":"Enter yes for your bot to auto react status", 31 | "value":"yes", 32 | "required":false 33 | }, 34 | "AUTO_SAVE_CONTACTS": 35 | { 36 | "description":"Enter yes for your bot to auto save contacts", 37 | "value":"no", 38 | "required":false 39 | }, 40 | "AUTO_REACT": 41 | { 42 | "description":"Enter yes for your bot to auto react message in all chats", 43 | "value":"yes", 44 | "required":false 45 | }, 46 | "AUDIO_REPLY": 47 | { 48 | "description":"Enter yes for your bot to auto reply audio in all chats", 49 | "value":"yes", 50 | "required":false 51 | }, 52 | "AUTO_REPLY": 53 | { 54 | "description":"Enter yes for your bot to auto reply message when you are offline", 55 | "value":"yes", 56 | "required":false 57 | }, 58 | "AUTO_READ_STATUS": 59 | { 60 | "description":"Your contact status will be read automatically(type yes to active or no to deactive ; don't write in capital letter)", 61 | "value":"yes", 62 | "required":false 63 | }, 64 | "AUTO_DOWNLOAD_STATUS": 65 | { 66 | "description":"Your contact status will be download automatically and send to you(type yes to active or no to deactive ; don't write in capital letter)", 67 | "value":"no", 68 | "required":false 69 | } 70 | , 71 | "PM_PERMIT" : 72 | { 73 | "description":"Other user can't use your bot in pm (type yes to active or no to deactive ; don't write in capital letter)", 74 | "value":"no", 75 | "required":false 76 | }, 77 | "BOT_NAME" : 78 | { 79 | "description":"put A name for your bot", 80 | "value":"JAMES_MD", 81 | "required":false 82 | 83 | }, 84 | "BOT_MENU_LINKS" : 85 | { 86 | "description":"add one or many link for your bot menu ; eg : url1,url2,url3.....", 87 | "value":"https://files.catbox.moe/eg2cgb.jpg", 88 | "required":false 89 | 90 | }, 91 | "PUBLIC_MODE": 92 | { 93 | "description":"type yes to put your bot on public mode or no to put it on private mod", 94 | "value":"yes", 95 | "required":false 96 | } 97 | , 98 | "HEROKU_API_KEY": { 99 | "description": "insert your heroku api-key (this is optionnal)", 100 | "value":"HRKU-4e30b0fa-c892-471f-833b-dbdb416de2d3", 101 | "required" :false 102 | }, 103 | "HEROKU_APP_NAME": { 104 | "description": "insert your heroku APP NAME (this is optionnal)", 105 | "required" :false 106 | } 107 | , 108 | "SESSION_ID": 109 | { 110 | "description":"put your session ID , the code you receive after scanning Qr code", 111 | "value":"", 112 | "required":true 113 | 114 | }, 115 | "OWNER_NAME": 116 | { 117 | 118 | "desc": "Your Name", 119 | "required": false, 120 | "value": "james" 121 | }, 122 | "NUMERO_OWNER": 123 | { 124 | 125 | "desc": "Your number , dont put '+' and put you area code(exemple of togo '228')", 126 | "required":false, 127 | "value": "254785016388" 128 | }, 129 | "WARN_COUNT": 130 | { 131 | "desc": "this is the limit of warn for warning commandes", 132 | "required": false, 133 | "value": "5" 134 | }, 135 | "STARTING_BOT_MESSAGE": 136 | { 137 | "description": "if you don't want startting-bot-message put no else put yes", 138 | "required": true, 139 | "value": "no" 140 | }, 141 | "PRESENCE":{ 142 | "description":"Mark your presence: 1 to indicate that you are online even if you are not. 2 to indicate that you are currently typing a message. 3 to indicate that you are currently recording an audio. Or leave the field blank to indicate your real state.", 143 | "value":"2", 144 | "required": false 145 | 146 | }, 147 | "AUTO_READ":{ 148 | "description":"Enter yes for auto read messages.", 149 | "value":"no", 150 | "required": false 151 | }, 152 | "ANTI_DELETE_MESSAGE" : { 153 | "description": "if you want to enable anti delete message put yes else put no", 154 | "value": "no", 155 | "required": false 156 | } 157 | }, 158 | 159 | "buildpacks": [ 160 | { 161 | "url": "heroku/nodejs" 162 | }, 163 | 164 | { 165 | "url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest" 166 | }, 167 | { 168 | "url": "https://github.com/clhuang/heroku-buildpack-webp-binaries.git" 169 | } 170 | ], 171 | "formation": { 172 | "worker": { 173 | "quantity": 1, 174 | "size": "standard-2x" 175 | } 176 | }, 177 | "addons": [ 178 | { 179 | "plan": "heroku-postgresql:essential-0" 180 | } 181 | ] 182 | } 183 | -------------------------------------------------------------------------------- /auth/auth.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /auth/creds-2.json: -------------------------------------------------------------------------------- 1 | {"noiseKey":{"private":{"type":"Buffer","data":"8AIVqeax6f1Zj4uJh0AUfBzcIxlxMC8nKGL+zArBkFg="},"public":{"type":"Buffer","data":"Q/8LG0pK1WcEQY6RnwnimmRoC11Q0+64m84Rq+KtQD8="}},"pairingEphemeralKeyPair":{"private":{"type":"Buffer","data":"yP3KcxC+1TZkmYvH1zc3mJRcYzRLoNoi3azUnA3TnXU="},"public":{"type":"Buffer","data":"7oeZyNybY/wxIlR9lqhGkt+PAWYAkARDuWWrR/Vv2UA="}},"signedIdentityKey":{"private":{"type":"Buffer","data":"YFoS/QqF0wgVahisE96MxCMg0K+oSK1TCjNN6bRaeWY="},"public":{"type":"Buffer","data":"M9uPS0PRPMg2PeXjr5F/QHKQENxdoMHVzXm/XwLFH38="}},"signedPreKey":{"keyPair":{"private":{"type":"Buffer","data":"uLEgdV+8YOmXSQGAANIDb/7u63v+s17E3QowDiY3uEs="},"public":{"type":"Buffer","data":"fQ2Tbc9kIxk6B1hXxfWqrtt7PAvIDpI0sVJuVZ34HRU="}},"signature":{"type":"Buffer","data":"EuYOxVGvQBogu0Oq6/s1QYplmVqV6SPwJUQdp8TRB78sfAOWliO4cb95a1rfTpzU7fgZbxK/0mdCIFIam3pciw=="},"keyId":1},"registrationId":51,"advSecretKey":"THZOQ67Fh4a5S9qDq9m80v9sGh5JQs5/eL0VnSJXfRw=","processedHistoryMessages":[],"nextPreKeyId":31,"firstUnuploadedPreKeyId":31,"accountSyncCounter":0,"accountSettings":{"unarchiveChats":false},"deviceId":"H3aao8VLTLqBDscyLKtAcw","phoneId":"da450a09-c8ac-4028-a244-a233413776a3","identityId":{"type":"Buffer","data":"9fV+t198a+xL4hfDzqoM2wyXR9A="},"registered":true,"backupToken":{"type":"Buffer","data":"BwdyE5P+ShrbZlE49adiDRcC0Tc="},"registration":{},"pairingCode":"5ZP514L9","me":{"id":"254710772666:87@s.whatsapp.net","name":"Ibrahim Adams"},"account":{"details":"CO6ehacDEI2luLQGGAMgACgA","accountSignatureKey":"l+KuMQPS+2B6i6fBRlQSD3nhTpgOWytb5KLaTRAr8W0=","accountSignature":"8c0U8y4+tW+Y9j3g7ymrAwp8+wa7+gWPsqDh5YETET49LXpGciMDm/B+6qLXzAJskYbNePcImKkVLFgEhD91BA==","deviceSignature":"2SUXPwPCv96GY59Z4ZaI7GY27zpHzzLJHWS0CkdpUG8xVLnT+N4bcMVkHQSqhOm58XbDvrCiIfKENSBjlJjKgg=="},"signalIdentities":[{"identifier":{"name":"254710772666:87@s.whatsapp.net","deviceId":0},"identifierKey":{"type":"Buffer","data":"BZfirjED0vtgeounwUZUEg954U6YDlsrW+Si2k0QK/Ft"}}],"platform":"smba","lastAccountSyncTimestamp":1720586906,"myAppStateKeyId":"AAAAAAKa"} -------------------------------------------------------------------------------- /auth/mr: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bdd/Mr: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bdd/alive.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "alive" avec une colonne "id" 22 | const creerTableAlive = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS alive ( 26 | id serial PRIMARY KEY, 27 | message text, 28 | lien text 29 | ); 30 | `); 31 | console.log("La table 'alive' a été créée avec succès."); 32 | } catch (e) { 33 | console.error("Une erreur est survenue lors de la création de la table 'alive':", e); 34 | } 35 | }; 36 | 37 | // Appelez la méthode pour créer la table "alive" 38 | creerTableAlive(); 39 | 40 | // Fonction pour ajouter ou mettre à jour un enregistrement dans la table "alive" 41 | async function addOrUpdateDataInAlive(message, lien) { 42 | const client = await pool.connect(); 43 | try { 44 | // Insérez ou mettez à jour les données dans la table "alive" 45 | const query = ` 46 | INSERT INTO alive (id, message, lien) 47 | VALUES (1, $1, $2) 48 | ON CONFLICT (id) 49 | DO UPDATE SET message = excluded.message, lien = excluded.lien; 50 | `; 51 | const values = [message, lien]; 52 | 53 | await client.query(query, values); 54 | console.log("Données ajoutées ou mises à jour dans la table 'alive' avec succès."); 55 | } catch (error) { 56 | console.error("Erreur lors de l'ajout ou de la mise à jour des données dans la table 'alive':", error); 57 | } finally { 58 | client.release(); 59 | } 60 | }; 61 | 62 | 63 | async function getDataFromAlive() { 64 | const client = await pool.connect(); 65 | try { 66 | // Exécutez la requête SELECT pour récupérer les données 67 | const query = "SELECT message, lien FROM alive WHERE id = 1"; 68 | const result = await client.query(query); 69 | 70 | if (result.rows.length > 0) { 71 | const { message, lien } = result.rows[0]; 72 | return { message, lien }; 73 | } else { 74 | console.log("Aucune donnée trouvée dans la table 'alive'."); 75 | return null; 76 | } 77 | } catch (error) { 78 | console.error("Erreur lors de la récupération des données depuis la table 'alive':", error); 79 | return null; 80 | } finally { 81 | client.release(); 82 | } 83 | }; 84 | 85 | 86 | 87 | 88 | module.exports = { 89 | addOrUpdateDataInAlive, 90 | getDataFromAlive, 91 | 92 | }; 93 | -------------------------------------------------------------------------------- /bdd/antibot.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const { Pool } = require("pg"); 3 | let s =require("../set") 4 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 5 | 6 | const proConfig = { 7 | connectionString:dbUrl , 8 | ssl: { 9 | rejectUnauthorized: false, 10 | }, 11 | }; 12 | 13 | const pool = new Pool(proConfig); 14 | 15 | 16 | // Fonction pour créer la table "antibot" 17 | async function createAntibotTable() { 18 | const client = await pool.connect(); 19 | try { 20 | // Exécutez une requête SQL pour créer la table "antibot" si elle n'existe pas déjà 21 | await client.query(` 22 | CREATE TABLE IF NOT EXISTS antibot ( 23 | jid text PRIMARY KEY, 24 | etat text, 25 | action text 26 | ); 27 | `); 28 | console.log("La table 'antibot' a été créée avec succès."); 29 | } catch (error) { 30 | console.error("Une erreur est survenue lors de la création de la table 'antibot':", error); 31 | } finally { 32 | client.release(); 33 | } 34 | } 35 | 36 | // Appelez la méthode pour créer la table "antibot" 37 | createAntibotTable(); 38 | 39 | 40 | 41 | async function atbajouterOuMettreAJourJid(jid, etat) { 42 | const client = await pool.connect(); 43 | 44 | try { 45 | // Vérifiez si le jid existe déjà dans la table 'antilien' 46 | const result = await client.query('SELECT * FROM antibot WHERE jid = $1', [jid]); 47 | const jidExiste = result.rows.length > 0; 48 | 49 | if (jidExiste) { 50 | // Si le jid existe, mettez à jour l'état avec la valeur passée en argument 51 | await client.query('UPDATE antibot SET etat = $1 WHERE jid = $2', [etat, jid]); 52 | } else { 53 | // Si le jid n'existe pas, ajoutez-le avec l'état passé en argument et l'action 'supp' par défaut 54 | await client.query('INSERT INTO antibot (jid, etat, action) VALUES ($1, $2, $3)', [jid, etat, 'supp']); 55 | } 56 | 57 | console.log(`JID ${jid} ajouté ou mis à jour avec succès dans la table 'antibot'.`); 58 | } catch (error) { 59 | console.error('Erreur lors de l\'ajout ou de la mise à jour du JID dans la table ,', error); 60 | } finally { 61 | client.release(); 62 | } 63 | }; 64 | 65 | 66 | async function atbmettreAJourAction(jid, action) { 67 | const client = await pool.connect(); 68 | 69 | try { 70 | // Vérifiez si le jid existe déjà dans la table 'antilien' 71 | const result = await client.query('SELECT * FROM antibot WHERE jid = $1', [jid]); 72 | const jidExiste = result.rows.length > 0; 73 | 74 | if (jidExiste) { 75 | // Si le jid existe, mettez à jour l'action avec la valeur fournie (et laissez l'état inchangé) 76 | await client.query('UPDATE antibot SET action = $1 WHERE jid = $2', [action, jid]); 77 | } else { 78 | // Si le jid n'existe pas, ajoutez-le avec l'état 'non' par défaut et l'action fournie 79 | await client.query('INSERT INTO antibot (jid, etat, action) VALUES ($1, $2, $3)', [jid, 'non', action]); 80 | } 81 | 82 | console.log(`Action mise à jour avec succès pour le JID ${jid} dans la table 'antibot'.`); 83 | } catch (error) { 84 | console.error('Erreur lors de la mise à jour de l\'action pour le JID dans la table :', error); 85 | } finally { 86 | client.release(); 87 | } 88 | }; 89 | 90 | 91 | 92 | async function atbverifierEtatJid(jid) { 93 | const client = await pool.connect(); 94 | 95 | try { 96 | // Recherchez le JID dans la table 'antilien' et récupérez son état 97 | const result = await client.query('SELECT etat FROM antibot WHERE jid = $1', [jid]); 98 | 99 | if (result.rows.length > 0) { 100 | const etat = result.rows[0].etat; 101 | return etat === 'oui'; 102 | } else { 103 | // Si le JID n'existe pas dans la table, il n'est pas enregistré comme "oui" 104 | return false; 105 | } 106 | } catch (error) { 107 | console.error('Erreur lors de la vérification de l\'état du JID dans la table ', error); 108 | return false; 109 | } finally { 110 | client.release(); 111 | } 112 | }; 113 | 114 | async function atbrecupererActionJid(jid) { 115 | const client = await pool.connect(); 116 | 117 | try { 118 | // Recherchez le JID dans la table 'antilien' et récupérez son action 119 | const result = await client.query('SELECT action FROM antibot WHERE jid = $1', [jid]); 120 | 121 | if (result.rows.length > 0) { 122 | const action = result.rows[0].action; 123 | return action; 124 | } else { 125 | // Si le JID n'existe pas dans la table, retournez une valeur par défaut (par exemple, 'supp') 126 | return 'supp'; 127 | } 128 | } catch (error) { 129 | console.error('Erreur lors de la récupération de l\'action du JID dans la table :', error); 130 | return 'supp'; // Gestion de l'erreur en retournant une valeur par défaut 131 | } finally { 132 | client.release(); 133 | } 134 | }; 135 | 136 | 137 | 138 | 139 | 140 | module.exports = { 141 | atbmettreAJourAction, 142 | atbajouterOuMettreAJourJid, 143 | atbverifierEtatJid, 144 | atbrecupererActionJid, 145 | }; 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /bdd/antilien.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const { Pool } = require("pg"); 3 | let s =require("../set") 4 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 5 | 6 | const proConfig = { 7 | connectionString:dbUrl , 8 | ssl: { 9 | rejectUnauthorized: false, 10 | }, 11 | }; 12 | 13 | const pool = new Pool(proConfig); 14 | 15 | 16 | // Fonction pour créer la table "antilien" 17 | async function createAntilienTable() { 18 | const client = await pool.connect(); 19 | try { 20 | // Exécutez une requête SQL pour créer la table "antilien" si elle n'existe pas déjà 21 | await client.query(` 22 | CREATE TABLE IF NOT EXISTS antilien ( 23 | jid text PRIMARY KEY, 24 | etat text, 25 | action text 26 | ); 27 | `); 28 | console.log("La table 'antilien' a été créée avec succès."); 29 | } catch (error) { 30 | console.error("Une erreur est survenue lors de la création de la table 'antilien':", error); 31 | } finally { 32 | client.release(); 33 | } 34 | } 35 | 36 | // Appelez la méthode pour créer la table "antilien" 37 | createAntilienTable(); 38 | 39 | 40 | 41 | async function ajouterOuMettreAJourJid(jid, etat) { 42 | const client = await pool.connect(); 43 | 44 | try { 45 | // Vérifiez si le jid existe déjà dans la table 'antilien' 46 | const result = await client.query('SELECT * FROM antilien WHERE jid = $1', [jid]); 47 | const jidExiste = result.rows.length > 0; 48 | 49 | if (jidExiste) { 50 | // Si le jid existe, mettez à jour l'état avec la valeur passée en argument 51 | await client.query('UPDATE antilien SET etat = $1 WHERE jid = $2', [etat, jid]); 52 | } else { 53 | // Si le jid n'existe pas, ajoutez-le avec l'état passé en argument et l'action 'supp' par défaut 54 | await client.query('INSERT INTO antilien (jid, etat, action) VALUES ($1, $2, $3)', [jid, etat, 'supp']); 55 | } 56 | 57 | console.log(`JID ${jid} ajouté ou mis à jour avec succès dans la table 'antilien'.`); 58 | } catch (error) { 59 | console.error('Erreur lors de l\'ajout ou de la mise à jour du JID dans la table ,', error); 60 | } finally { 61 | client.release(); 62 | } 63 | }; 64 | 65 | 66 | async function mettreAJourAction(jid, action) { 67 | const client = await pool.connect(); 68 | 69 | try { 70 | // Vérifiez si le jid existe déjà dans la table 'antilien' 71 | const result = await client.query('SELECT * FROM antilien WHERE jid = $1', [jid]); 72 | const jidExiste = result.rows.length > 0; 73 | 74 | if (jidExiste) { 75 | // Si le jid existe, mettez à jour l'action avec la valeur fournie (et laissez l'état inchangé) 76 | await client.query('UPDATE antilien SET action = $1 WHERE jid = $2', [action, jid]); 77 | } else { 78 | // Si le jid n'existe pas, ajoutez-le avec l'état 'non' par défaut et l'action fournie 79 | await client.query('INSERT INTO antilien (jid, etat, action) VALUES ($1, $2, $3)', [jid, 'non', action]); 80 | } 81 | 82 | console.log(`Action mise à jour avec succès pour le JID ${jid} dans la table 'antilien'.`); 83 | } catch (error) { 84 | console.error('Erreur lors de la mise à jour de l\'action pour le JID dans la table :', error); 85 | } finally { 86 | client.release(); 87 | } 88 | }; 89 | 90 | 91 | 92 | async function verifierEtatJid(jid) { 93 | const client = await pool.connect(); 94 | 95 | try { 96 | // Recherchez le JID dans la table 'antilien' et récupérez son état 97 | const result = await client.query('SELECT etat FROM antilien WHERE jid = $1', [jid]); 98 | 99 | if (result.rows.length > 0) { 100 | const etat = result.rows[0].etat; 101 | return etat === 'oui'; 102 | } else { 103 | // Si le JID n'existe pas dans la table, il n'est pas enregistré comme "oui" 104 | return false; 105 | } 106 | } catch (error) { 107 | console.error('Erreur lors de la vérification de l\'état du JID dans la table ', error); 108 | return false; 109 | } finally { 110 | client.release(); 111 | } 112 | }; 113 | 114 | async function recupererActionJid(jid) { 115 | const client = await pool.connect(); 116 | 117 | try { 118 | // Recherchez le JID dans la table 'antilien' et récupérez son action 119 | const result = await client.query('SELECT action FROM antilien WHERE jid = $1', [jid]); 120 | 121 | if (result.rows.length > 0) { 122 | const action = result.rows[0].action; 123 | return action; 124 | } else { 125 | // Si le JID n'existe pas dans la table, retournez une valeur par défaut (par exemple, 'supp') 126 | return 'supp'; 127 | } 128 | } catch (error) { 129 | console.error('Erreur lors de la récupération de l\'action du JID dans la table :', error); 130 | return 'supp'; // Gestion de l'erreur en retournant une valeur par défaut 131 | } finally { 132 | client.release(); 133 | } 134 | }; 135 | 136 | 137 | 138 | 139 | 140 | module.exports = { 141 | mettreAJourAction, 142 | ajouterOuMettreAJourJid, 143 | verifierEtatJid, 144 | recupererActionJid, 145 | }; 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /bdd/banGroup.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "banGroup" 22 | const creerTableBanGroup = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS banGroup ( 26 | groupeJid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'banGroup' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'banGroup':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "banGroup" 36 | creerTableBanGroup(); 37 | 38 | // Fonction pour ajouter un groupe à la liste des groupes bannis 39 | async function addGroupToBanList(groupeJid) { 40 | const client = await pool.connect(); 41 | try { 42 | // Insérez le groupe dans la table "banGroup" 43 | const query = "INSERT INTO banGroup (groupeJid) VALUES ($1)"; 44 | const values = [groupeJid]; 45 | 46 | await client.query(query, values); 47 | console.log(`Groupe JID ${groupeJid} ajouté à la liste des groupes bannis.`); 48 | } catch (error) { 49 | console.error("Erreur lors de l'ajout du groupe banni :", error); 50 | } finally { 51 | client.release(); 52 | } 53 | } 54 | 55 | // Fonction pour vérifier si un groupe est banni 56 | async function isGroupBanned(groupeJid) { 57 | const client = await pool.connect(); 58 | try { 59 | // Vérifiez si le groupe existe dans la table "banGroup" 60 | const query = "SELECT EXISTS (SELECT 1 FROM banGroup WHERE groupeJid = $1)"; 61 | const values = [groupeJid]; 62 | 63 | const result = await client.query(query, values); 64 | return result.rows[0].exists; 65 | } catch (error) { 66 | console.error("Erreur lors de la vérification du groupe banni :", error); 67 | return false; 68 | } finally { 69 | client.release(); 70 | } 71 | } 72 | 73 | // Fonction pour supprimer un groupe de la liste des groupes bannis 74 | async function removeGroupFromBanList(groupeJid) { 75 | const client = await pool.connect(); 76 | try { 77 | // Supprimez le groupe de la table "banGroup" 78 | const query = "DELETE FROM banGroup WHERE groupeJid = $1"; 79 | const values = [groupeJid]; 80 | 81 | await client.query(query, values); 82 | console.log(`Groupe JID ${groupeJid} supprimé de la liste des groupes bannis.`); 83 | } catch (error) { 84 | console.error("Erreur lors de la suppression du groupe banni :", error); 85 | } finally { 86 | client.release(); 87 | } 88 | } 89 | 90 | module.exports = { 91 | addGroupToBanList, 92 | isGroupBanned, 93 | removeGroupFromBanList, 94 | }; 95 | -------------------------------------------------------------------------------- /bdd/banUser.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Vous pouvez maintenant utiliser 'pool' pour interagir avec votre base de données PostgreSQL. 22 | const creerTableBanUser = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS banUser ( 26 | jid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'banUser' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'banUser':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "banUser" 36 | creerTableBanUser(); 37 | 38 | 39 | 40 | // Fonction pour ajouter un utilisateur à la liste des bannis 41 | async function addUserToBanList(jid) { 42 | const client = await pool.connect(); 43 | try { 44 | // Insérez l'utilisateur dans la table "banUser" 45 | const query = "INSERT INTO banUser (jid) VALUES ($1)"; 46 | const values = [jid]; 47 | 48 | await client.query(query, values); 49 | console.log(`JID ${jid} ajouté à la liste des bannis.`); 50 | } catch (error) { 51 | console.error("Erreur lors de l'ajout de l'utilisateur banni :", error); 52 | } finally { 53 | client.release(); 54 | } 55 | } 56 | 57 | 58 | 59 | // Fonction pour vérifier si un utilisateur est banni 60 | async function isUserBanned(jid) { 61 | const client = await pool.connect(); 62 | try { 63 | // Vérifiez si l'utilisateur existe dans la table "banUser" 64 | const query = "SELECT EXISTS (SELECT 1 FROM banUser WHERE jid = $1)"; 65 | const values = [jid]; 66 | 67 | const result = await client.query(query, values); 68 | return result.rows[0].exists; 69 | } catch (error) { 70 | console.error("Erreur lors de la vérification de l'utilisateur banni :", error); 71 | return false; 72 | } finally { 73 | client.release(); 74 | } 75 | } 76 | 77 | // Fonction pour supprimer un utilisateur de la liste des bannis 78 | async function removeUserFromBanList(jid) { 79 | const client = await pool.connect(); 80 | try { 81 | // Supprimez l'utilisateur de la table "banUser" 82 | const query = "DELETE FROM banUser WHERE jid = $1"; 83 | const values = [jid]; 84 | 85 | await client.query(query, values); 86 | console.log(`JID ${jid} supprimé de la liste des bannis.`); 87 | } catch (error) { 88 | console.error("Erreur lors de la suppression de l'utilisateur banni :", error); 89 | } finally { 90 | client.release(); 91 | } 92 | } 93 | 94 | module.exports = { 95 | addUserToBanList, 96 | isUserBanned, 97 | removeUserFromBanList, 98 | }; 99 | -------------------------------------------------------------------------------- /bdd/cron.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const { Pool } = require("pg"); 3 | let s =require("../set"); 4 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 5 | 6 | const proConfig = { 7 | connectionString:dbUrl , 8 | ssl: { 9 | rejectUnauthorized: false, 10 | }, 11 | }; 12 | 13 | const pool = new Pool(proConfig); 14 | 15 | 16 | async function createTablecron() { 17 | 18 | const client = await pool.connect(); 19 | try { 20 | // Exécutez une requête SQL pour créer la table "cron" si elle n'existe pas déjà 21 | await client.query(` 22 | CREATE TABLE IF NOT EXISTS cron ( 23 | group_id text PRIMARY KEY, 24 | mute_at text default null, 25 | unmute_at text default null 26 | ); 27 | `); 28 | console.log("La table 'cron' a été créée avec succès."); 29 | } catch (error) { 30 | console.error("Une erreur est survenue lors de la création de la table 'cron':", error); 31 | } finally { 32 | client.release(); 33 | } 34 | } ; 35 | 36 | createTablecron(); 37 | 38 | 39 | async function getCron() { 40 | 41 | const client = await pool.connect(); 42 | try { 43 | 44 | const result = await client.query('SELECT * FROM cron'); 45 | return result.rows; 46 | } catch (error) { 47 | console.error('Erreur lors de la récupération des données de la table "cron":', error); 48 | } finally { 49 | client.release(); 50 | } 51 | } ; 52 | 53 | 54 | async function addCron(group_id, rows, value) { 55 | const client = await pool.connect(); 56 | 57 | try { 58 | 59 | let response = await client.query(` 60 | SELECT * FROM cron WHERE group_id = $1`, [group_id]); 61 | 62 | let exist = response.rows.length > 0 ; 63 | if (exist) { 64 | 65 | await client.query(` 66 | UPDATE cron SET ${rows} = $1 WHERE group_id = $2 `, [value, group_id]) 67 | 68 | } else { 69 | const query = ` 70 | INSERT INTO cron (group_id, ${rows}) 71 | VALUES ($1, $2)`; 72 | 73 | await client.query(query, [group_id, value]); 74 | } 75 | } catch (error) { 76 | console.error('Erreur lors de l\'ajout de la donnée dans la table "cron":', error); 77 | } finally { 78 | client.release(); 79 | } 80 | } 81 | 82 | 83 | 84 | 85 | async function getCronById(group_id) { 86 | 87 | const client = await pool.connect(); 88 | try { 89 | const result = await client.query('SELECT * FROM cron WHERE group_id = $1', [group_id]); 90 | return result.rows[0]; 91 | } catch (error) { 92 | console.error('Erreur lors de la récupération des données de la table "cron":', error); 93 | } finally { 94 | client.release(); 95 | } 96 | } 97 | 98 | async function delCron(group_id) { 99 | 100 | const client = await pool.connect(); 101 | try { 102 | await client.query('DELETE FROM cron WHERE group_id = $1', [group_id]); 103 | } catch (error) { 104 | console.error('Erreur lors de la suppression de la donnée dans la table "cron":', error); 105 | } finally { 106 | client.release(); 107 | } 108 | } 109 | 110 | module.exports = { 111 | getCron, 112 | addCron, 113 | delCron, 114 | getCronById, } -------------------------------------------------------------------------------- /bdd/hentai.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl = s.DATABASE_URL ? s.DATABASE_URL : "postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9"; 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "hentai" 22 | const creerTableHentai = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS hentai ( 26 | groupeJid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'hentai' avec 'groupeJid' comme clé primaire a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'hentai':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "hentai" avec 'groupeJid' comme clé primaire 36 | creerTableHentai(); 37 | 38 | // Fonction pour ajouter un groupe à la liste de hentai 39 | async function addToHentaiList(groupeJid) { 40 | const client = await pool.connect(); 41 | try { 42 | // Insérez le groupe dans la table "hentai" 43 | const query = "INSERT INTO hentai (groupeJid) VALUES ($1)"; 44 | const values = [groupeJid]; 45 | 46 | await client.query(query, values); 47 | console.log(`Le groupe JID ${groupeJid} a été ajouté à la liste de hentai.`); 48 | } catch (error) { 49 | console.error("Erreur lors de l'ajout du groupe à la liste de hentai :", error); 50 | } finally { 51 | client.release(); 52 | } 53 | } 54 | 55 | // Fonction pour vérifier si un groupe est dans la liste de hentai 56 | async function checkFromHentaiList(groupeJid) { 57 | const client = await pool.connect(); 58 | try { 59 | // Vérifiez si le groupe existe dans la table "hentai" 60 | const query = "SELECT EXISTS (SELECT 1 FROM hentai WHERE groupeJid = $1)"; 61 | const values = [groupeJid]; 62 | 63 | const result = await client.query(query, values); 64 | return result.rows[0].exists; 65 | } catch (error) { 66 | console.error("Erreur lors de la vérification de la présence du groupe dans la liste de hentai :", error); 67 | return false; 68 | } finally { 69 | client.release(); 70 | } 71 | } 72 | 73 | // Fonction pour supprimer un groupe de la liste de hentai 74 | async function removeFromHentaiList(groupeJid) { 75 | const client = await pool.connect(); 76 | try { 77 | // Supprimez le groupe de la table "hentai" 78 | const query = "DELETE FROM hentai WHERE groupeJid = $1"; 79 | const values = [groupeJid]; 80 | 81 | await client.query(query, values); 82 | console.log(`Le groupe JID ${groupeJid} a été supprimé de la liste de hentai.`); 83 | } catch (error) { 84 | console.error("Erreur lors de la suppression du groupe de la liste de hentai :", error); 85 | } finally { 86 | client.release(); 87 | } 88 | } 89 | 90 | module.exports = { 91 | addToHentaiList, 92 | checkFromHentaiList, 93 | removeFromHentaiList, 94 | }; 95 | -------------------------------------------------------------------------------- /bdd/level.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | 5 | const { Pool } = require("pg"); 6 | 7 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 8 | const s = require("../set"); 9 | 10 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 11 | const dbUrl = s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" ; 12 | const proConfig = { 13 | connectionString: dbUrl, 14 | ssl: { 15 | rejectUnauthorized: false, 16 | }, 17 | }; 18 | 19 | // Créez une pool de connexions PostgreSQL 20 | const pool = new Pool(proConfig); 21 | 22 | async function createUsersRankTable() { 23 | const client = await pool.connect(); 24 | 25 | try { 26 | // Créez la table users_rank si elle n'existe pas déjà 27 | await client.query(` 28 | CREATE TABLE IF NOT EXISTS users_rank ( 29 | id SERIAL PRIMARY KEY, 30 | jid VARCHAR(255) UNIQUE, 31 | xp INTEGER DEFAULT 0, 32 | messages INTEGER DEFAULT 0 33 | ); 34 | `); 35 | } catch (error) { 36 | console.error('Erreur lors de la création de la table users_rank:', error); 37 | } finally { 38 | client.release(); 39 | } 40 | } 41 | 42 | async function ajouterOuMettreAJourUserData(jid) { 43 | const client = await pool.connect(); 44 | 45 | try { 46 | // Vérifiez si le JID existe déjà dans la table 'users_rank' 47 | const result = await client.query('SELECT * FROM users_rank WHERE jid = $1', [jid]); 48 | const jidExiste = result.rows.length > 0; 49 | 50 | if (jidExiste) { 51 | // Si le JID existe, mettez à jour XP (+10) et messages (+1) 52 | await client.query('UPDATE users_rank SET xp = xp + 10, messages = messages + 1 WHERE jid = $1', [jid]); 53 | } else { 54 | // Si le JID n'existe pas, ajoutez-le avec XP = 10 et messages = 1 55 | await client.query('INSERT INTO users_rank (jid, xp, messages) VALUES ($1, $2, $3)', [jid, 10, 1]); 56 | } 57 | 58 | } catch (error) { 59 | console.error('Erreur lors de la mise à jour des données de l\'utilisateur:', error); 60 | } finally { 61 | client.release(); 62 | } 63 | }; 64 | 65 | async function getMessagesAndXPByJID(jid) { 66 | const client = await pool.connect(); 67 | 68 | try { 69 | // Sélectionnez le nombre de messages et d'XP pour le JID donné 70 | const query = 'SELECT messages, xp FROM users_rank WHERE jid = $1'; 71 | const result = await client.query(query, [jid]); 72 | 73 | if (result.rows.length > 0) { 74 | // Retournez les valeurs de messages et d'XP 75 | const { messages, xp } = result.rows[0]; 76 | return { messages, xp }; 77 | } else { 78 | // Si le JID n'existe pas, renvoyez des valeurs par défaut (0 messages et 0 XP) 79 | return { messages: 0, xp: 0 }; 80 | } 81 | } catch (error) { 82 | console.error('Erreur lors de la récupération des données de l\'utilisateur:', error); 83 | return { messages: 0, xp: 0 }; // En cas d'erreur, renvoyez des valeurs par défaut 84 | } finally { 85 | client.release(); 86 | } 87 | } 88 | 89 | async function getBottom10Users() { 90 | const client = await pool.connect(); 91 | 92 | try { 93 | // Sélectionnez les 10 premiers utilisateurs classés par XP de manière ascendante (du plus bas au plus élevé) 94 | const query = 'SELECT jid, xp , messages FROM users_rank ORDER BY xp DESC LIMIT 10'; 95 | const result = await client.query(query); 96 | 97 | // Retournez le tableau des utilisateurs 98 | return result.rows; 99 | } catch (error) { 100 | console.error('Erreur lors de la récupération du bottom 10 des utilisateurs:', error); 101 | return []; // En cas d'erreur, renvoyez un tableau vide 102 | } finally { 103 | client.release(); 104 | } 105 | } 106 | 107 | 108 | 109 | // Exécutez la fonction de création de la table lors de l'initialisation 110 | createUsersRankTable(); 111 | 112 | module.exports = { 113 | ajouterOuMettreAJourUserData, 114 | getMessagesAndXPByJID, 115 | getBottom10Users, 116 | }; 117 | -------------------------------------------------------------------------------- /bdd/mention.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "alive" avec une colonne "id" 22 | 23 | async function creerTableMention() { 24 | const client = await pool.connect(); 25 | try { 26 | await client.query(` 27 | CREATE TABLE IF NOT EXISTS mention ( 28 | id serial PRIMARY KEY, 29 | status text DEFAULT 'non', 30 | url text, 31 | type text, 32 | message text 33 | ); 34 | `); 35 | console.log("La table 'mention' a été créée avec succès."); 36 | } catch (e) { 37 | console.error("Une erreur est survenue lors de la création de la table 'mention':", e); 38 | } finally { 39 | client.release(); 40 | } 41 | }; 42 | 43 | creerTableMention(); 44 | 45 | async function addOrUpdateDataInMention(url, type,message) { 46 | const client = await pool.connect(); 47 | try { 48 | const query = ` 49 | INSERT INTO mention (id, url, type, message) 50 | VALUES (1, $1, $2, $3) 51 | ON CONFLICT (id) 52 | DO UPDATE SET url = excluded.url, type = excluded.type , message = excluded.message; 53 | `; 54 | const values = [url, type,message]; 55 | 56 | await client.query(query, values); 57 | console.log("Données ajoutées ou mises à jour dans la table 'mention' avec succès."); 58 | } catch (error) { 59 | console.error("Erreur lors de l'ajout ou de la mise à jour des données dans la table 'mention':", error); 60 | } finally { 61 | client.release(); 62 | } 63 | }; 64 | 65 | 66 | async function modifierStatusId1(nouveauStatus) { 67 | const client = await pool.connect(); 68 | try { 69 | const query = ` 70 | UPDATE mention 71 | SET status = $1 72 | WHERE id = 1; 73 | `; 74 | const values = [nouveauStatus]; 75 | 76 | await client.query(query, values); 77 | console.log("Le status a été modifié avec succès pour l'ID 1 dans la table 'mention'."); 78 | } catch (error) { 79 | console.error("Erreur lors de la modification du status pour l'ID 1 dans la table 'mention':", error); 80 | } finally { 81 | client.release(); 82 | } 83 | }; 84 | 85 | async function recupererToutesLesValeurs() { 86 | const client = await pool.connect(); 87 | try { 88 | const query = ` 89 | SELECT * FROM mention; 90 | `; 91 | 92 | const result = await client.query(query); 93 | console.log("Voici toutes les valeurs de la table 'mention':", result.rows); 94 | return result.rows; 95 | } catch (error) { 96 | console.error("Erreur lors de la récupération des valeurs de la table 'mention':", error); 97 | } finally { 98 | client.release(); 99 | } 100 | }; 101 | 102 | module.exports = { 103 | addOrUpdateDataInMention, 104 | recupererToutesLesValeurs, 105 | modifierStatusId1, 106 | } 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /bdd/onlyAdmin.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "onlyAdmin" 22 | const creerTableOnlyAdmin = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS onlyAdmin ( 26 | groupeJid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'onlyAdmin' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'onlyAdmin':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "onlyAdmin" 36 | creerTableOnlyAdmin(); 37 | 38 | // Fonction pour ajouter un groupe à la liste des groupes autorisés uniquement aux administrateurs 39 | async function addGroupToOnlyAdminList(groupeJid) { 40 | const client = await pool.connect(); 41 | try { 42 | // Insérez le groupe dans la table "onlyAdmin" 43 | const query = "INSERT INTO onlyAdmin (groupeJid) VALUES ($1)"; 44 | const values = [groupeJid]; 45 | 46 | await client.query(query, values); 47 | console.log(`Groupe JID ${groupeJid} ajouté à la liste des groupes onlyAdmin.`); 48 | } catch (error) { 49 | console.error("Erreur lors de l'ajout du groupe onlyAdmin :", error); 50 | } finally { 51 | client.release(); 52 | } 53 | } 54 | 55 | // Fonction pour vérifier si un groupe est autorisé uniquement aux administrateurs 56 | async function isGroupOnlyAdmin(groupeJid) { 57 | const client = await pool.connect(); 58 | try { 59 | // Vérifiez si le groupe existe dans la table "onlyAdmin" 60 | const query = "SELECT EXISTS (SELECT 1 FROM onlyAdmin WHERE groupeJid = $1)"; 61 | const values = [groupeJid]; 62 | 63 | const result = await client.query(query, values); 64 | return result.rows[0].exists; 65 | } catch (error) { 66 | console.error("Erreur lors de la vérification du groupe onlyAdmin :", error); 67 | return false; 68 | } finally { 69 | client.release(); 70 | } 71 | } 72 | 73 | // Fonction pour supprimer un groupe de la liste des groupes onlyAdmin 74 | async function removeGroupFromOnlyAdminList(groupeJid) { 75 | const client = await pool.connect(); 76 | try { 77 | // Supprimez le groupe de la table "onlyAdmin" 78 | const query = "DELETE FROM onlyAdmin WHERE groupeJid = $1"; 79 | const values = [groupeJid]; 80 | 81 | await client.query(query, values); 82 | console.log(`Groupe JID ${groupeJid} supprimé de la liste des groupes onlyAdmin.`); 83 | } catch (error) { 84 | console.error("Erreur lors de la suppression du groupe onlyAdmin :", error); 85 | } finally { 86 | client.release(); 87 | } 88 | } 89 | 90 | module.exports = { 91 | addGroupToOnlyAdminList, 92 | isGroupOnlyAdmin, 93 | removeGroupFromOnlyAdminList, 94 | }; 95 | -------------------------------------------------------------------------------- /bdd/stickcmd.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | 19 | const pool = new Pool(proConfig); 20 | 21 | async function creerTableStickcmd() { 22 | try { 23 | await pool.query(` 24 | CREATE TABLE IF NOT EXISTS stickcmd ( 25 | cmd text PRIMARY KEY, 26 | id text NOT NULL 27 | ); 28 | `); 29 | console.log("La table 'stickcmd' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'stickcmd':", e); 32 | } 33 | } 34 | 35 | creerTableStickcmd(); 36 | 37 | async function addstickcmd(cmd, id) { 38 | let client; 39 | try { 40 | client = await pool.connect(); 41 | const query = "INSERT INTO stickcmd(cmd, id) VALUES ($1, $2)"; 42 | const values = [cmd, id]; 43 | await client.query(query, values); 44 | } catch (error) { 45 | console.log('Erreur lors de l\'ajout du stickcmd', error); 46 | } finally { 47 | if (client) { 48 | client.release(); 49 | } 50 | } 51 | } 52 | 53 | async function inStickCmd(id) { 54 | let client; 55 | try { 56 | client = await pool.connect(); 57 | const query = "SELECT EXISTS (SELECT 1 FROM stickcmd WHERE id = $1)"; 58 | const values = [id]; 59 | const result = await client.query(query, values); 60 | return result.rows[0].exists; 61 | } catch (error) { 62 | return false; 63 | } finally { 64 | if (client) { 65 | client.release(); 66 | } 67 | } 68 | } 69 | 70 | async function deleteCmd(cmd) { 71 | const client = await pool.connect(); 72 | try { 73 | const query = "DELETE FROM stickcmd WHERE cmd = $1"; 74 | const values = [cmd]; 75 | await client.query(query, values); 76 | console.log(`Le stickcmd ${cmd} a été supprimé de la liste.`); 77 | } catch (error) { 78 | console.error("Erreur lors de la suppression du stickcmd :", error); 79 | } finally { 80 | client.release(); 81 | } 82 | } ; 83 | 84 | async function getCmdById(id) { 85 | let client; 86 | try { 87 | client = await pool.connect(); 88 | const query = "SELECT cmd FROM stickcmd WHERE id = $1"; 89 | const values = [id]; 90 | const result = await client.query(query, values); 91 | 92 | if (result.rows.length > 0) { 93 | return result.rows[0].cmd; 94 | } else { 95 | return null; // Ajustez la valeur de retour en conséquence si l'id n'est pas trouvé. 96 | } 97 | } catch (error) { 98 | console.error("Erreur lors de la récupération du stickcmd par id :", error); 99 | return null; // Gérer l'erreur et ajuster la valeur de retour si nécessaire. 100 | } finally { 101 | if (client) { 102 | client.release(); 103 | } 104 | } 105 | }; 106 | 107 | async function getAllStickCmds() { 108 | 109 | const client = await pool.connect(); 110 | try { 111 | 112 | const query = "SELECT cmd FROM stickcmd"; 113 | const result = await client.query(query); 114 | return result.rows; 115 | } catch (error) { 116 | console.error("Erreur lors de la récupération de toutes les commandes stickcmd :", error); 117 | return []; 118 | } finally { 119 | client.release(); 120 | } 121 | } ; 122 | 123 | 124 | 125 | 126 | 127 | module.exports = { 128 | 129 | addstickcmd, 130 | deleteCmd, 131 | getCmdById, 132 | inStickCmd, 133 | getAllStickCmds, 134 | } -------------------------------------------------------------------------------- /bdd/sudo.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | const pool = new Pool(proConfig); 19 | 20 | // Fonction pour créer la table "sudo" 21 | async function createSudoTable() { 22 | const client = await pool.connect(); 23 | try { 24 | // Exécutez une requête SQL pour créer la table "sudo" si elle n'existe pas déjà 25 | await client.query(` 26 | CREATE TABLE IF NOT EXISTS sudo ( 27 | id serial PRIMARY KEY, 28 | jid text NOT NULL 29 | ); 30 | `); 31 | console.log("La table 'sudo' a été créée avec succès."); 32 | } catch (error) { 33 | console.error("Une erreur est survenue lors de la création de la table 'sudo':", error); 34 | } finally { 35 | client.release(); 36 | } 37 | } 38 | 39 | // Appelez la méthode pour créer la table "sudo" 40 | createSudoTable(); 41 | 42 | 43 | // Fonction pour vérifier si un groupe est banni 44 | async function issudo(jid) { 45 | const client = await pool.connect(); 46 | try { 47 | // Vérifiez si le groupe existe dans la table "banGroup" 48 | const query = "SELECT EXISTS (SELECT 1 FROM sudo WHERE jid = $1)"; 49 | const values = [jid]; 50 | 51 | const result = await client.query(query, values); 52 | return result.rows[0].exists; 53 | } catch (error) { 54 | console.error("Erreur lors de la vérification du groupe banni :", error); 55 | return false; 56 | } finally { 57 | client.release(); 58 | } 59 | } 60 | 61 | // Fonction pour supprimer un groupe de la liste des groupes bannis 62 | async function removeSudoNumber(jid) { 63 | const client = await pool.connect(); 64 | try { 65 | // Supprimez le numéro de téléphone de la table "sudo" 66 | const query = "DELETE FROM sudo WHERE jid = $1"; 67 | const values = [jid]; 68 | 69 | await client.query(query, values); 70 | console.log(`Numéro de téléphone ${jid} supprimé de la liste des numéros de téléphone autorisés.`); 71 | } catch (error) { 72 | console.error("Erreur lors de la suppression du numéro de téléphone autorisé :", error); 73 | } finally { 74 | client.release(); 75 | } 76 | } 77 | 78 | async function addSudoNumber(jid) { 79 | const client = await pool.connect(); 80 | try { 81 | // Insérez le numéro de téléphone dans la table "sudo" 82 | const query = "INSERT INTO sudo (jid) VALUES ($1)"; 83 | const values = [jid]; 84 | 85 | await client.query(query, values); 86 | console.log(`Numéro de téléphone ${jid} ajouté à la liste des numéros de téléphone autorisés.`); 87 | } catch (error) { 88 | console.error("Erreur lors de l'ajout du numéro de téléphone autorisé :", error); 89 | } finally { 90 | client.release(); 91 | } 92 | } 93 | 94 | async function getAllSudoNumbers() { 95 | const client = await pool.connect(); 96 | try { 97 | // Sélectionnez tous les numéros de téléphone de la table "sudo" 98 | const query = "SELECT jid FROM sudo"; 99 | const result = await client.query(query); 100 | 101 | // Créez un tableau des numéros de téléphone 102 | const sudoNumbers = result.rows.map((row) => row.jid); 103 | 104 | return sudoNumbers; 105 | } catch (error) { 106 | console.error("Erreur lors de la récupération des numéros de téléphone autorisés :", error); 107 | return []; 108 | } finally { 109 | client.release(); 110 | } 111 | } 112 | 113 | async function isSudoTableNotEmpty() { 114 | const client = await pool.connect(); 115 | 116 | try { 117 | // Exécutez une requête SQL pour compter le nombre de lignes dans la table "sudo" 118 | const result = await client.query('SELECT COUNT(*) FROM sudo'); 119 | 120 | // Récupérez la valeur du compteur (nombre de lignes) 121 | const rowCount = parseInt(result.rows[0].count); 122 | 123 | // Si le nombre de lignes est supérieur à zéro, la table n'est pas vide 124 | return rowCount > 0; 125 | } catch (error) { 126 | console.error('Erreur lors de la vérification de la table "sudo" :', error); 127 | return false; // En cas d'erreur, considérez la table comme vide 128 | } finally { 129 | client.release(); 130 | } 131 | }; 132 | 133 | 134 | 135 | 136 | module.exports = { 137 | issudo, 138 | addSudoNumber, 139 | removeSudoNumber, 140 | getAllSudoNumbers, 141 | isSudoTableNotEmpty 142 | }; 143 | 144 | -------------------------------------------------------------------------------- /bdd/warn.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | async function creerTableWarnUsers() { 22 | const client = await pool.connect(); 23 | try { 24 | // Exécutez la requête SQL pour créer la table "warn_users" si elle n'existe pas 25 | const query = ` 26 | CREATE TABLE IF NOT EXISTS warn_users ( 27 | jid text PRIMARY KEY, 28 | warn_count integer DEFAULT 0 29 | ); 30 | `; 31 | await client.query(query); 32 | console.log("La table 'warn_users' a été créée avec succès."); 33 | } catch (error) { 34 | console.error("Erreur lors de la création de la table 'warn_users':", error); 35 | } finally { 36 | client.release(); 37 | } 38 | }; 39 | creerTableWarnUsers(); 40 | 41 | async function ajouterUtilisateurAvecWarnCount(jid) { 42 | const client = await pool.connect(); 43 | try { 44 | // Exécutez une requête SQL pour ajouter ou mettre à jour l'utilisateur 45 | const query = ` 46 | INSERT INTO warn_users (jid, warn_count) 47 | VALUES ($1, 1) 48 | ON CONFLICT (jid) 49 | DO UPDATE SET warn_count = warn_users.warn_count + 1; 50 | `; 51 | const values = [jid]; 52 | 53 | await client.query(query, values); 54 | console.log(`Utilisateur ${jid} ajouté ou mis à jour avec un warn_count de 1.`); 55 | } catch (error) { 56 | console.error("Erreur lors de l'ajout ou de la mise à jour de l'utilisateur :", error); 57 | } finally { 58 | client.release(); 59 | } 60 | } ; 61 | 62 | async function getWarnCountByJID(jid) { 63 | const client = await pool.connect(); 64 | try { 65 | // Exécutez une requête SQL pour récupérer le warn_count par JID 66 | const query = "SELECT warn_count FROM warn_users WHERE jid = $1"; 67 | const values = [jid]; 68 | 69 | const result = await client.query(query, values); 70 | if (result.rows.length > 0) { 71 | const warnCount = result.rows[0].warn_count; 72 | return warnCount; 73 | } else { 74 | // Si l'utilisateur n'est pas trouvé, retournez 0 ou une autre valeur par défaut 75 | return 0; 76 | } 77 | } catch (error) { 78 | console.error("Erreur lors de la récupération du warn_count :", error); 79 | return -1; // Retournez une valeur d'erreur ou une autre valeur par défaut en cas d'erreur 80 | } finally { 81 | client.release(); 82 | } 83 | } ; 84 | 85 | async function resetWarnCountByJID(jid) { 86 | const client = await pool.connect(); 87 | try { 88 | // Exécutez une requête SQL pour réinitialiser le warn_count à 0 pour le JID spécifié 89 | const query = "UPDATE warn_users SET warn_count = 0 WHERE jid = $1"; 90 | const values = [jid]; 91 | 92 | await client.query(query, values); 93 | console.log(`Le warn_count de l'utilisateur ${jid} a été réinitialisé à 0.`); 94 | } catch (error) { 95 | console.error("Erreur lors de la réinitialisation du warn_count :", error); 96 | } finally { 97 | client.release(); 98 | } 99 | } 100 | 101 | 102 | 103 | 104 | module.exports = { 105 | ajouterUtilisateurAvecWarnCount, 106 | getWarnCountByJID, 107 | resetWarnCountByJID, 108 | }; 109 | -------------------------------------------------------------------------------- /bdd/welcome.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Vous pouvez maintenant utiliser 'pool' pour interagir avec votre base de données PostgreSQL. 22 | const creerTableevents = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS events ( 26 | Id serial PRIMARY KEY, 27 | jid text UNIQUE, 28 | welcome text DEFAULT 'non', 29 | goodbye text DEFAULT 'non', 30 | antipromote text DEFAULT 'non', 31 | antidemote text DEFAULT 'non' 32 | ); 33 | `); 34 | console.log("La table 'events' a été créée avec succès."); 35 | } catch (e) { 36 | console.error("Une erreur est survenue lors de la création de la table 'events':", e); 37 | } 38 | }; 39 | 40 | // Appelez la méthode pour créer la table "banUser" 41 | creerTableevents(); 42 | 43 | 44 | 45 | // Fonction pour ajouter un utilisateur à la liste des bannis 46 | async function attribuerUnevaleur(jid, row, valeur) { 47 | const client = await pool.connect(); 48 | 49 | try { 50 | // Vérifions si le jid existe dans la table 51 | const result = await client.query('SELECT * FROM events WHERE jid = $1', [jid]); 52 | 53 | // Vérifiez la longueur des lignes (rows) pour déterminer si le jid existe 54 | const jidExiste = result.rows.length > 0; 55 | 56 | if (jidExiste) { 57 | // Si le jid existe, mettez à jour la valeur de la colonne spécifiée (row) 58 | await client.query(`UPDATE events SET ${row} = $1 WHERE jid = $2`, [valeur, jid]); 59 | console.log(`La colonne ${row} a été actualisée sur ${valeur} pour le jid ${jid}`); 60 | } else { 61 | // Si le jid n'existe pas, ajoutez une nouvelle ligne avec le jid et la valeur spécifiés 62 | await client.query(`INSERT INTO events (jid, ${row}) VALUES ($1, $2)`, [jid, valeur]); 63 | console.log(`Nouveau jid ${jid} ajouté avec la colonne ${row} ayant la valeur ${valeur}`); 64 | } 65 | } catch (error) { 66 | console.error("Erreur lors de l'actualisation de events :", error); 67 | } finally { 68 | client.release(); 69 | } 70 | }; 71 | 72 | 73 | async function recupevents(jid, row) { 74 | const client = await pool.connect() 75 | try { 76 | const result = await client.query('SELECT ' + row + ' FROM events WHERE jid = $1', [jid]); 77 | const jidExists = result.rows.length > 0; 78 | 79 | if (jidExists) { 80 | return result.rows[0][row]; 81 | } else { 82 | return 'non'; 83 | } 84 | } catch (e) { 85 | console.error(e); 86 | } finally { 87 | client.release(); 88 | } 89 | } 90 | 91 | 92 | 93 | module.exports = { 94 | attribuerUnevaleur, 95 | recupevents, 96 | }; 97 | -------------------------------------------------------------------------------- /commandes/Answer.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require('../framework/zokou'); 2 | const traduire = require("../framework/traduction") ; 3 | const { default: axios } = require('axios'); 4 | //const conf = require('../set'); 5 | 6 | 7 | 8 | 9 | zokou({nomCom:"mustaffa",reaction:"📡",categorie:"IA"},async(dest,zk,commandeOptions)=>{ 10 | 11 | const {repondre,ms,arg}=commandeOptions; 12 | 13 | if(!arg || !arg[0]) 14 | {return repondre("HI IF YOU ARE A GIRL JAMES LOVES YOU👌😘❤️❤️.")} 15 | //var quest = arg.join(' '); 16 | try{ 17 | 18 | 19 | const message = await traduire(arg.join(' '),{ to : 'en'}); 20 | console.log(message) 21 | fetch(`http://api.brainshop.ai/get?bid=177607&key=NwzhALqeO1kubFVD&uid=[uid]&msg=${message}`) 22 | .then(response => response.json()) 23 | .then(data => { 24 | const botResponse = data.cnt; 25 | console.log(botResponse); 26 | 27 | traduire(botResponse, { to: 'en' }) 28 | .then(translatedResponse => { 29 | repondre(translatedResponse); 30 | }) 31 | .catch(error => { 32 | console.error('Error when translating into French :', error); 33 | repondre('Error when translating into French'); 34 | }); 35 | }) 36 | .catch(error => { 37 | console.error('Error requesting BrainShop :', error); 38 | repondre('Error requesting BrainShop'); 39 | }); 40 | 41 | }catch(e){ repondre("oops an error : "+e)} 42 | 43 | 44 | }); 45 | 46 | 47 | 48 | zokou({ nomCom: "dalle", reaction: "📡", categorie: "IA" }, async (dest, zk, commandeOptions) => { 49 | const { repondre, arg, ms } = commandeOptions; 50 | 51 | try { 52 | if (!arg || arg.length === 0) { 53 | return repondre(`Please enter the necessary information to generate the image.`); 54 | } 55 | 56 | // Regrouper les arguments en une seule chaîne séparée par "-" 57 | const image = arg.join(' '); 58 | const response = await axios.get(`http://api.maher-zubair.tech/ai/photoleap?q=${image}`); 59 | 60 | const data = response.data; 61 | let caption = '*powered by JAMES-MD*'; 62 | 63 | if (data.status == 200) { 64 | // Utiliser les données retournées par le service 65 | const imageUrl = data.result; 66 | zk.sendMessage(dest, { image: { url: imageUrl }, caption: caption }, { quoted: ms }); 67 | } else { 68 | repondre("Error during image generation."); 69 | } 70 | } catch (error) { 71 | console.error('Erreur:', error.message || 'Une erreur s\'est produite'); 72 | repondre("Oops, an error occurred while processing your request"); 73 | } 74 | }); 75 | 76 | zokou({ nomCom: "ai", reaction: "📡", categorie: "IA" }, async (dest, zk, commandeOptions) => { 77 | const { repondre, arg, ms } = commandeOptions; 78 | 79 | try { 80 | if (!arg || arg.length === 0) { 81 | return repondre(`Please ask a question.`); 82 | } 83 | 84 | // Regrouper les arguments en une seule chaîne séparée par "-" 85 | const question = arg.join(' '); 86 | const response = await axios.get(`http://api.maher-zubair.tech/ai/chatgpt4?q=${question}`); 87 | 88 | const data = response.data; 89 | if (data) { 90 | repondre(data.result); 91 | } else { 92 | repondre("Error during response generation."); 93 | } 94 | } catch (error) { 95 | console.error('Erreur:', error.message || 'Une erreur s\'est produite'); 96 | repondre("Oops, an error occurred while processing your request."); 97 | } 98 | }); 99 | 100 | 101 | zokou({ nomCom: "gpt", reaction: "🤔", categorie: "IA" }, async (dest, zk, commandeOptions) => { 102 | const { repondre, arg, ms } = commandeOptions; 103 | 104 | try { 105 | if (!arg || arg.length === 0) { 106 | return repondre(`Please ask a question.`); 107 | } 108 | 109 | // Regrouper les arguments en une seule chaîne séparée par "-" 110 | const question = arg.join(' '); 111 | const response = await axios.get(`https://gpt4.giftedtech.workers.dev/?prompt=${question}`); 112 | 113 | const data = response.data; 114 | if (data) { 115 | repondre(data.result); 116 | } else { 117 | repondre("Error during response generation."); 118 | } 119 | } catch (error) { 120 | console.error('Erreur:', error.message || 'Une erreur s\'est produite'); 121 | repondre("Oops, an error occurred while processing your request."); 122 | } 123 | }); 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /commandes/Fullpp.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require("../framework/zokou"); 2 | const { generateProfilePicture } = require("axios"); 3 | const { S_WHATSAPP_NET } = require('@whiskeysockets/baileys'); 4 | const fs = require("fs"); 5 | 6 | zokou({ 7 | nomCom: "fullpp", 8 | aliases: ["updatepp", "ppfull"], 9 | reaction: '⚔️', 10 | categorie: "search" 11 | }, async (dest, zk, commandeOptions) => { 12 | const { repondre, msgRepondu, auteurMessage } = commandeOptions; 13 | 14 | if (msgRepondu) { 15 | repondre('quote an image'); 16 | 17 | let media; 18 | if (msgRepondu.imageMessage) { 19 | media = msgRepondu.imageMessage; 20 | } else { 21 | repondre('This is not an image...'); 22 | return; 23 | } 24 | 25 | try { 26 | var medis = await zk.downloadAndSaveMediaMessage(media); 27 | 28 | var { img } = await generateProfilePicture(medis); 29 | 30 | await zk.query({ 31 | tag: 'iq', 32 | attrs: { 33 | target: undefined, 34 | to: S_WHATSAPP_NET, 35 | type: 'set', 36 | xmlns: 'w:profile:picture' 37 | }, 38 | content: [ 39 | { 40 | tag: 'picture', 41 | attrs: { type: 'image' }, 42 | content: img 43 | } 44 | ] 45 | }); 46 | 47 | fs.unlinkSync(medis); 48 | repondre("Bot Profile Picture Updated"); 49 | } catch (error) { 50 | repondre("An error occurred while updating bot profile photo: " + error); 51 | } 52 | } else { 53 | repondre('No image was quoted.'); 54 | } 55 | }); 56 | -------------------------------------------------------------------------------- /commandes/General.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require("../framework/zokou"); 2 | const {getAllSudoNumbers,isSudoTableNotEmpty} = require("../bdd/sudo") 3 | const conf = require("../set"); 4 | 5 | zokou({ nomCom: "owner", categorie: "General", reaction: "❣️" }, async (dest, zk, commandeOptions) => { 6 | const { ms , mybotpic } = commandeOptions; 7 | 8 | const thsudo = await isSudoTableNotEmpty() 9 | 10 | if (thsudo) { 11 | let msg = `*My Super-User*\n 12 | *Owner Number*\n : 13 | - 🌟 @${conf.NUMERO_OWNER} 14 | 15 | ------ *other sudos* -----\n` 16 | 17 | let sudos = await getAllSudoNumbers() 18 | 19 | for ( const sudo of sudos) { 20 | if (sudo) { // Vérification plus stricte pour éliminer les valeurs vides ou indéfinies 21 | sudonumero = sudo.replace(/[^0-9]/g, ''); 22 | msg += `- 💼 @${sudonumero}\n`; 23 | } else {return} 24 | 25 | } const ownerjid = conf.NUMERO_OWNER.replace(/[^0-9]/g) + "@s.whatsapp.net"; 26 | const mentionedJid = sudos.concat([ownerjid]) 27 | console.log(sudos); 28 | console.log(mentionedJid) 29 | zk.sendMessage( 30 | dest, 31 | { 32 | image : { url : mybotpic() }, 33 | caption : msg, 34 | mentions : mentionedJid 35 | } 36 | ) 37 | } else { 38 | const vcard = 39 | 'BEGIN:VCARD\n' + // metadata of the contact card 40 | 'VERSION:3.0\n' + 41 | 'FN:' + conf.OWNER_NAME + '\n' + // full name 42 | 'ORG:undefined;\n' + // the organization of the contact 43 | 'TEL;type=CELL;type=VOICE;waid=' + conf.NUMERO_OWNER + ':+' + conf.NUMERO_OWNER + '\n' + // WhatsApp ID + phone number 44 | 'END:VCARD'; 45 | zk.sendMessage(dest, { 46 | contacts: { 47 | displayName: conf.OWNER_NAME, 48 | contacts: [{ vcard }], 49 | }, 50 | },{quoted:ms}); 51 | } 52 | }); 53 | 54 | zokou({ nomCom: "dev", categorie: "General", reaction: "💘" }, async (dest, zk, commandeOptions) => { 55 | const { ms, mybotpic } = commandeOptions; 56 | 57 | const devs = [ 58 | { nom: "JAMES", numero: "254785016388" }, 59 | { nom: "᚛JAMES᚜", numero: "254785016388" }, 60 | { nom: "JAMES", numero: "254704955033" }, 61 | // Ajoute d'autres développeurs ici avec leur nom et numéro 62 | ]; 63 | 64 | let message = "WELCOME TO JAMESMD HELP CENTER! ASK FOR HELP FROM ANY OF THE DEVELOPERS BELOW:\n\n"; 65 | for (const dev of devs) { 66 | message += `----------------\n• ${dev.nom} : https://wa.me/${dev.numero}\n`; 67 | } 68 | var lien = mybotpic() 69 | if (lien.match(/\.(mp4|gif)$/i)) { 70 | try { 71 | zk.sendMessage(dest, { video: { url: lien }, caption:message }, { quoted: ms }); 72 | } 73 | catch (e) { 74 | console.log("🥵🥵 Menu erreur " + e); 75 | repondre("🥵🥵 Menu erreur " + e); 76 | } 77 | } 78 | // Vérification pour .jpeg ou .png 79 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 80 | try { 81 | zk.sendMessage(dest, { image: { url: lien }, caption:message }, { quoted: ms }); 82 | } 83 | catch (e) { 84 | console.log("🥵🥵 Menu erreur " + e); 85 | repondre("🥵🥵 Menu erreur " + e); 86 | } 87 | } 88 | else { 89 | repondre(lien) 90 | repondre("link error"); 91 | 92 | } 93 | }); 94 | 95 | zokou({ nomCom: "support", categorie: "General" }, async (dest, zk, commandeOptions) => { 96 | const { ms, repondre, auteurMessage, } = commandeOptions; 97 | 98 | repondre("THANK YOU FOR CHOOSING JAMESMD, HERE ARE OUR SUPPORTIVE LINKS\n\n ☉ CHANNEL LINK IS HERE ☉ \n\n❒⁠⁠⁠⁠[https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H] \n\n ☉ GROUP LINK IS HERE ☉\n\n❒⁠https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H] \n\n ) 99 | await zk.sendMessage(auteurMessage,{text : `THANK YOU FOR CHOOSING JAMESMD,MAKE SURE YOU FOLLOW THESE LINKS. `},{quoted :ms}) 100 | 101 | }) 102 | -------------------------------------------------------------------------------- /commandes/Modi.js: -------------------------------------------------------------------------------- 1 | const _0x43357e=_0x166d;(function(_0x15a492,_0x2d11a5){const _0x26efc7=_0x166d,_0x1852a=_0x15a492();while(!![]){try{const _0x53d3ae=parseInt(_0x26efc7(0x116))/(0xde5+-0xe5*-0x6+-0x11*0x122)*(-parseInt(_0x26efc7(0xfd))/(-0x4b3+-0xd07+0x38c*0x5))+parseInt(_0x26efc7(0xc9))/(0x12d3+-0x2f*0x2e+0x2*-0x52f)*(-parseInt(_0x26efc7(0x11c))/(0xb*0x2bb+0xfed+-0x2df2))+-parseInt(_0x26efc7(0xe8))/(-0x1d77+-0x13cd*-0x1+0x9af)+parseInt(_0x26efc7(0xd3))/(-0x26c+-0xec9+0x1*0x113b)*(parseInt(_0x26efc7(0xc5))/(0x21bb+0x5*-0x3f6+-0xde6))+-parseInt(_0x26efc7(0xe3))/(0x1dd9+0x1f+-0x1df0)+parseInt(_0x26efc7(0x10c))/(0xb0*-0x33+-0x707*0x1+0x2a20)*(-parseInt(_0x26efc7(0x125))/(-0x21fb*0x1+-0xfcc+0x31d1))+parseInt(_0x26efc7(0xef))/(0x56*-0x2a+0xf8+-0x19*-0x87);if(_0x53d3ae===_0x2d11a5)break;else _0x1852a['push'](_0x1852a['shift']());}catch(_0x1a98cf){_0x1852a['push'](_0x1852a['shift']());}}}(_0x2a99,-0xccd1c+0xeb4*0x89+0xee3e2));function _0x166d(_0x317bd9,_0x36a61a){const _0x41a7f8=_0x2a99();return _0x166d=function(_0x5ca1af,_0xb8ae5e){_0x5ca1af=_0x5ca1af-(0x558+0x1435+-0x18c9);let _0xf6cd6=_0x41a7f8[_0x5ca1af];return _0xf6cd6;},_0x166d(_0x317bd9,_0x36a61a);}const {zokou}=require(_0x43357e(0xd2)+_0x43357e(0xd9)),axios=require(_0x43357e(0xeb)),ytSearch=require(_0x43357e(0xca));function _0x2a99(){const _0x173f87=['Vqvyr','.app/downl','w.dark-yas','ound\x20for\x20t','r3l','music','../framewo','6HCIxoZ','to\x20an\x20erro','https://ap','tdl/audio?','Error\x20duri','Download\x20f','rk/zokou','ailed\x20due\x20','https://ww','rl=','vide\x20a\x20aud','join','L\x20from\x20all','id/downloa','i.dreaded.','d\x20process:','3094976nFhFhQ','GyWeH','hing\x20data\x20','fted-md','oad/ytmp4?','3140475ycdQiv','iltech.my.','iya-api.si','axios','i.giftedte','mp3','from\x20API:','28506027BrQgaz','&apikey=gi','site/api/y','get','8KMqo79BiH','videos','ed\x20query.','r:\x20','data','Mhuii','length','i.davidcyr','retrieve\x20d','atsapp.com','398BdqcJr','error','bItWw','029VadQrNI','mWcuD','aka.vercel','ytmp3','er.','\x20again\x20lat','QHNaF','audio','sendMessag','ng\x20downloa','Error\x20fetc','d/ytmp3?ur','1215981dazYOP','thumbnail','io\x20name.','title','play','Please\x20try','url','message','ownload\x20UR','\x20sources.\x20','236ERyLLp','Failed\x20to\x20','Please\x20pro','eytFt','url=','ch.web.id/','98556TBhKjh','ad/dlmp3?u','te/downloa','i-rin-tohs','download_u','/channel/0','tuclx','result','success','10ltrsYU','Search','https://wh','3430721MPIZZr','api/downlo','No\x20audio\x20f','audio/mp4','150Vrdlaf','yt-search','he\x20specifi'];_0x2a99=function(){return _0x173f87;};return _0x2a99();}zokou({'nomCom':_0x43357e(0x110),'aliases':[_0x43357e(0xd1),_0x43357e(0x103),_0x43357e(0x107),_0x43357e(0xed)],'categorie':_0x43357e(0x126),'reaction':'🦻'},async(_0x47f07f,_0x4ca026,_0x48ad0b)=>{const _0x4e6f64=_0x43357e,_0x1ee192={'Mhuii':_0x4e6f64(0x10a)+_0x4e6f64(0xe5)+_0x4e6f64(0xee),'GyWeH':function(_0x51db17,_0x1ba046){return _0x51db17(_0x1ba046);},'mWcuD':_0x4e6f64(0x118)+_0x4e6f64(0xdd)+_0x4e6f64(0x10e),'eytFt':_0x4e6f64(0xc7)+_0x4e6f64(0xcf)+_0x4e6f64(0xcb)+_0x4e6f64(0xf5),'Vqvyr':_0x4e6f64(0x117)+_0x4e6f64(0xfb)+_0x4e6f64(0x114)+_0x4e6f64(0xdf)+_0x4e6f64(0x115)+_0x4e6f64(0x111)+_0x4e6f64(0x105)+_0x4e6f64(0x104),'bItWw':_0x4e6f64(0xc8),'tuclx':_0x4e6f64(0xc4)+_0x4e6f64(0xfc)+_0x4e6f64(0x121)+_0x4e6f64(0x100)+_0x4e6f64(0xf3)+_0x4e6f64(0xd0),'QHNaF':_0x4e6f64(0xd7)+_0x4e6f64(0x109)+_0x4e6f64(0xe2)},{arg:_0x449dcd,ms:_0x4c1349,repondre:_0x3b9a4a}=_0x48ad0b;if(!_0x449dcd[-0xe14*0x2+0x1*-0xfd9+0x8cd*0x5])return _0x1ee192[_0x4e6f64(0xe4)](_0x3b9a4a,_0x1ee192[_0x4e6f64(0x101)]);const _0x2c6238=_0x449dcd[_0x4e6f64(0xde)]('\x20');try{const _0x26b849=await _0x1ee192[_0x4e6f64(0xe4)](ytSearch,_0x2c6238);if(!_0x26b849||!_0x26b849[_0x4e6f64(0xf4)][_0x4e6f64(0xf9)])return _0x1ee192[_0x4e6f64(0xe4)](_0x3b9a4a,_0x1ee192[_0x4e6f64(0x119)]);const _0x85825c=_0x26b849[_0x4e6f64(0xf4)][-0x68+-0x269b*0x1+0x2703],_0x466909=_0x85825c[_0x4e6f64(0x112)],_0x2502dc=async _0x156520=>{const _0x203c1a=_0x4e6f64;try{const _0x25f891=await axios[_0x203c1a(0xf2)](_0x156520);return _0x25f891[_0x203c1a(0xf7)];}catch(_0x43c9d7){return console[_0x203c1a(0xfe)](_0x1ee192[_0x203c1a(0xf8)],_0x43c9d7),{'success':![]};}},_0x44d666=[_0x4e6f64(0xd5)+_0x4e6f64(0x11f)+_0x4e6f64(0x102)+_0x4e6f64(0xcd)+_0x4e6f64(0xe7)+_0x4e6f64(0x11a)+_0x1ee192[_0x4e6f64(0xe4)](encodeURIComponent,_0x466909),_0x4e6f64(0xd5)+_0x4e6f64(0xfa)+_0x4e6f64(0xe9)+_0x4e6f64(0xe0)+_0x4e6f64(0x10b)+'l='+_0x1ee192[_0x4e6f64(0xe4)](encodeURIComponent,_0x466909),_0x4e6f64(0xdb)+_0x4e6f64(0xce)+_0x4e6f64(0xea)+_0x4e6f64(0x11e)+_0x4e6f64(0x10b)+'l='+_0x1ee192[_0x4e6f64(0xe4)](encodeURIComponent,_0x466909),_0x4e6f64(0xd5)+_0x4e6f64(0xec)+_0x4e6f64(0x11b)+_0x4e6f64(0xc6)+_0x4e6f64(0x11d)+_0x4e6f64(0xdc)+_0x1ee192[_0x4e6f64(0xe4)](encodeURIComponent,_0x466909)+(_0x4e6f64(0xf0)+_0x4e6f64(0xe6)),_0x4e6f64(0xd5)+_0x4e6f64(0xe1)+_0x4e6f64(0xf1)+_0x4e6f64(0xd6)+_0x4e6f64(0x11a)+_0x1ee192[_0x4e6f64(0xe4)](encodeURIComponent,_0x466909)];let _0x267b01;for(const _0x45b257 of _0x44d666){_0x267b01=await _0x1ee192[_0x4e6f64(0xe4)](_0x2502dc,_0x45b257);if(_0x267b01&&_0x267b01[_0x4e6f64(0x124)])break;}if(!_0x267b01||!_0x267b01[_0x4e6f64(0x124)])return _0x1ee192[_0x4e6f64(0xe4)](_0x3b9a4a,_0x1ee192[_0x4e6f64(0xcc)]);const _0x46dd02=_0x267b01[_0x4e6f64(0x123)][_0x4e6f64(0x120)+'rl'],_0x2dbdcd=_0x267b01[_0x4e6f64(0x123)],_0xb0655c={'audio':{'url':_0x46dd02},'mimetype':_0x1ee192[_0x4e6f64(0xff)],'contextInfo':{'externalAdReply':{'title':_0x2dbdcd[_0x4e6f64(0x10f)],'body':_0x2dbdcd[_0x4e6f64(0x10f)],'mediaType':0x1,'sourceUrl':_0x1ee192[_0x4e6f64(0x122)],'thumbnailUrl':_0x85825c[_0x4e6f64(0x10d)],'renderLargerThumbnail':![],'showAdAttribution':!![]}}};await _0x4ca026[_0x4e6f64(0x108)+'e'](_0x47f07f,_0xb0655c,{'quoted':_0x4c1349});}catch(_0x3238d3){return console[_0x4e6f64(0xfe)](_0x1ee192[_0x4e6f64(0x106)],_0x3238d3),_0x1ee192[_0x4e6f64(0xe4)](_0x3b9a4a,_0x4e6f64(0xd8)+_0x4e6f64(0xda)+_0x4e6f64(0xd4)+_0x4e6f64(0xf6)+(_0x3238d3[_0x4e6f64(0x113)]||_0x3238d3));}}); 2 | -------------------------------------------------------------------------------- /commandes/Reboot.js: -------------------------------------------------------------------------------- 1 | const {zokou}=require("../framework/zokou") 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | zokou({nomCom:"restart",categorie:"Mods",reaction:"📴"},async(dest,z,com)=>{ 10 | 11 | 12 | 13 | const{repondre,ms,dev,superUser}=com; 14 | 15 | if(!superUser) 16 | { 17 | return repondre("This command is for owner only"); 18 | } 19 | 20 | const {exec}=require("child_process") 21 | 22 | repondre("JAMES-MD bot Restarting 💀"); 23 | 24 | exec("pm2 restart all"); 25 | 26 | 27 | 28 | 29 | 30 | 31 | }) 32 | -------------------------------------------------------------------------------- /commandes/afk.js: -------------------------------------------------------------------------------- 1 | function _0x17c8(_0x1b6d23,_0x5271cc){const _0x24daa7=_0x2bca();return _0x17c8=function(_0x28eb8b,_0x16db79){_0x28eb8b=_0x28eb8b-(0xc16+0x60d+-0x10cf);let _0x46e077=_0x24daa7[_0x28eb8b];return _0x46e077;},_0x17c8(_0x1b6d23,_0x5271cc);}const _0xb2c35c=_0x17c8;(function(_0x323ca1,_0x4c9c4c){const _0x30454b=_0x17c8,_0x32e195=_0x323ca1();while(!![]){try{const _0x22819d=parseInt(_0x30454b(0x157))/(0x1487+0x530*0x2+-0x1ee6)+-parseInt(_0x30454b(0x17a))/(0x1*-0x20d9+-0x17*0x119+-0x9af*-0x6)+parseInt(_0x30454b(0x15e))/(0x44*-0x7a+-0x22d6+0x4341)*(parseInt(_0x30454b(0x193))/(0xdbc+-0xf56+-0x3*-0x8a))+-parseInt(_0x30454b(0x169))/(-0x4*0x411+0x1cee+-0xca5)*(-parseInt(_0x30454b(0x17c))/(-0x1*-0x1ef8+-0x3a*0x6d+-0x640))+-parseInt(_0x30454b(0x182))/(-0xe95*0x1+-0x1877*-0x1+-0x9db)+parseInt(_0x30454b(0x176))/(0x2542+0x60a+-0x2b44)+-parseInt(_0x30454b(0x18f))/(-0x72d*-0x3+-0x98f*-0x2+0x144e*-0x2);if(_0x22819d===_0x4c9c4c)break;else _0x32e195['push'](_0x32e195['shift']());}catch(_0x316241){_0x32e195['push'](_0x32e195['shift']());}}}(_0x2bca,0x5*0x154d3+-0x638a1+0x3835b));const {zokou}=require(_0xb2c35c(0x15f)+_0xb2c35c(0x190)),afkfunc=require(_0xb2c35c(0x16f));function _0x2bca(){const _0x56b1f1=['join','log','ease\x20enter','36lAzjHN','../framewo','s\x20command','eAfk','nIpsf','message\x20pl','OMTgF','IoUDy','VeMxL','addOrUpdat','afk','115njNwWI','ated','\x20the\x20afk\x20c','he\x20link\x20is','GWPDt','ommand\x20to\x20','../bdd/afk','.jpg','RcBjm','ge\x20link\x20(t','You\x20have\x20n','ot\x20updated','RYIAW','3257680UTZqro','The\x20AFK\x20me',')\x0a\x20To\x20reco','\x20after\x20the','91120inpEcX','tate','129282qXvbSj','.png','An\x20error\x20o','qdweQ','push','The\x20afk\x20ha','1502130ueDPBJ','ktjlq','eZEha','\x20(Away\x20Fro','to\x20use\x20thi','you\x20are\x20no','no\x20url','Mods','qCugm','changeAfkS','ccurred\x20wh','ssage\x20has\x20','jDZsq','6571260tArTKB','rk/zokou','yYBgl','\x20optional)','9692YPMKuC','\x20the\x20afk','forEach','rd\x20an\x20afk\x20','ed,\x20retype','been\x20activ','\x20a\x20paramet','ile\x20saving','s\x20been\x20sav','\x20command\x20t','.jpeg','DGNfq','er\x20for\x20AFk','hen\x20an\x20ima','t\x20allowed\x20','not\x20define','m\x20Keyboard','317200qsJrKc','\x20a\x20message','endsWith','activate\x20i'];_0x2bca=function(){return _0x56b1f1;};return _0x2bca();}zokou({'nomCom':_0xb2c35c(0x168),'categorie':_0xb2c35c(0x189)},async(_0x3088ba,_0x2abb31,_0x55d37f)=>{const _0x295b71=_0xb2c35c,_0x4415ab={'nIpsf':_0x295b71(0x170),'GWPDt':_0x295b71(0x17d),'ktjlq':_0x295b71(0x19d),'RYIAW':function(_0x5c47ee,_0x10b407){return _0x5c47ee!=_0x10b407;},'VeMxL':function(_0x353882,_0x391896){return _0x353882(_0x391896);},'RcBjm':_0x295b71(0x187)+_0x295b71(0x154)+_0x295b71(0x186)+_0x295b71(0x160),'DGNfq':function(_0x4737a4,_0x285e72){return _0x4737a4===_0x285e72;},'IoUDy':_0x295b71(0x155)+'d','yYBgl':function(_0x465de5,_0x2c7ccd){return _0x465de5(_0x2c7ccd);},'jDZsq':_0x295b71(0x173)+_0x295b71(0x174)+_0x295b71(0x199)+_0x295b71(0x19f)+_0x295b71(0x185)+_0x295b71(0x156)+_0x295b71(0x178)+_0x295b71(0x196)+_0x295b71(0x163)+_0x295b71(0x15d)+_0x295b71(0x158)+_0x295b71(0x179)+_0x295b71(0x19c)+_0x295b71(0x1a0)+_0x295b71(0x172)+_0x295b71(0x16c)+_0x295b71(0x192),'qCugm':_0x295b71(0x177)+_0x295b71(0x18d)+_0x295b71(0x198)+_0x295b71(0x16a),'qdweQ':_0x295b71(0x188),'eZEha':_0x295b71(0x181)+_0x295b71(0x19b)+_0x295b71(0x197)+_0x295b71(0x16b)+_0x295b71(0x16e)+_0x295b71(0x15a)+'t','OMTgF':_0x295b71(0x17e)+_0x295b71(0x18c)+_0x295b71(0x19a)+_0x295b71(0x194)},{ms:_0x3b66d5,repondre:_0x3edc10,superUser:_0x58f9f9,arg:_0x5e7acc}=_0x55d37f;if(!_0x58f9f9){_0x4415ab[_0x295b71(0x166)](_0x3edc10,_0x4415ab[_0x295b71(0x171)]);return;}if(!_0x5e7acc[-0x246c+0x86b+0x1c01]){let _0x4281df=await afkfunc[_0x295b71(0x18b)+_0x295b71(0x17b)](-0x155e+0x2653+-0x10f4*0x1,'on');_0x4415ab[_0x295b71(0x19e)](_0x4281df,_0x4415ab[_0x295b71(0x165)])?_0x4415ab[_0x295b71(0x191)](_0x3edc10,_0x4415ab[_0x295b71(0x18e)]):(await afkfunc[_0x295b71(0x18b)+_0x295b71(0x17b)](0x945+0x175*0x8+0x4*-0x53b,'on'),_0x4415ab[_0x295b71(0x166)](_0x3edc10,_0x4415ab[_0x295b71(0x18a)]));}else try{let _0xe1d5f4=[],_0x52dbd3=_0x4415ab[_0x295b71(0x17f)];_0x5e7acc[_0x295b71(0x195)](_0x13b87f=>{const _0x15ce96=_0x295b71;if(_0x13b87f[_0x15ce96(0x159)](_0x4415ab[_0x15ce96(0x162)])||_0x13b87f[_0x15ce96(0x159)](_0x4415ab[_0x15ce96(0x16d)])||_0x13b87f[_0x15ce96(0x159)](_0x4415ab[_0x15ce96(0x183)]))_0x52dbd3=_0x13b87f;else _0x4415ab[_0x15ce96(0x175)](_0x13b87f,undefined)&&_0xe1d5f4[_0x15ce96(0x180)](_0x13b87f);}),await afkfunc[_0x295b71(0x167)+_0x295b71(0x161)](-0x1f9a+0x1735*-0x1+-0x4*-0xdb4,_0xe1d5f4[_0x295b71(0x15b)]('\x20'),_0x52dbd3),_0x4415ab[_0x295b71(0x166)](_0x3edc10,_0x4415ab[_0x295b71(0x184)]);}catch(_0x20692b){console[_0x295b71(0x15c)](_0x20692b),_0x4415ab[_0x295b71(0x166)](_0x3edc10,_0x4415ab[_0x295b71(0x164)]);}}); 2 | -------------------------------------------------------------------------------- /commandes/alive.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require('../framework/zokou'); 2 | const {addOrUpdateDataInAlive , getDataFromAlive} = require('../bdd/alive') 3 | const moment = require("moment-timezone"); 4 | const s = require(__dirname + "/../set"); 5 | 6 | zokou( 7 | { 8 | nomCom : 'alive', 9 | categorie : 'General' 10 | 11 | },async (dest,zk,commandeOptions) => { 12 | 13 | const {ms , arg, repondre,superUser} = commandeOptions; 14 | 15 | const data = await getDataFromAlive(); 16 | 17 | if (!arg || !arg[0] || arg.join('') === '') { 18 | 19 | if(data) { 20 | 21 | const {message , lien} = data; 22 | 23 | 24 | var mode = "public"; 25 | if ((s.MODE).toLocaleLowerCase() != "yes") { 26 | mode = "private"; 27 | } 28 | 29 | 30 | 31 | moment.tz.setDefault('Etc/GMT'); 32 | 33 | // Créer une date et une heure en GMT 34 | const temps = moment().format('HH:mm:ss'); 35 | const date = moment().format('DD/MM/YYYY'); 36 | 37 | const alivemsg = ` 38 | *Owner* : ${s.OWNER_NAME} 39 | *Mode* : ${mode} 40 | *Date* : ${date} 41 | *Hours(GMT)* : ${temps} 42 | 43 | ${message} 44 | 45 | 46 | *JAMES-MD-WABOT*` 47 | 48 | if (lien.match(/\.(mp4|gif)$/i)) { 49 | try { 50 | zk.sendMessage(dest, { video: { url: lien }, caption: alivemsg }, { quoted: ms }); 51 | } 52 | catch (e) { 53 | console.log("🥵🥵 Menu erreur " + e); 54 | repondre("🥵🥵 Menu erreur " + e); 55 | } 56 | } 57 | // Checking for .jpeg or .png 58 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 59 | try { 60 | zk.sendMessage(dest, { image: { url: lien }, caption: alivemsg }, { quoted: ms }); 61 | } 62 | catch (e) { 63 | console.log("🥵🥵 Menu erreur " + e); 64 | repondre("🥵🥵 Menu erreur " + e); 65 | } 66 | } 67 | else { 68 | 69 | repondre(alivemsg); 70 | 71 | } 72 | 73 | } else { 74 | if(!superUser) { repondre("USKUE FALA BANA🙆😒😂") ; return}; 75 | 76 | await repondre("TANGU LINI A LEGIT 🕷️JAMES MD🕷️ IKAZIMA,, ACHA UFALA MZEE"); 77 | repondre("YOO DON'T DISTURB ME 🤦AM ALWAYS ACTIVE :)") 78 | } 79 | } else { 80 | 81 | if(!superUser) { repondre ("Only the owner can modify the alive") ; return}; 82 | 83 | 84 | const texte = arg.join(' ').split(';')[0]; 85 | const tlien = arg.join(' ').split(';')[1]; 86 | 87 | 88 | 89 | await addOrUpdateDataInAlive(texte , tlien) 90 | 91 | repondre(' Holla🥴, *JAMES MD BOT* is alive just like you gee. ') 92 | 93 | } 94 | }); 95 | -------------------------------------------------------------------------------- /commandes/blocklist.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require("../framework/zokou"); 2 | 3 | keith({ 4 | nomCom: "blocklist", 5 | aliases: ["listblock", "blacklist"], 6 | reaction: '⚔️', 7 | categorie: "search" 8 | }, async (dest, zk, commandeOptions) => { 9 | const { repondre } = commandeOptions; 10 | 11 | try { 12 | // Fetch the blocklist of contacts 13 | let blocklist = await zk.fetchBlocklist(); 14 | 15 | // If the blocklist has users, proceed 16 | if (blocklist.length > 0) { 17 | // Start the message for blocked contacts 18 | let jackhuh = `*Blocked Contacts*\n`; 19 | 20 | await repondre(`You have blocked ${blocklist.length} contact(s), fetching and sending their details!`); 21 | 22 | // Map through the blocklist to fetch each blocked user's details 23 | const promises = blocklist.map(async (blockedUser) => { 24 | // Extract the phone number from the JID (remove '@s.whatsapp.net') 25 | const phoneNumber = blockedUser.split('@')[0]; 26 | 27 | // Add the blocked user's phone number to the message 28 | jackhuh += `🗡️ +${phoneNumber}\n`; // List the phone number 29 | }); 30 | 31 | // Wait for all the promises to complete 32 | await Promise.all(promises); 33 | 34 | // Send the final formatted message with the blocked contacts 35 | await repondre(jackhuh); 36 | } else { 37 | // If no blocked users, reply with a message 38 | await repondre("There are no blocked contacts."); 39 | } 40 | } catch (e) { 41 | // Catch any error and inform the user 42 | await repondre("An error occurred while accessing blocked users.\n\n" + e); 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /commandes/canvacord.js: -------------------------------------------------------------------------------- 1 | 2 | const { zokou } = require("../framework/zokou"); 3 | const canvacord = require("canvacord"); 4 | const {uploadImageToImgur} = require("../framework/imgur") 5 | 6 | // Generic function to create a canvacord order 7 | function createCanvacordCommand(commandName, canvacordFunction) { 8 | zokou({ 9 | nomCom: commandName, 10 | categorie: "Image-Edit", 11 | reaction: "🎉" 12 | }, async (origineMessage, zk, commandeOptions) => { 13 | const { ms, msgRepondu, auteurMsgRepondu } = commandeOptions; 14 | const clientId = 'b40a1820d63cd4e' ; 15 | 16 | try { 17 | let img; 18 | if (msgRepondu) { 19 | 20 | if (msgRepondu.imageMessage) { 21 | const image = await zk.downloadAndSaveMediaMessage(msgRepondu.imageMessage) 22 | img = await uploadImageToImgur(image, clientId ) 23 | } else { 24 | 25 | img = await zk.profilePictureUrl(auteurMsgRepondu, 'image'); } 26 | } else { 27 | img = "https://i.pinimg.com/564x/84/09/12/840912dd744e6662ab211b8070b5d84c.jpg"; 28 | } 29 | 30 | const result = await canvacordFunction(img); 31 | 32 | await zk.sendMessage(origineMessage, { image: result }, { quoted: ms }); 33 | } catch (error) { 34 | console.error(`Error when ordering "${commandName}":`, error); 35 | } 36 | }); 37 | } 38 | 39 | // Créer des commandes avec différentes fonctions canvacord 40 | createCanvacordCommand("shit", canvacord.Canvacord.shit); 41 | createCanvacordCommand("wasted", canvacord.Canvacord.wasted); 42 | createCanvacordCommand("wanted", canvacord.Canvacord.wanted); 43 | createCanvacordCommand("trigger", canvacord.Canvacord.trigger); 44 | createCanvacordCommand("trash", canvacord.Canvacord.trash); 45 | createCanvacordCommand("rip", canvacord.Canvacord.rip); 46 | createCanvacordCommand("sepia", canvacord.Canvacord.sepia); 47 | createCanvacordCommand("rainbow", canvacord.Canvacord.rainbow); 48 | createCanvacordCommand("hitler", canvacord.Canvacord.hitler); 49 | createCanvacordCommand("invert", canvacord.Canvacord.invert); 50 | createCanvacordCommand("jail", canvacord.Canvacord.jail); 51 | createCanvacordCommand("affect", canvacord.Canvacord.affect); 52 | createCanvacordCommand("beautiful", canvacord.Canvacord.beautiful); 53 | createCanvacordCommand("blur", canvacord.Canvacord.blur); 54 | 55 | createCanvacordCommand("circle", canvacord.Canvacord.circle); 56 | createCanvacordCommand("facepalm", canvacord.Canvacord.facepalm); 57 | createCanvacordCommand("greyscale", canvacord.Canvacord.greyscale); 58 | createCanvacordCommand("joke", canvacord.Canvacord.jokeOverHead); 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /commandes/check.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require('../framework/zokou'); 2 | 3 | zokou({ 4 | nomCom: "check", 5 | aliases: ["alive", "testing"], 6 | categorie: "system", 7 | reaction: "👻" 8 | }, async (dest, zk, commandeOptions) => { 9 | const { ms } = commandeOptions; 10 | 11 | // Array of sound file URLs 12 | const audioFiles = [ 13 | 'https://files.catbox.moe/hpwsi2.mp3', 14 | 'https://files.catbox.moe/xci982.mp3', 15 | 'https://files.catbox.moe/utbujd.mp3', 16 | 'https://files.catbox.moe/w2j17k.m4a', 17 | 'https://files.catbox.moe/851skv.m4a', 18 | 'https://files.catbox.moe/qnhtbu.m4a', 19 | 'https://files.catbox.moe/lb0x7w.mp3', 20 | 'https://files.catbox.moe/efmcxm.mp3', 21 | 'https://files.catbox.moe/gco5bq.mp3', 22 | 'https://files.catbox.moe/26oeeh.mp3', 23 | 'https://files.catbox.moe/a1sh4u.mp3', 24 | 'https://files.catbox.moe/vuuvwn.m4a', 25 | 'https://files.catbox.moe/wx8q6h.mp3', 26 | 'https://files.catbox.moe/uj8fps.m4a', 27 | 'https://files.catbox.moe/dc88bx.m4a', 28 | 'https://files.catbox.moe/tn32z0.m4a' 29 | ]; 30 | 31 | // Randomly pick an audio file from the list 32 | const selectedAudio = audioFiles[Math.floor(Math.random() * audioFiles.length)]; 33 | 34 | // External URLs for references 35 | const murl = 'https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H'; 36 | const img = 'https://files.catbox.moe/eg2cgb.jpg'; 37 | 38 | // Audio message object 39 | const audioMessage = { 40 | audio: { 41 | url: selectedAudio, 42 | }, 43 | mimetype: 'audio/mpeg', 44 | ptt: true, // Marking this as a "Push-to-Talk" message 45 | waveform: [100, 0, 100, 0, 100, 0, 100], 46 | fileName: 'shizo', 47 | contextInfo: { 48 | externalAdReply: { 49 | title: '💀JAMES MD IS ONLINE 💀', 50 | body: 'TAP HERE TO FOLLOW OUR CHANNEL', 51 | thumbnailUrl: img, 52 | sourceUrl: murl, 53 | mediaType: 1, 54 | renderLargerThumbnail: true, 55 | }, 56 | }, 57 | }; 58 | 59 | // Send the audio message with the context of the original message 60 | await zk.sendMessage(dest, audioMessage, { quoted: ms }); 61 | }); 62 | -------------------------------------------------------------------------------- /commandes/clients.js: -------------------------------------------------------------------------------- 1 | // thanks chatgpt😻😻 2 | 3 | const { zokou } = require("../framework/zokou"); 4 | const Heroku = require('heroku-client'); 5 | const s = require("../set"); 6 | 7 | // Command to retrieve Heroku config vars 8 | zokou({ 9 | nomCom: 'allvar', 10 | categorie: "HEROKU-CLIENT" 11 | }, async (chatId, zk, context) => { 12 | const { repondre, superUser } = context; 13 | 14 | // Check if the command is issued by the owner 15 | if (!superUser) { 16 | return repondre("*This command is restricted to the bot owner or Mustaffa Tech 👻*"); 17 | } 18 | 19 | const appname = s.HEROKU_APP_NAME; 20 | const herokuapi = s.HEROKU_API_KEY; 21 | 22 | const heroku = new Heroku({ 23 | token: herokuapi, 24 | }); 25 | 26 | const baseURI = `/apps/${appname}/config-vars`; 27 | 28 | try { 29 | // Fetch config vars from Heroku API 30 | const configVars = await heroku.get(baseURI); 31 | 32 | let str = '*╭───༺XBOT Heroku vars༻────╮*\n\n'; 33 | 34 | // Loop through the returned config vars and format them 35 | for (let key in configVars) { 36 | if (configVars.hasOwnProperty(key)) { 37 | str += `★ *${key}* = ${configVars[key]}\n`; 38 | } 39 | } 40 | 41 | // Send the formatted response back to the user 42 | repondre(str); 43 | 44 | } catch (error) { 45 | console.error('Error fetching Heroku config vars:', error); 46 | repondre('Sorry, there was an error fetching the config vars.'); 47 | } 48 | }); 49 | 50 | // Command to set a Heroku config var 51 | zokou({ 52 | nomCom: 'setvar', 53 | categorie: "HEROKU-CLIENT" 54 | }, async (chatId, zk, context) => { 55 | const { repondre, superUser, arg } = context; 56 | 57 | // Check if the command is issued by the owner 58 | if (!superUser) { 59 | return repondre("*This command is restricted to the bot owner or Mustaffa Tech 👻*"); 60 | } 61 | 62 | const appname = s.HEROKU_APP_NAME; 63 | const herokuapi = s.HEROKU_API_KEY; 64 | 65 | if (!arg || arg.length !== 1 || !arg[0].includes('=')) { 66 | return repondre('Incorrect Usage:\nProvide the key and value correctly.\nExample: setvar OWNER_NAME=Beltah Tech 254'); 67 | } 68 | 69 | const [key, value] = arg[0].split('='); 70 | 71 | const heroku = new Heroku({ 72 | token: herokuapi, 73 | }); 74 | 75 | const baseURI = `/apps/${appname}/config-vars`; 76 | 77 | try { 78 | // Set the new config var 79 | await heroku.patch(baseURI, { 80 | body: { 81 | [key]: value, 82 | }, 83 | }); 84 | 85 | // Notify success 86 | await repondre(`*✅ The variable ${key} = ${value} has been set successfully. The bot is restarting...*`); 87 | } catch (error) { 88 | console.error('Error setting config variable:', error); 89 | await repondre(`❌ There was an error setting the variable. Please try again later.\n${error.message}`); 90 | } 91 | }); 92 | -------------------------------------------------------------------------------- /commandes/define.js: -------------------------------------------------------------------------------- 1 | const { 2 | zokou 3 | } = require("../framework/zokou"); 4 | const axios = require("axios"); 5 | zokou({ 6 | 'nomCom': 'define', 7 | 'reaction': '♻️', 8 | 'categorie': "Ai" 9 | }, async (_0x2d6773, _0x1778cf, _0x5bcf7e) => { 10 | const { 11 | repondre: _0x3c6e3b, 12 | arg: _0x3997ea, 13 | ms: _0x10a9bb 14 | } = _0x5bcf7e; 15 | if (!_0x3997ea || _0x3997ea.length === 0x0) { 16 | return _0x3c6e3b("provide a term"); 17 | } 18 | const _0x243eb3 = _0x3997ea.join(" "); 19 | try { 20 | let { 21 | data: _0x31830d 22 | } = await axios.get("http://api.urbandictionary.com/v0/define?term=" + _0x243eb3); 23 | var _0x259634 = "\n Word: " + _0x243eb3 + "\n Definition: " + _0x31830d.list[0x0].definition.replace(/\[/g, '').replace(/\]/g, '') + "\n Example: " + _0x31830d.list[0x0].example.replace(/\[/g, '').replace(/\]/g, ''); 24 | return _0x3c6e3b(_0x259634); 25 | } catch { 26 | return _0x3c6e3b("No definition for " + _0x243eb3); 27 | } 28 | }); 29 | -------------------------------------------------------------------------------- /commandes/devinette.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require('../framework/zokou'); 2 | 3 | // Set a riddle list with questions and answers 4 | const devinettes = [ 5 | { 6 | question: "I can fly without wings, who am I?", 7 | reponse: "The weather", 8 | }, 9 | { 10 | question: "I'm always hungry, the more I eat, the fatter I become. Who am I ?", 11 | reponse: "A black hole", 12 | }, 13 | { 14 | question: "I'm strong when I'm down, but I'm weak when I'm up. Who am I ?", 15 | reponse: "The number 6", 16 | }, 17 | { 18 | question: "I can be short or long, hard or soft, I can be used by anyone, from young children to experienced musicians. Who am I ?", 19 | reponse: "A pencil", 20 | }, 21 | { 22 | question: "I am the beginning of the end, the end of every place. I am the beginning of eternity, the end of time and space. Who am I ?", 23 | reponse: "The letter 'e'", 24 | }, 25 | { 26 | question: "I am white when I am dirty and black when I am clean. Who am I ?", 27 | reponse: "A slate", 28 | }, 29 | { 30 | question: "I'm liquid, but if you take water away from me, I become solid. Who am I ?", 31 | reponse: "Tea", 32 | }, 33 | { 34 | question: "I fly without wings, I cry without eyes. Wherever I am, death always accompanies me. Who am I ?", 35 | reponse: "The wind", 36 | }, 37 | { 38 | question: "I have towns, but no houses. I have mountains, but no trees. I have water, but no fish. Who am I ?", 39 | reponse: "A map", 40 | }, 41 | { 42 | question: "I can be read, but you can't write about me. You always give to me, but rarely keep me. Who am I ?", 43 | reponse: "A borrowed book", 44 | }, 45 | { 46 | question: "I come twice in a week, once in a year, but never in a day. Who am I ?", 47 | reponse: "The letter 'E'", 48 | }, 49 | { 50 | question: "I'm hard to grasp, but you will hold me in your hand when you find me. Who am I ?", 51 | reponse: "Your breath", 52 | }, 53 | { 54 | question: "The hotter I am, the colder I become. Who am I ?", 55 | reponse: "coffe", 56 | }, 57 | { 58 | question: "I am the stuff of dreams. I cover broken ideas. I change souls into wings. Who am I ?", 59 | reponse: "A book", 60 | }, 61 | { 62 | question: "I am white when I am dirty and black when I am clean. Who am I?", 63 | reponse: "A slate", 64 | }, 65 | { 66 | question: "I can fly without having wings. I can cry without having eyes. Who am I ?", 67 | reponse: "A cloud", 68 | }, 69 | { 70 | question: "I start at night and finish in the morning. Who am I ?", 71 | reponse: "The letter 'N'", 72 | }, 73 | { 74 | question: "I can be read, but you can't write about me. You always give to me, but rarely keep me. Who am I ?", 75 | reponse: "A borrowed book", 76 | }, 77 | { 78 | question: "I feed on everything around me, the air, the earth and even the trees. Who am I ?", 79 | reponse: "a fire", 80 | }, 81 | { 82 | question: "I am white when I am dirty and black when I am clean. Who am I ?", 83 | reponse: "A slate", 84 | }, 85 | { 86 | question: "I'm liquid, but if you take water away from me, I become solid. Who am I ?", 87 | reponse: "tea", 88 | }, 89 | { 90 | question: "I am the beginning of the end and the end of every place. I am the beginning of eternity, the end of time and space. Who am I ?", 91 | reponse: "the letter'E'", 92 | }, 93 | { 94 | question: "I'm hard to grasp, but you will hold me in your hand when you find me. Who am I ?", 95 | reponse: "Your breath", 96 | }, 97 | ]; 98 | 99 | zokou({ nomCom: "riddle", categorie: "Games" }, async (dest, zk, commandeOptions) => { 100 | const { ms, repondre } = commandeOptions; 101 | 102 | // Choose a random riddle 103 | const devinette = devinettes[Math.floor(Math.random() * devinettes.length)]; 104 | // Send the riddle question 105 | await zk.sendMessage( 106 | dest, 107 | { 108 | text: `Riddle: ${devinette.question} . \n you have 30 seconds to think about.`, 109 | }, 110 | { quoted: ms } 111 | ); 112 | 113 | //Wait 60 seconds before sending the response 114 | await delay(30000); 115 | 116 | // Answer 117 | await zk.sendMessage( 118 | dest, 119 | { 120 | text: `The answer was : ${devinette.reponse}`, 121 | }, 122 | { quoted: ms } 123 | ); 124 | }); 125 | 126 | // Function to create a pause/delay in milliseconds 127 | function delay(ms) { 128 | return new Promise((resolve) => setTimeout(resolve, ms)); 129 | } 130 | -------------------------------------------------------------------------------- /commandes/events.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require('../framework/zokou'); 2 | const { attribuerUnevaleur } = require('../bdd/welcome'); 3 | 4 | async function events(nomCom) { 5 | zokou({ 6 | nomCom: nomCom, 7 | categorie: 'Group' 8 | }, async (dest, zk, commandeOptions) => { 9 | const { ms, arg, repondre, superUser, verifAdmin } = commandeOptions; 10 | 11 | if (verifAdmin || superUser) { 12 | if (!arg[0] || arg.join(' ') === ' ') { 13 | repondre(nomCom + ' ' + ' on to active and ' + ' ' + nomCom + ' ' + 'off to put off'); 14 | } else { 15 | if (arg[0] === 'on' || arg[0] === 'off') { 16 | 17 | await attribuerUnevaleur(dest, nomCom, arg[0]); 18 | repondre( nomCom + "is actualised on " + arg[0]); 19 | } else { 20 | repondre('on for active and off for desactive'); 21 | } 22 | } 23 | } else { 24 | repondre('You can\'t use this command lol '); 25 | } 26 | }); 27 | } 28 | 29 | // Appel de la fonction events pour les valeurs 'welcome' et 'goodbye' 30 | events('welcome'); 31 | events('goodbye'); 32 | events('antipromote'); 33 | events('antidemote') ; 34 | -------------------------------------------------------------------------------- /commandes/fancy.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require("../framework/zokou"); 2 | const fancy = require("../Anyway/style"); 3 | 4 | zokou({ nomCom: "fancy", categorie: "Fun", reaction: "〽️" }, async (dest, zk, commandeOptions) => { 5 | const { arg, repondre, prefixe } = commandeOptions; 6 | const id = arg[0]?.match(/\d+/)?.join(''); 7 | const text = arg.slice(1).join(" "); 8 | 9 | try { 10 | if (id === undefined || text === undefined) { 11 | return await repondre(`\nExemple : ${prefixe}fancy 10 Anyway-Md\n` + String.fromCharCode(8206).repeat(4001) + fancy.list('ANYWAY-MD', fancy)); 12 | } 13 | 14 | const selectedStyle = fancy[parseInt(id) - 1]; 15 | if (selectedStyle) { 16 | return await repondre(fancy.apply(selectedStyle, text)); 17 | } else { 18 | return await repondre('_Style introuvable :(_'); 19 | } 20 | } catch (error) { 21 | console.error(error); 22 | return await repondre('_Une erreur s\'est produite :(_'); 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /commandes/git.js: -------------------------------------------------------------------------------- 1 | const util = require('util'); 2 | const fs = require('fs-extra'); 3 | const { zokou } = require(__dirname + "/../framework/zokou"); 4 | const { format } = require(__dirname + "/../framework/mesfonctions"); 5 | const os = require("os"); 6 | const moment = require("moment-timezone"); 7 | const s = require(__dirname + "/../set"); 8 | const more = String.fromCharCode(8206) 9 | const readmore = more.repeat(4001) 10 | 11 | zokou({ nomCom: "sc", categorie: "General" }, async (dest, zk, commandeOptions) => { 12 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 13 | let { cm } = require(__dirname + "/../framework//zokou"); 14 | var coms = {}; 15 | var mode = "public"; 16 | 17 | if ((s.MODE).toLocaleLowerCase() != "yes") { 18 | mode = "private"; 19 | } 20 | 21 | 22 | 23 | 24 | cm.map(async (com, index) => { 25 | if (!coms[com.categorie]) 26 | coms[com.categorie] = []; 27 | coms[com.categorie].push(com.nomCom); 28 | }); 29 | 30 | moment.tz.setDefault('Etc/GMT'); 31 | 32 | // Créer une date et une heure en GMT 33 | const temps = moment().format('HH:mm:ss'); 34 | const date = moment().format('DD/MM/YYYY'); 35 | 36 | let infoMsg = ` 37 | *JAMES MD IMPORTANT INFO* 38 | ❒───────────────────❒ 39 | *GITHUB LINK* 40 | > https://github.com/jtechde/james 41 | 42 | *WHATSAPP GROUP* 43 | > https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H 44 | ⁠ 45 | ╭───────────────────❒ 46 | │❒⁠⁠⁠⁠ *RAM* : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 47 | │❒⁠⁠⁠⁠ *DEV1* : *James* 48 | │❒⁠⁠⁠⁠ *DEV2* : *james* 49 | ⁠⁠⁠⁠╰───────────────────❒ 50 | `; 51 | 52 | let menuMsg = ` 53 | *james tech* 54 | 55 | ❒────────────────────❒`; 56 | 57 | var lien = mybotpic(); 58 | 59 | if (lien.match(/\.(mp4|gif)$/i)) { 60 | try { 61 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" , gifPlayback : true }, { quoted: ms }); 62 | } 63 | catch (e) { 64 | console.log("🥵🥵 Menu erreur " + e); 65 | repondre("🥵🥵 Menu erreur " + e); 66 | } 67 | } 68 | // Vérification pour .jpeg ou .png 69 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 70 | try { 71 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" }, { quoted: ms }); 72 | } 73 | catch (e) { 74 | console.log("🥵🥵 Menu erreur " + e); 75 | repondre("🥵🥵 Menu erreur " + e); 76 | } 77 | } 78 | else { 79 | 80 | repondre(infoMsg + menuMsg); 81 | 82 | } 83 | 84 | }); 85 | 86 | 87 | 88 | /*const util = require('util'); 89 | const fs = require('fs-extra'); 90 | const { zokou } = require(__dirname + "/../framework/zokou"); 91 | const { format } = require(__dirname + "/../framework/mesfonctions"); 92 | const os = require("os"); 93 | const moment = require("moment-timezone"); 94 | const s = require(__dirname + "/../set"); 95 | const more = String.fromCharCode(8206) 96 | const readmore = more.repeat(4001) 97 | 98 | zokou({ nomCom: "sc", categorie: "General" }, async (dest, zk, commandeOptions) => { 99 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 100 | let { cm } = require(__dirname + "/../framework//zokou"); 101 | var coms = {}; 102 | var mode = "public"; 103 | 104 | if ((s.MODE).toLocaleLowerCase() != "yes") { 105 | mode = "private"; 106 | } 107 | 108 | 109 | 110 | 111 | cm.map(async (com, index) => { 112 | if (!coms[com.categorie]) 113 | coms[com.categorie] = []; 114 | coms[com.categorie].push(com.nomCom); 115 | }); 116 | 117 | moment.tz.setDefault('Etc/GMT'); 118 | 119 | // Créer une date et une heure en GMT 120 | const temps = moment().format('HH:mm:ss'); 121 | const date = moment().format('DD/MM/YYYY'); 122 | 123 | let infoMsg = ` 124 | *BMW MD IMPORTANT INFO* 125 | ❒───────────────────❒ 126 | *GITHUB LINK* 127 | > https://github.com/ibrahimaitech/BMW-MD 128 | 129 | *WHATSAPP CHANNEL* 130 | > https://whatsapp.com/channel/0029VaZuGSxEawdxZK9CzM0Y 131 | 132 | *FOR MORE INFO TAP ON THE LINK BELOW* 133 | > https://github.com/IBRAHIM-TECH-AI/IBRAHIM-ADAMS-INFO⁠ 134 | ╭───────────────────❒ 135 | │❒⁠⁠⁠⁠ *RAM* : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 136 | │❒⁠⁠⁠⁠ *DEV* : *Ibrahim Adams* 137 | ⁠⁠⁠⁠╰───────────────────❒ 138 | `; 139 | 140 | let menuMsg = ` 141 | 𝑰𝑩𝑹𝑨𝑯𝑰𝑴 𝑨𝑫𝑨𝑴𝑺 𝑺𝑪𝑰𝑬𝑵𝑪𝑬 142 | 143 | ❒────────────────────❒`; 144 | 145 | var lien = mybotpic(); 146 | 147 | if (lien.match(/\.(mp4|gif)$/i)) { 148 | try { 149 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" , gifPlayback : true }, { quoted: ms }); 150 | } 151 | catch (e) { 152 | console.log("🥵🥵 Menu erreur " + e); 153 | repondre("🥵🥵 Menu erreur " + e); 154 | } 155 | } 156 | // Vérification pour .jpeg ou .png 157 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 158 | try { 159 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" }, { quoted: ms }); 160 | } 161 | catch (e) { 162 | console.log("🥵🥵 Menu erreur " + e); 163 | repondre("🥵🥵 Menu erreur " + e); 164 | } 165 | } 166 | else { 167 | 168 | repondre(infoMsg + menuMsg); 169 | 170 | } 171 | 172 | });*/ 173 | -------------------------------------------------------------------------------- /commandes/gitclone.js: -------------------------------------------------------------------------------- 1 | const { 2 | zokou 3 | } = require("../framework/zokou"); 4 | zokou({ 5 | 'nomCom': 'github', 6 | 'reaction': '📃', 7 | 'categorie': "Search" 8 | }, 9 | async (_0x52e003, _0x14d9f6, _0x5f1e4d) => { 10 | const _0x3c7f3f = _0x4f7595.join(" "); 11 | if (!_0x3c7f3f) { 12 | return _0x3b1d82("Give me a valid github username like: " + _0x4fdb82 + "github ibrahimaitech"); 13 | } 14 | const _0x5d3fd3 = await fetch("https://api.github.com/users/" + _0x3c7f3f); 15 | const _0x546dd2 = await _0x5d3fd3.json(); 16 | const _0x5892a1 = _0x546dd2.id; 17 | const _0x9d02ae = _0x546dd2.name; 18 | const _0x406595 = _0x546dd2.login; 19 | const _0x3a4d0f = _0x546dd2.bio; 20 | const _0x34623f = _0x546dd2.company; 21 | const _0x5b8e0e = _0x546dd2.location; 22 | const _0x24d738 = _0x546dd2.email; 23 | const _0x3a22e7 = _0x546dd2.blog; 24 | const _0x170599 = _0x546dd2.repos_url; 25 | const _0x1ada1e = _0x546dd2.gists_url; 26 | const _0x1f7a0c = _0x546dd2.followers; 27 | const _0x86d2d1 = _0x546dd2.following; 28 | await _0x3b1d82("\n °GITHUB USER INFO°\n \n🚩 Id : " + _0x5892a1 + "\n🔖 Name : " + _0x9d02ae + "\n🔖 Username : " + _0x406595 + "\n✨ Bio : " + _0x3a4d0f + "\n🏢 Company : " + _0x34623f + "\n📍 Location : " + _0x5b8e0e + "\n📧 Email : " + _0x24d738 + "\n📰 Blog : " + _0x3a22e7 + "\n🔓 Public Repo : " + _0x170599 + "\n🔐 Public Gists : " + _0x1ada1e + "\n👪 Followers : " + _0x1f7a0c + "\n🫶 Following : " + _0x86d2d1); 29 | }); 30 | -------------------------------------------------------------------------------- /commandes/hentai.js: -------------------------------------------------------------------------------- 1 | 2 | const {zokou } = require("../framework/zokou"); 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | let func = require('../framework/mesfonctions') ; 6 | let hdb = require('../bdd/hentai') ; 7 | 8 | 9 | zokou({ 10 | nomCom: "hwaifu", 11 | categorie: "Hentai", 12 | reaction: "🍑" 13 | }, 14 | async (origineMessage, zk, commandeOptions) => { 15 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 16 | 17 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 18 | 19 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 20 | 21 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 22 | 23 | const url = 'https://api.waifu.pics/nsfw/waifu'; // Remplace avec ton lien réel 24 | 25 | try { for (let i = 0 ; i < 5 ; i++ ) { 26 | const response = await axios.get(url); 27 | const imageUrl = response.data.url; 28 | 29 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); } 30 | } catch (error) { 31 | repondre('Error occurred while retrieving the data. : ' +error); 32 | } 33 | }); 34 | 35 | 36 | /////////////// hneko ////////// 37 | zokou({ 38 | nomCom: "trap", 39 | categorie: "Hentai", 40 | reaction: "🍑" 41 | }, 42 | async (origineMessage, zk, commandeOptions) => { 43 | 44 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 45 | 46 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 47 | 48 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 49 | 50 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 51 | 52 | 53 | const url = 'https://api.waifu.pics/nsfw/trap'; // Remplace avec ton lien réel 54 | 55 | try { for (let i = 0 ; i < 5 ; i++ ) { 56 | const response = await axios.get(url); 57 | const imageUrl = response.data.url; 58 | 59 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); } 60 | } catch (error) { 61 | repondre('Error occurred while retrieving the data. :', error); 62 | } 63 | }); 64 | 65 | zokou({ 66 | nomCom: "hneko", 67 | categorie: "Hentai", 68 | reaction: "🍑" 69 | }, 70 | async (origineMessage, zk, commandeOptions) => { 71 | 72 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 73 | 74 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 75 | 76 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 77 | 78 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 79 | 80 | const url = 'https://api.waifu.pics/nsfw/neko'//apiWaifu("neko"); // Remplace avec ton lien réel 81 | 82 | try { for (let i = 0 ;i < 5 ; i++) { 83 | const response = await axios.get(url); 84 | const imageUrl = response.data.url; 85 | 86 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); } 87 | } catch (error) { 88 | repondre('Error occurred while retrieving the data. :', error); 89 | } 90 | }); 91 | 92 | 93 | zokou({ 94 | nomCom: "blowjob", 95 | categorie: "Hentai", 96 | reaction: "🍑" 97 | }, 98 | async (origineMessage, zk, commandeOptions) => { 99 | 100 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 101 | 102 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 103 | 104 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 105 | 106 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 107 | 108 | const url = 'https://api.waifu.pics/nsfw/blowjob'; // Remplace avec ton lien réel 109 | 110 | try { for (let i = 0 ; i < 5 ; i++ ) { 111 | const response = await axios.get(url); 112 | const imageUrl = response.data.url; 113 | 114 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); } 115 | } catch (error) { 116 | repondre('Error occurred while retrieving the data. :', error); 117 | } 118 | }); 119 | 120 | 121 | 122 | zokou({ 123 | nomCom: "hentaivid", 124 | categorie: "Hentai", 125 | reaction: "🍑" 126 | }, 127 | async (origineMessage, zk, commandeOptions) => { 128 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 129 | 130 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 131 | 132 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 133 | 134 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 135 | 136 | try { 137 | 138 | let videos = await hentai() 139 | 140 | let length ; 141 | 142 | if (videos.length > 10) { 143 | length = 10 144 | } else { 145 | length = videos.length ; 146 | } 147 | 148 | 149 | 150 | let i = Math.floor(Math.random() * length) ; 151 | 152 | zk.sendMessage(origineMessage,{video :{url : videos[i].video_1}, caption : `*Title :* ${videos[i].title} \n *Category :* ${videos[i].category}`},{quoted : ms}) 153 | 154 | 155 | } catch (error) { 156 | console.log(error) 157 | } 158 | }); 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | async function hentai() { 167 | return new Promise((resolve, reject) => { 168 | const page = Math.floor(Math.random() * 1153) 169 | axios.get('https://sfmcompile.club/page/'+page) 170 | .then((data) => { 171 | const $ = cheerio.load(data.data) 172 | const hasil = [] 173 | $('#primary > div > div > ul > li > article').each(function (a, b) { 174 | hasil.push({ 175 | title: $(b).find('header > h2').text(), 176 | link: $(b).find('header > h2 > a').attr('href'), 177 | category: $(b).find('header > div.entry-before-title > span > span').text().replace('in ', ''), 178 | share_count: $(b).find('header > div.entry-after-title > p > span.entry-shares').text(), 179 | views_count: $(b).find('header > div.entry-after-title > p > span.entry-views').text(), 180 | type: $(b).find('source').attr('type') || 'image/jpeg', 181 | video_1: $(b).find('source').attr('src') || $(b).find('img').attr('data-src'), 182 | video_2: $(b).find('video > a').attr('href') || '' 183 | }) 184 | }) 185 | resolve(hasil) 186 | }) 187 | }) 188 | } 189 | -------------------------------------------------------------------------------- /commandes/heroku.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require('../framework/zokou'); 2 | const s = require('../set') 3 | 4 | 5 | zokou( 6 | { 7 | nomCom : "setvar", 8 | categorie : "heroku" 9 | }, async (dest , zk , commandeOptions) =>{ 10 | 11 | const {ms,repondre,superUser , arg} = commandeOptions ; 12 | 13 | if(!superUser){repondre('only Mods can use this commande');return}; 14 | if(!arg[0] || !(arg.join('').split('='))) {repondre('Bad format ; Exemple of using :\nSetvar OWNER_NAME=Ibrahim Adams');return}; 15 | 16 | const text = arg.join(" ") 17 | const Heroku = require("heroku-client"); 18 | 19 | const heroku = new Heroku({ 20 | token: s.HEROKU_APY_KEY, 21 | }); 22 | 23 | let baseURI = "/apps/" + s.HEROKU_APP_NAME; 24 | await heroku.patch(baseURI + "/config-vars", { 25 | body: { 26 | [text.split('=')[0]]: text.split('=')[1], 27 | }, 28 | }); 29 | await repondre('Heroku var changes , rebootings....') 30 | } 31 | ); 32 | 33 | zokou( 34 | { 35 | nomCom : "allvar", 36 | categorie : "heroku" 37 | }, async (dest , zk , commandeOptions) =>{ 38 | 39 | const {ms,repondre,superUser , arg} = commandeOptions ; 40 | 41 | if(!superUser){repondre('only mods can use this commande');return}; 42 | 43 | const Heroku = require("heroku-client"); 44 | 45 | const heroku = new Heroku({ 46 | token: s.HEROKU_APY_KEY, 47 | }); 48 | let baseURI = "/apps/" + s.HEROKU_APP_NAME; 49 | 50 | let h = await heroku.get(baseURI+'/config-vars') 51 | let str = '*BMW WABOT VARS*\n\n' 52 | for (vr in h) { 53 | str+= '🚘 *'+vr+'* '+'= '+h[vr]+'\n' 54 | } 55 | repondre(str) 56 | 57 | 58 | } 59 | 60 | ); 61 | 62 | 63 | zokou( 64 | { 65 | nomCom : "getvar", 66 | categorie : "heroku" 67 | }, async (dest , zk , commandeOptions) =>{ 68 | 69 | const {ms,repondre,superUser , arg} = commandeOptions ; 70 | 71 | if(!superUser){repondre('Only Mods can use this command');return}; 72 | if(!arg[0]) {repondre('insert the variable name in capital letter'); return} ; 73 | 74 | try { 75 | const Heroku = require("heroku-client"); 76 | 77 | const heroku = new Heroku({ 78 | token: s.HEROKU_APY_KEY, 79 | }); 80 | let baseURI = "/apps/" + s.HEROKU_APP_NAME; 81 | let h = await heroku.get(baseURI+'/config-vars') 82 | for (vr in h) { 83 | if( arg.join(' ') ===vr ) return repondre( vr+'= '+h[vr]) ; 84 | } 85 | 86 | } catch(e) {repondre('Error' + e)} 87 | 88 | }); 89 | 90 | -------------------------------------------------------------------------------- /commandes/igdl-fb-tk.js: -------------------------------------------------------------------------------- 1 | const {zokou} = require('../framework/zokou'); 2 | const fs = require('fs'); 3 | const getFBInfo = require("@xaviabot/fb-downloader"); 4 | const { default: axios } = require('axios'); 5 | 6 | zokou({nomCom : "instagram" , categorie : "Download"},async (dest , zk , commandeOptions)=>{ 7 | const {ms,repondre,arg} = commandeOptions ; 8 | 9 | let link = arg.join(' ') 10 | 11 | if (!arg[0]) { repondre('Veillez insérer un lien video instagramme');return}; 12 | 13 | try { 14 | 15 | let igvid = await axios('https://vihangayt.me/download/instagram?url='+link) 16 | 17 | if (igvid.data.data.data[0].type == 'video') { 18 | zk.sendMessage(dest,{video : {url : igvid.data.data.data[0].url},caption : "ig video downloader powered by *mustaffa-Md*",gifPlayback : false },{quoted : ms}) 19 | } 20 | else { 21 | zk.sendMessage(dest,{image : {url : igvid.data.data.data[0].url},caption : "ig image downloader powered by *mustaffa-Md*"}) 22 | } 23 | 24 | } catch (e) {repondre("erreur survenue lors du téléchargement \n " + e)} 25 | 26 | }); 27 | 28 | 29 | zokou({ 30 | nomCom: "facabook", 31 | categorie: "Download", 32 | reaction: "📽️" 33 | }, 34 | async (dest, zk, commandeOptions) => { 35 | const { repondre, ms, arg } = commandeOptions; 36 | 37 | if (!arg[0]) { 38 | repondre('Insert a public facebook video link!'); 39 | return; 40 | } 41 | 42 | const queryURL = arg.join(" "); 43 | 44 | try { 45 | getFBInfo(queryURL) 46 | .then((result) => { 47 | let caption = ` 48 | titre: ${result.title} 49 | Lien: ${result.url} 50 | `; 51 | zk.sendMessage(dest,{image : { url : result.thumbnail}, caption : caption},{quoted : ms}) ; 52 | zk.sendMessage(dest, { video: { url: result.hd }, caption: 'facebook video downloader powered by *popkid-MD*' }, { quoted: ms }); 53 | 54 | }) 55 | .catch((error) => {console.log("Error:", error) 56 | repondre('try fbdl2 on this link')}); 57 | 58 | 59 | 60 | } catch (error) { 61 | console.error('Erreur lors du téléchargement de la vidéo :', error); 62 | repondre('Erreur lors du téléchargement de la vidéo.' , error); 63 | } 64 | }); 65 | 66 | 67 | 68 | zokou({ nomCom: "tiktok", categorie: "Download", reaction: "🎵" }, async (dest, zk, commandeOptions) => { 69 | const { arg, ms, prefixe,repondre } = commandeOptions; 70 | if (!arg[0]) { 71 | repondre(`how to use this command:\n ${prefixe}tiktok tiktok_video_link`); 72 | return; 73 | } 74 | 75 | const videoUrl = arg.join(" "); 76 | 77 | let data = await axios.get('https://vihangayt.me/download/tiktok?url='+ videoUrl) ; 78 | 79 | let tik = data.data.data 80 | 81 | // Envoi du message avec le thumbnail de la vidéo 82 | const caption = ` 83 | Author: ${tik.author} 84 | Description: ${tik.desc} 85 | `; 86 | 87 | 88 | zk.sendMessage(dest, { video: { url: tik.links[0].a} , caption : caption },{quoted : ms}); 89 | 90 | 91 | }); 92 | 93 | zokou({ 94 | nomCom: "facebook2", 95 | categorie: "Download", 96 | reaction: "📽️" 97 | }, 98 | async (dest, zk, commandeOptions) => { 99 | const { repondre, ms, arg } = commandeOptions; 100 | 101 | if (!arg[0]) { 102 | repondre('Insert a public facebook video link! !'); 103 | return; 104 | } 105 | 106 | const queryURL = arg.join(" "); 107 | 108 | try { 109 | getFBInfo(queryURL) 110 | .then((result) => { 111 | let caption = ` 112 | titre: ${result.title} 113 | Lien: ${result.url} 114 | `; 115 | zk.sendMessage(dest,{image : { url : result.thumbnail}, caption : caption},{quoted : ms}) ; 116 | zk.sendMessage(dest, { video: { url: result.sd }, caption: 'facebook video downloader powered by *mustaffa-MD*' }, { quoted: ms }); 117 | 118 | }) 119 | .catch((error) => {console.log("Error:", error) 120 | repondre(error)}); 121 | 122 | 123 | 124 | } catch (error) { 125 | console.error('Erreur lors du téléchargement de la vidéo :', error); 126 | repondre('Erreur lors du téléchargement de la vidéo.' , error); 127 | } 128 | }); 129 | -------------------------------------------------------------------------------- /commandes/img.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | const {zokou} = require('../framework/zokou'); 5 | var gis = require('g-i-s'); 6 | 7 | 8 | zokou({ 9 | nomCom: "img", 10 | categorie: "Search", 11 | reaction: "📷" 12 | }, 13 | async (dest, zk, commandeOptions) => { 14 | const { repondre, ms, arg } = commandeOptions; 15 | 16 | if (!arg[0]) { 17 | repondre('which image ? !'); 18 | return; 19 | } 20 | 21 | const searchTerm = arg.join(" "); 22 | //repondre("termes " +searchTerm); 23 | gis(searchTerm,envoiImage); 24 | 25 | function envoiImage(e,r) 26 | { 27 | if(e){repondre("oups une error ")}else{for(var a=0;a<5;a++){zk.sendMessage(dest,{image:{url:r[a].url}},{quoted:ms});}} 28 | 29 | } 30 | 31 | //gis(searchTerm,envoiImage); 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /commandes/insult.js: -------------------------------------------------------------------------------- 1 | // What are you doing mothe fucker 🖕 find codes to another bot 2 | // Non visible script 3 | // Prepare yourself men don't disturb others 4 | 5 | const { zokou } = require("../framework/zokou"); 6 | const axios = require("axios"); 7 | 8 | zokou({ nomCom: "videologo", categorie: "Ai", reaction: "🔖" }, async (dest, zk, commandeOptions) => { 9 | const { ms, repondre, arg } = commandeOptions; 10 | const text = arg.join(" "); 11 | 12 | if (!text) { 13 | repondre("🤦Please provide a search thing."); 14 | return; 15 | } 16 | 17 | try { 18 | // Message content 19 | const messageText = `😁Reply with below alphabet to generate *${text}* logo 20 | 21 | A ☞ sweet love 💞😻 22 | B ☞ lightning pubg🕯️ 23 | C ☞ intro video 🎬 24 | D ☞ tiger 🐯 video logo 25 | 26 | *ᴍᴜsᴛᴀғғᴀ ᴛᴇᴄʜ 👻*`; 27 | 28 | const contextInfo = { 29 | mentionedJid: [ms.sender], // Mention the sender 30 | externalAdReply: { 31 | title: "JAMES MD", 32 | body: "ᴛᴀᴘ ʜᴇʀᴇ ᴛᴏ ғᴏʟʟᴏᴡ ᴏᴜʀ ᴄʜᴀɴɴᴇʟ", 33 | thumbnailUrl: "https://files.catbox.moe/eg2cgb.jpg", 34 | sourceUrl: "https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H", 35 | mediaType: 1, 36 | renderLargerThumbnail: true, 37 | }, 38 | }; 39 | 40 | const messageToSend = { 41 | text: messageText, 42 | contextInfo, 43 | }; 44 | 45 | // Send the message 46 | const sentMessage = await zk.sendMessage(dest, messageToSend, { quoted: ms }); 47 | 48 | // Event listener for message responses 49 | zk.ev.on('messages.upsert', async (update) => { 50 | const message = update.messages[0]; 51 | if (!message.message || !message.message.extendedTextMessage) { 52 | return; 53 | } 54 | 55 | const responseText = message.message.extendedTextMessage.text.trim(); 56 | if (message.message.extendedTextMessage.contextInfo && message.message.extendedTextMessage.contextInfo.stanzaId === sentMessage.key.id) { 57 | // Handle different logo choices based on alphabet 58 | let logoUrl; 59 | switch (responseText) { 60 | case 'A': 61 | logoUrl = await fetchLogoUrl("https://en.ephoto360.com/create-sweet-love-video-cards-online-734.html", text); 62 | break; 63 | case 'B': 64 | logoUrl = await fetchLogoUrl("https://en.ephoto360.com/lightning-pubg-video-logo-maker-online-615.html", text); 65 | break; 66 | case 'C': 67 | logoUrl = await fetchLogoUrl("https://en.ephoto360.com/free-logo-intro-video-maker-online-558.html", text); 68 | break; 69 | case 'D': 70 | logoUrl = await fetchLogoUrl("https://en.ephoto360.com/create-digital-tiger-logo-video-effect-723.html", text); 71 | break; 72 | 73 | // Add additional cases as required 74 | default: 75 | return repondre("🚫*_Invalid alphabet. Please reply with a valid alphabet._*"); 76 | } 77 | 78 | // Send the logo if URL is found 79 | if (logoUrl) { 80 | await zk.sendMessage(dest, { 81 | video: { url: logoUrl }, 82 | mimetype: "video/mp4", 83 | caption: `> ᴍᴜsᴛᴀғғᴀ ᴛᴇᴄʜ 👻`, 84 | }, { quoted: ms }); 85 | } 86 | } 87 | }); 88 | } catch (error) { 89 | console.log(error); 90 | repondre(`Error: ${error}`); 91 | } 92 | }); 93 | 94 | // Function to fetch the logo URL using axios 95 | const fetchLogoUrl = async (url, name) => { 96 | try { 97 | const response = await axios.get(`https://api-pink-venom.vercel.app/api/logo`, { 98 | params: { url, name } 99 | }); 100 | return response.data.result.download_url; // Ensure this is the correct path for the download URL in the API response 101 | } catch (error) { 102 | console.error("❌Error fetching logo:", error); 103 | return null; 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /commandes/mainly.js: -------------------------------------------------------------------------------- 1 | 2 | const { zokou } = require("../framework/zokou"); 3 | const axios = require("axios"); 4 | 5 | // Define the command with aliases 6 | keith({ 7 | nomCom: "lyrics", 8 | aliases: ["mistari", "lyric"], 9 | reaction: '⚔️', 10 | categorie: "search" 11 | }, async (dest, zk, params) => { 12 | const { repondre: sendResponse, arg: commandArgs, ms } = params; 13 | const text = commandArgs.join(" ").trim(); 14 | 15 | if (!text) { 16 | return sendResponse("Please provide a song name."); 17 | } 18 | 19 | // Function to get lyrics data from APIs 20 | const getLyricsData = async (url) => { 21 | try { 22 | const response = await axios.get(url); 23 | return response.data; 24 | } catch (error) { 25 | console.error('Error fetching data from API:', error); 26 | return null; 27 | } 28 | }; 29 | 30 | // List of APIs to try 31 | const apis = [ 32 | `https://api.dreaded.site/api/lyrics?title=${encodeURIComponent(text)}`, 33 | `https://some-random-api.com/others/lyrics?title=${encodeURIComponent(text)}`, 34 | `https://api.davidcyriltech.my.id/lyrics?title=${encodeURIComponent(text)}` 35 | ]; 36 | 37 | let lyricsData; 38 | for (const api of apis) { 39 | lyricsData = await getLyricsData(api); 40 | if (lyricsData && lyricsData.result && lyricsData.result.lyrics) break; 41 | } 42 | 43 | // Check if lyrics data was found 44 | if (!lyricsData || !lyricsData.result || !lyricsData.result.lyrics) { 45 | return sendResponse(`Failed to retrieve lyrics. Please try again.`); 46 | } 47 | 48 | const { title, artist, thumb, lyrics } = lyricsData.result; 49 | const imageUrl = thumb || "https://i.imgur.com/Cgte666.jpeg"; 50 | 51 | const caption = `**Title**: ${title}\n**Artist**: ${artist}\n\n${lyrics}`; 52 | 53 | try { 54 | // Fetch the image 55 | const imageResponse = await axios.get(imageUrl, { responseType: 'arraybuffer' }); 56 | const imageBuffer = Buffer.from(imageResponse.data, 'binary'); 57 | 58 | // Send the message with the image and lyrics 59 | await zk.sendMessage( 60 | dest, 61 | { 62 | image: imageBuffer, 63 | caption: caption 64 | }, 65 | { quoted: ms } 66 | ); 67 | 68 | } catch (error) { 69 | console.error('Error fetching or sending image:', error); 70 | // Fallback to sending just the text if image fetch fails 71 | await sendResponse(caption); 72 | } 73 | }); 74 | 75 | -------------------------------------------------------------------------------- /commandes/menu.js: -------------------------------------------------------------------------------- 1 | const _0xb2bfd7=_0x39f8;function _0x5fba(){const _0x219caa=[']\x0a┇\x20\x20🚀\x20*Commands*\x20:\x20','\x0a└─────═━┈┈━═─────⊷\x0a╭━━━━━∙⋆⋅⋆∙━\x20─┉─\x20•\x20─┉─⊷\x0a┇\x20\x20🖥\x20*Devlp*\x20:\x20james\x20tech\x0a┇\x20\x20🪀\x20*User*\x20:\x20','*Ibrahim-tech*','429571JDAIwP','categorie','3097544IAPhMw','4925400hKKrAb','totalmem','map','*\x20*■⊷*','format','toLocaleLowerCase','2eSZsvo','】\x0a┇\x20\x20🔑\x20ignition\x20:\x20[','HH:mm:ss','Africa/Nairobi','\x0a└──═━┈━═─\x20═──═━┈━═─⊷\x0a╒═════════════════○\x0a┇\x20『𝗕𝗢𝗧\x20𝗦𝗧𝗔𝗧𝗨𝗦』\x0a┇\x20\x20🛡️\x20Security\x20:\x20encrypted\x0a┇\x20\x20📡\x20*Platform*\x20:\x20','/../framework//zokou','66EOrbiF','General','moment-timezone','menu2','log','/../framework/mesfonctions','sendMessage','fs-extra','295854PDFEaY','*╭────■*\x20*','PREFIXE','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x0a\x0a\x20\x20\x20\x0a\x20\x20\x20*█✪█▓▓▓▓▓▓▓▓▓█✪█*\x0a\x20\x20\x20*█✪█▓▓▓▓▓▓▓▓▓█✪█*\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20*JAMES\x20MD\x202024🏆*\x20\x0a*❒───────────────────❒*\x0a','/../set','1214235YEYVeE','\x20\x0a┇\x20\x20⌚️\x20*Time*\x20:\x20','platform','9GTFJSH','\x0a┇\x20\x20🗺️\x20Region\x20:\x20Kenya\x0a┇\x20\x20☋️\x20Version\x20:\x20[LATEST\x202024]\x0a╘═════════════════○\x20\x20\x0a\x0a','private','yes','333137hPweSq','Je\x20suis\x20*Zokou-MD*,\x20développé\x20par\x20Djalega++','match','nomCom','repeat','fromCharCode','🥵🥵\x20Menu\x20erreur\x20','1284624jljmIh','\x0a┇───────────────────⊷\x0a┇\x20\x20🛸\x20*Mode*\x20:\x20【'];_0x5fba=function(){return _0x219caa;};return _0x5fba();}function _0x39f8(_0x36ec1b,_0x303646){const _0x5fbab2=_0x5fba();return _0x39f8=function(_0x39f8d4,_0x41c9c4){_0x39f8d4=_0x39f8d4-0xd7;let _0x5c59c8=_0x5fbab2[_0x39f8d4];return _0x5c59c8;},_0x39f8(_0x36ec1b,_0x303646);}(function(_0x2e06fe,_0x49f123){const _0x2f7aca=_0x39f8,_0x2cb0a9=_0x2e06fe();while(!![]){try{const _0x36388b=-parseInt(_0x2f7aca(0xe3))/0x1+-parseInt(_0x2f7aca(0xec))/0x2*(parseInt(_0x2f7aca(0xfa))/0x3)+-parseInt(_0x2f7aca(0xde))/0x4+-parseInt(_0x2f7aca(0xff))/0x5+parseInt(_0x2f7aca(0xf2))/0x6*(parseInt(_0x2f7aca(0xd7))/0x7)+parseInt(_0x2f7aca(0xe5))/0x8+parseInt(_0x2f7aca(0x102))/0x9*(parseInt(_0x2f7aca(0xe6))/0xa);if(_0x36388b===_0x49f123)break;else _0x2cb0a9['push'](_0x2cb0a9['shift']());}catch(_0x4c0053){_0x2cb0a9['push'](_0x2cb0a9['shift']());}}}(_0x5fba,0x4bf02));const util=require('util'),fs=require(_0xb2bfd7(0xf9)),{zokou}=require(__dirname+'/../framework/zokou'),{format}=require(__dirname+_0xb2bfd7(0xf7)),os=require('os'),moment=require(_0xb2bfd7(0xf4)),s=require(__dirname+_0xb2bfd7(0xfe)),more=String[_0xb2bfd7(0xdc)](0x200e),Taphere=more[_0xb2bfd7(0xdb)](0xfa1);zokou({'nomCom':_0xb2bfd7(0xf5),'categorie':_0xb2bfd7(0xf3)},async(_0x529dff,_0x46b5dc,_0x1bdaca)=>{const _0x2aa0c7=_0xb2bfd7;let {ms:_0x44c25d,repondre:_0x48bd8c,prefixe:_0x4b30f2,nomAuteurMessage:_0x12e0e7,mybotpic:_0x270cdd}=_0x1bdaca,{cm:_0xb9adc7}=require(__dirname+_0x2aa0c7(0xf1));var _0x4bfbd0={},_0x1408ae='public';s['MODE'][_0x2aa0c7(0xeb)]()!=_0x2aa0c7(0x105)&&(_0x1408ae=_0x2aa0c7(0x104));_0xb9adc7[_0x2aa0c7(0xe8)](async(_0x25c814,_0x5e557f)=>{const _0x14e122=_0x2aa0c7;if(!_0x4bfbd0[_0x25c814[_0x14e122(0xe4)]])_0x4bfbd0[_0x25c814['categorie']]=[];_0x4bfbd0[_0x25c814['categorie']]['push'](_0x25c814[_0x14e122(0xda)]);}),moment['tz']['setDefault'](_0x2aa0c7(0xef));const _0x444dac=moment()[_0x2aa0c7(0xea)](_0x2aa0c7(0xee)),_0x4c3e57=moment()[_0x2aa0c7(0xea)]('DD/MM/YYYY');let _0x23900a='\x0a┏━━━━━━━━━━━━━━━━━━━━┓\x0a┇\x20👋\x20*Hello*\x20:\x20'+s['OWNER_NAME']+_0x2aa0c7(0xdf)+_0x1408ae+_0x2aa0c7(0xed)+s[_0x2aa0c7(0xfc)]+_0x2aa0c7(0xe0)+_0xb9adc7['length']+_0x2aa0c7(0x100)+_0x444dac+'\x0a┇\x20\x20🖥️\x20System\x20:\x20James\x20Md\x20Bot\x0a┇\x20\x20📰\x20Bot\x20ID\x20:\x20JAMES\x0a└─────═━┈┈━═─────⊷\x0a┇\x20\x20📼\x20*Ram*\x20:\x20'+format(os[_0x2aa0c7(0xe7)]()-os['freemem']())+'/'+format(os[_0x2aa0c7(0xe7)]())+_0x2aa0c7(0xe1)+s['OWNER_NAME']+_0x2aa0c7(0xf0)+os[_0x2aa0c7(0x101)]+_0x2aa0c7(0x103),_0x2d75e8='\x20\x0a┌─────═━┈┈━═─═━┈┈━═─────⊷\x0a『𝗦𝗨𝗣𝗣𝗢𝗥𝗧』\x0a\x20🪀\x20Whatsapp:\x0a\x20✪https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H\x0a\x20📥\x20𝗧𝗘𝗟𝗘𝗚𝗥𝗔𝗠\x20:\x0a\x20⚉https://wa.me/+254 785016388\x0a\x20🟢\x20WACHANNEL\x20:\x0a\x20⚉https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H\x0a\x20🐈‍⬛\x20𝗚𝗜𝗧𝗛𝗨𝗕1:\x0a\x20©️jamesmd\x20CLONNERS\x20I\x27M\x20SORRY\x20BUT\x20ALSO\x20I\x27M\x20ENCRYPTED\x20JAMES\x20TECH\x0a\x20\x20\x20𝗘𝗡𝗝𝗢𝗬\x20JAMES\x0a└─────═━┈┈━═──═━┈┈━═─────⊷\x0a\x0a\x0a\x0a╭───────────────────❒\x0a│BOT\x20COMMANDS❒⁠⁠⁠⁠\x0a│JAMES\x20MD\x20BOT❒⁠⁠\x0a⁠⁠⁠⁠╰───────────────────❒\x0a>\x20james\x20\x0a';for(const _0x98f88b in _0x4bfbd0){_0x2d75e8+=_0x2aa0c7(0xfb)+_0x98f88b+_0x2aa0c7(0xe9);for(const _0x229642 of _0x4bfbd0[_0x98f88b]){_0x2d75e8+='\x20\x20\x0a*🔘*\x20'+_0x229642;}_0x2d75e8+='\x0a*❒───────────────────❒*\x20\x0a';}_0x2d75e8+=_0x2aa0c7(0xfd);var _0xb7cbe=_0x270cdd();if(_0xb7cbe['match'](/\.(mp4|gif)$/i))try{_0x46b5dc[_0x2aa0c7(0xf8)](_0x529dff,{'video':{'url':_0xb7cbe},'caption':_0x23900a+_0x2d75e8,'footer':_0x2aa0c7(0xd8),'gifPlayback':!![]},{'quoted':_0x44c25d});}catch(_0x28b4fc){console[_0x2aa0c7(0xf6)]('🥵🥵\x20Menu\x20erreur\x20'+_0x28b4fc),_0x48bd8c('🥵🥵\x20Menu\x20erreur\x20'+_0x28b4fc);}else{if(_0xb7cbe[_0x2aa0c7(0xd9)](/\.(jpeg|png|jpg)$/i))try{_0x46b5dc[_0x2aa0c7(0xf8)](_0x529dff,{'image':{'url':_0xb7cbe},'caption':_0x23900a+_0x2d75e8,'footer':_0x2aa0c7(0xe2)},{'quoted':_0x44c25d});}catch(_0x46a4a0){console[_0x2aa0c7(0xf6)](_0x2aa0c7(0xdd)+_0x46a4a0),_0x48bd8c(_0x2aa0c7(0xdd)+_0x46a4a0);}else _0x48bd8c(_0x23900a+_0x2d75e8);}}); 2 | -------------------------------------------------------------------------------- /commandes/menu.js.prec: -------------------------------------------------------------------------------- 1 | const util = require('util'); 2 | const fs = require('fs-extra'); 3 | const { zokou } = require(__dirname + "/../framework/zokou"); 4 | const { format, styletext } = require(__dirname + "/../framework/mesfonctions"); 5 | //const {police}=require(__dirname+"/../framework/mesfonctions") 6 | const os = require("os"); 7 | const moment = require("moment-timezone"); 8 | const s = require(__dirname + "/../set"); 9 | zokou({ nomCom: "menu", categorie: "General" }, async (dest, zk, commandeOptions) => { 10 | let { ms, repondre } = commandeOptions; 11 | let { cm } = require(__dirname + "/../framework//zokou"); 12 | var coms = {}; 13 | var mode = "public"; 14 | if ((s.MODE).toLocaleLowerCase() != "oui") { 15 | mode = "privé"; 16 | } 17 | var emoji = { "General": "🌐", "Logo": "🎨", "Hentai": "🔥", "Weeb": "🌸", "Recherche": "🔍", "Conversion": "🌟", "Groupe": "♻️", "Autre": "🪖" }; 18 | cm.map(async (com, index) => { if (!coms[com.categorie]) 19 | coms[com.categorie] = []; coms[com.categorie].push(com.nomCom); }); 20 | const temps = moment(moment()).format("HH:MM:SS"); 21 | moment.tz.setDefault('asia/karachi ').locale("id"); 22 | const date = moment.tz("asia/karachi").format("DD/MM/YYYY"); 23 | console.log("date" + date); 24 | console.log("temps " + temps); 25 | let menuMsg = " ╩═══ * Ƶ𝓞kØ𝓊 * ╩═══\n\n"; 26 | /*menuMsg+=` 27 | 28 | 29 | 30 | Owner : ${s.OWNER_NAME} \n || Commandes : ${cm.length} \n || Date : ${date}\n || Heure : ${temps} \n || Mémoire : ${format(os.totalmem()-os.freemem())}/${format(os.totalmem())}\n || Plateforme : ${os.platform()}\n || Developpeur : Djalega++ \n\n ╰────────────────`; 31 | 32 | 33 | 34 | 35 | 36 | ╚═════ ▓▓ ࿇ ▓▓ ═════╝*/ 37 | /* menuMsg+=` 38 | ╔════ ▓▓ ࿇ ▓▓ ════╗ 39 | 40 | || 41 | || Préfixe : ${s.prefixe} 42 | || Owner : ${s.OWNER_NAME} 43 | || Commandes : ${cm.length} 44 | || Date : ${date} 45 | || Heure : ${temps} 46 | || Mémoire : ${format(os.totalmem()-os.freemem())}/${format(os.totalmem())} {Plateforme : ${os.platform()} 47 | || Développeurs : Djalega++||Luffy 48 | || 49 | ╚════ ▓▓ ࿇ ▓▓ ════╝`;*/ 50 | menuMsg += ` 51 | ╔════--------- 52 | ║ Préfixe : ${s.PREFIXE} 53 | ║ Owner : ${s.OWNER_NAME} 54 | ║ Mode : ${mode} 55 | ║ Commandes:${cm.length} 56 | ║ Date : ${date} 57 | ║ Heure : ${temps} 58 | ║ Mémoire : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 59 | ║ Plateforme : ${os.platform()} 60 | ║ Développeurs : Djalega++||Luffy 61 | ╚════--------------- \n\n`; 62 | for (const cat in coms) { 63 | if (!emoji[cat]) { 64 | emoji[cat] = "💞"; 65 | } 66 | menuMsg += `${emoji[cat]} ══ *${cat} * ══ ${emoji[cat]}\n`; 67 | for (const cmd of coms[cat]) { 68 | menuMsg += "\t ║ " + cmd + "" + " \n"; 69 | } 70 | } 71 | // var link = "https://wallpapercave.com/uwp/uwp3860299.jpeg"; 72 | var link = s.IMAGE_MENU; 73 | try { 74 | zk.sendMessage(dest, { image: { url: link }, caption: menuMsg, footer: "by Djalega++" }, { quoted: ms }); 75 | } 76 | catch (e) { 77 | console.log("🥵🥵 Menu erreur " + e); 78 | repondre("🥵🥵 Menu erreur " + e); 79 | } 80 | }); 81 | /* 82 | 83 | 84 | module.exports.commande =()=> 85 | { 86 | var nomCom=["menu","m","fonctions"]; 87 | var reaction="🐞" 88 | var categorie="General" 89 | 90 | 91 | return {nomCom,reaction,categorie,execute} 92 | 93 | // };* 94 | 95 | 96 | 97 | //var g=[]; 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | var tt=[] 114 | 115 | async function execute(dest,zok,commandeOptions?) 116 | { 117 | 118 | var link = "https://wallpapercave.com/uwp/uwp3860299.jpeg" 119 | // var listCom =listeCommande() 120 | let msg= " ╩═══ * Ƶ𝓞kØ𝓊 * ╩═══\n\n" 121 | 122 | 123 | //const listeCommande= async ()=> { 124 | var tab=[];var tabCmd=[]; 125 | const tabCat= {}; 126 | const readDir = util.promisify(fs.readdir); 127 | const readFile = util.promisify(fs.readFile); 128 | //console.log("ch " + __dirname + '../') 129 | var chemin= './commandes/' 130 | var nomFichier = await readDir(__dirname) 131 | //console.log("installation des plugins ... ") 132 | nomFichier.forEach((fichier) => { 133 | if (fichier.endsWith(".js")) { 134 | //console.log(fichier+" installé ✅") 135 | // var { commande } = require(/**/ //'../'+chemin.replace(/./, '')+*/__dirname+'/'+fichier.split('.js')[0]) 136 | // var infoCom = commande() 137 | // if(!infoCom.categorie) infoCom.categorie="General" 138 | // tabCat[infoCom.categorie].push(infoCom.nomCom[0]) 139 | // tabCmd[infoCom.nomCom[0]] 140 | /* for(a of infoCom.categorie) 141 | { 142 | if(!msg.includes(a)) 143 | { 144 | msg+=a+"\n" 145 | msg+=infoCom.nomCom[0]+"\n" 146 | }else{msg+=infoCom.nomCom[0]+"\n"} 147 | 148 | }*/ 149 | //msg+=infoCom.categorie+infoCom.nomCom[0] 150 | //msg+=`🪰 ${infoCom.nomCom[0]} `+"\n" 151 | // tu = infoCom.nomCom[1] 152 | /* for(var b=0;b<=infoCom.nomCom[0].length;b++) 153 | { 154 | msg+=infoCom.nomCom[b] 155 | }*/ 156 | /** ************************** */ 157 | // for (var a of infoCom.nomCom[0]) { 158 | // console.log("aaaa "+a +" "+typeof a) 159 | // tu.push(a) 160 | // msg+=a.normalize()+"\n" 161 | // msg+=infoCom.nomCom[0] 162 | // msg+=infoCom.nomCom[0] 163 | // msg+=infoCom.nomCom[0] 164 | // tu[a]=infoCom.nomCom[0] 165 | // tt.push(infoCom.nomCom[a]) 166 | //tabCmd[a] = infoCom.execute 167 | // reaction[a]=infoCom.reaction 168 | // } 169 | /** ********************************************* */ 170 | // } 171 | //console.log("installation de plugins terminé 👍🏿") 172 | // return tab 173 | // }) 174 | // console.log("fichier "+typeof nomFichier) 175 | //var txt=""; 176 | /* for(var ctg in tabCat) 177 | { 178 | txt+=ctg; 179 | txt+=tabCat.nomCom 180 | }*/ 181 | //} 182 | //var coms={} 183 | /* tabCmd.map 184 | (async (cmds)=> 185 | { 186 | if(!coms[cmds.categerie]) 187 | coms[cmds.categorie]="General" 188 | coms[cmds.categorie].push(cmds) 189 | 190 | } 191 | 192 | 193 | 194 | )*/ 195 | /* for(let a=0;a<=listeCommande.length;a++) 196 | { 197 | msg +=tt[a] 198 | }*/ 199 | /* 200 | for(const categorie in tabCat) 201 | { 202 | msg+="*"+categorie+"*"+"\n" 203 | 204 | for(const comm of tabCat[categorie]) 205 | { 206 | msg+=+'\n'+comm 207 | }} 208 | 209 | await zok.sendMessage(dest,{image :{url:link},caption:msg+txt}); 210 | 211 | */ 212 | // 213 | // } 214 | -------------------------------------------------------------------------------- /commandes/musModi.js: -------------------------------------------------------------------------------- 1 | //mustaffa 2 | -------------------------------------------------------------------------------- /commandes/musMods.js: -------------------------------------------------------------------------------- 1 | //pop 2 | -------------------------------------------------------------------------------- /commandes/musuptime.js: -------------------------------------------------------------------------------- 1 | //0900 2 | -------------------------------------------------------------------------------- /commandes/parole.js: -------------------------------------------------------------------------------- 1 | const {zokou} =require("../framework/zokou"); 2 | const axios =require("axios"); 3 | 4 | 5 | zokou({ nomCom: "lyrics", 6 | reaction: "✨", 7 | categorie: "Search" }, async (dest, zk, commandeOptions) => { 8 | 9 | const { repondre, arg, ms } = commandeOptions; 10 | 11 | try { 12 | 13 | if (!arg || arg.length === 0) return repondre("Where is the name of musique"); 14 | 15 | let result = await axios.get(`https://vihangayt.me/search/lyrics?q=${arg.join(' ')}`); 16 | 17 | let lyrics = result.data.data; 18 | 19 | if (lyrics.error) return repondre("no lyrics found"); 20 | 21 | let msg = `---------Anyway-lyrics-finder-------- 22 | 23 | * *Artist :* ${lyrics.artist} 24 | 25 | 26 | * *Title :* ${lyrics.title} 27 | 28 | 29 | ${lyrics.lyrics}` 30 | 31 | zk.sendMessage(dest,{image : { url : './media/lyrics-img.jpg'} , caption : msg}, { quoted : ms }); 32 | 33 | } catch (err) { 34 | repondre('Error') 35 | } 36 | }) 37 | -------------------------------------------------------------------------------- /commandes/popkidhand2.js: -------------------------------------------------------------------------------- 1 | const { 2 | zokou 3 | } = require("../framework/zokou"); 4 | const { 5 | default: axios 6 | } = require("axios"); 7 | const pkg = require("@whiskeysockets/baileys"); 8 | const { 9 | generateWAMessageFromContent, 10 | proto 11 | } = pkg; 12 | async function getOAuthToken() { 13 | const _0x1800eb = Buffer.from("QGaqwC8O8nJev72LGOiUxEBZe3ZTVo9wEfGkWAEaTgrZlAC5:MANcOYqdyGatG7AXPrckj5AtQnvLWEKxJtxibgJqFxtgUxiiAAqwOlbb3WE2gAeP").toString("base64"); 14 | try { 15 | const _0x4f97d8 = await axios.get("https://sandbox.vodacom.co.tz/oauth/v1/generate?grant_type=client_credentials", { 16 | 'headers': { 17 | 'Authorization': "Basic " + _0x1800eb 18 | } 19 | }); 20 | return _0x4f97d8.data.access_token; 21 | } catch (_0x53426d) { 22 | console.error("Error generating OAuth token:", _0x53426d.message); 23 | throw new Error("Failed to authenticate with M-Pesa API."); 24 | } 25 | } 26 | async function topUpAirtime(_0x29df76, _0x36bcae) { 27 | const _0x59f076 = await getOAuthToken(); 28 | const _0x56b7d8 = { 29 | 'CommandID': "CustomerPayBillOnline", 30 | 'Amount': _0x36bcae, 31 | 'Msisdn': _0x29df76, 32 | 'BillRefNumber': "TopUp" 33 | }; 34 | try { 35 | const _0x3bf04a = await axios.post("https://sandbox.vodacom.co.tz/mpesa/stkpush/v1/processrequest", _0x56b7d8, { 36 | 'headers': { 37 | 'Authorization': "Bearer " + _0x59f076 38 | } 39 | }); 40 | return _0x3bf04a.data; 41 | } catch (_0x4740ed) { 42 | console.error("Error performing top-up:", _0x4740ed.message); 43 | throw new Error("Failed to top-up airtime."); 44 | } 45 | } 46 | async function sendMoney(_0xa64ce1, _0x3c87fa) { 47 | const _0x297c78 = await getOAuthToken(); 48 | const _0xb4b207 = { 49 | 'CommandID': "Pay", 50 | 'Amount': _0x3c87fa, 51 | 'Msisdn': _0xa64ce1, 52 | 'BillRefNumber': "Transfer" 53 | }; 54 | try { 55 | const _0x165a69 = await axios.post("https://sandbox.vodacom.co.tz/mpesa/sendmoney/v1/processrequest", _0xb4b207, { 56 | 'headers': { 57 | 'Authorization': "Bearer " + _0x297c78 58 | } 59 | }); 60 | return _0x165a69.data; 61 | } catch (_0x5690a4) { 62 | console.error("Error sending money:", _0x5690a4.message); 63 | throw new Error("Failed to send money."); 64 | } 65 | } 66 | const validPins = new Set(); 67 | zokou({ 68 | 'nomCom': "mpesa", 69 | 'reaction': '💵', 70 | 'categorie': "mpesa" 71 | }, async (_0xd1eb79, _0x3f6804, _0x2bb9e5) => { 72 | const { 73 | repondre: _0x57b852, 74 | arg: _0x54803c 75 | } = _0x2bb9e5; 76 | const _0x1e99e1 = _0x54803c[0]; 77 | try { 78 | switch (_0x1e99e1) { 79 | case "menu": 80 | const _0x4adada = _0x54803c[1]; 81 | if (!_0x4adada) { 82 | return _0x57b852("Usage: .mpesa menu [PIN]"); 83 | } 84 | if (!validPins.has(_0x4adada)) { 85 | return _0x57b852("Invalid PIN. Access denied."); 86 | } 87 | await _0x57b852("M-Pesa Menu:\n- *Top-Up Airtime*: .mpesa topup [phone] [amount]\n- *Send Money*: .mpesa send [phone] [amount]\n- *Check Balance*: .mpesa balance\n "); 88 | break; 89 | case "topup": 90 | const _0x2bbb72 = _0x54803c[1]; 91 | const _0x300623 = _0x54803c[2]; 92 | if (!_0x2bbb72 || !_0x300623) { 93 | return _0x57b852("Usage: .mpesa topup [phone] [amount]"); 94 | } 95 | await _0x57b852("Processing your airtime top-up..."); 96 | const _0x1bb6f8 = await topUpAirtime(_0x2bbb72, _0x300623); 97 | await _0x57b852("Top-up response: " + JSON.stringify(_0x1bb6f8)); 98 | break; 99 | case "send": 100 | const _0x321480 = _0x54803c[1]; 101 | const _0x2fe3d2 = _0x54803c[2]; 102 | if (!_0x321480 || !_0x2fe3d2) { 103 | return _0x57b852("Usage: .mpesa send [phone] [amount]"); 104 | } 105 | await _0x57b852("Processing your money transfer..."); 106 | const _0x3732d0 = await sendMoney(_0x321480, _0x2fe3d2); 107 | await _0x57b852("Send money response: " + JSON.stringify(_0x3732d0)); 108 | break; 109 | case "balance": 110 | await _0x57b852("Checking your M-Pesa balance..."); 111 | await _0x57b852("To check your balance, please visit the M-Pesa app or dial *102#."); 112 | break; 113 | default: 114 | await _0x57b852("Unknown command. Please use .mpesa menu to see available options."); 115 | } 116 | } catch (_0x337f6e) { 117 | console.error("Error processing M-Pesa command:", _0x337f6e.message); 118 | _0x57b852("Error processing M-Pesa command."); 119 | } 120 | }); 121 | -------------------------------------------------------------------------------- /commandes/popshand3.js: -------------------------------------------------------------------------------- 1 | const {zokou} =require("../framework/zokou"); 2 | const axios =require("axios"); 3 | 4 | 5 | zokou({ nomCom: "cast", 6 | reaction: "🥵", 7 | alias: ["bc"], 8 | desc: "Bot makes a broadcast in all groups", 9 | fromMe: true, 10 | category: "group", 11 | filename: __filename, 12 | use: '', 13 | }, 14 | async(Void, citel, text) => { 15 | if (!isCreator) return citel.reply(tlang().owner) 16 | let getGroups = await Void.groupFetchAllParticipating(); 17 | let groups = Object.entries(getGroups) 18 | .slice(0) 19 | .map((entry) => entry[1]); 20 | let anu = groups.map((v) => v.id); 21 | citel.reply(`Send Broadcast To ${anu.length} Group Chat, Finish Time ${ 22 | anu.length * 1.5 23 | } second`); 24 | for (let i of anu) { 25 | await sleep(1500); 26 | let txt = `*--💞${tlang().title} Broadcast💞--*\n\n *🌹Author:* ${citel.pushName}\n\n${text}`; 27 | let buttonMessaged = { 28 | image: "https://files.catbox.moe/eg2cgb.jpg," 29 | caption: txt, 30 | footer: citel.pushName, 31 | headerType: 1, 32 | contextInfo: { 33 | forwardingScore: 999, 34 | isForwarded: false, 35 | externalAdReply: { 36 | title: 'Broadcast by ' + citel.pushName, 37 | body: tlang().title, 38 | thumbnail: "https://files.catbox.moe/eg2cgb.jpg," 39 | mediaUrl: '', 40 | mediaType: 2, 41 | sourceUrl: gurl, 42 | showAdAttribution: true, 43 | }, 44 | }, 45 | }; 46 | await Void.sendMessage(i, buttonMessaged, { 47 | quoted: citel, 48 | }); 49 | } 50 | citel.reply(`*Successful Sending Broadcast To ${anu.length} Group(s)*`); 51 | } 52 | ) 53 | -------------------------------------------------------------------------------- /commandes/profile.js: -------------------------------------------------------------------------------- 1 | const {zokou} = require("../framework/zokou"); 2 | const conf = require("../set") 3 | const {jidDecode}=require("@whiskeysockets/baileys") 4 | 5 | 6 | zokou( { 7 | nomCom : "profile", 8 | categorie : "Fun", 9 | }, 10 | async(dest,zk, commandeOptions)=> { 11 | 12 | const {ms , arg, repondre,auteurMessage,nomAuteurMessage, msgRepondu , auteurMsgRepondu} = commandeOptions ; 13 | let jid = null 14 | let nom = null ; 15 | 16 | 17 | 18 | 19 | 20 | if (!msgRepondu) { 21 | jid = auteurMessage; 22 | nom = nomAuteurMessage; 23 | 24 | try { ppUrl = await zk.profilePictureUrl(jid , 'image') ; } catch { ppUrl = conf.IMAGE_MENU}; 25 | const status = await zk.fetchStatus(jid) ; 26 | 27 | mess = { 28 | image : { url : ppUrl }, 29 | caption : '*Nom :* '+ nom + '\n*Status :*\n' + status.status 30 | } 31 | 32 | } else { 33 | jid = auteurMsgRepondu; 34 | nom ="@"+auteurMsgRepondu.split("@")[0] ; 35 | 36 | try { ppUrl = await zk.profilePictureUrl(jid , 'image') ; } catch { ppUrl = conf.IMAGE_MENU}; 37 | const status = await zk.fetchStatus(jid) ; 38 | 39 | mess = { 40 | image : { url : ppUrl }, 41 | caption : '*Name :* '+ nom + '\n*Status :*\n' + status.status, 42 | mentions:[auteurMsgRepondu] 43 | } 44 | 45 | } ; 46 | 47 | 48 | 49 | 50 | 51 | zk.sendMessage(dest,mess,{quoted : ms}) 52 | }); 53 | -------------------------------------------------------------------------------- /commandes/proprio.js: -------------------------------------------------------------------------------- 1 | const {zokou}=require("../framework/zokou") 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | zokou({nomCom:"reboot",categorie:"Mods",reaction:"👨🏿‍💼"},async(dest,z,com)=>{ 10 | 11 | 12 | 13 | const{repondre,ms,dev,superUser}=com; 14 | 15 | if(!superUser) 16 | { 17 | return repondre("This command is for owner only"); 18 | } 19 | 20 | const {exec}=require("child_process") 21 | 22 | repondre("*restarting ...*"); 23 | 24 | exec("pm2 restart all"); 25 | 26 | 27 | 28 | 29 | 30 | 31 | }) -------------------------------------------------------------------------------- /commandes/reaction.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const { zokou } = require("../framework/zokou"); 3 | const fs = require("fs-extra"); 4 | const { exec } = require("child_process"); 5 | const child_process = require('child_process'); 6 | const {unlink } = require ('fs').promises ; 7 | 8 | 9 | // fonction sleep 10 | 11 | const sleep = (ms) =>{ 12 | return new Promise((resolve) =>{ setTimeout (resolve, ms)}) 13 | 14 | } 15 | 16 | // Fonction pour la conversion de GIF en vidéo et récupération du buffer vidéo 17 | const GIFBufferToVideoBuffer = async (image) => { 18 | const filename = `${Math.random().toString(36)}`; 19 | await fs.writeFileSync(`./${filename}.gif`, image); 20 | child_process.exec( 21 | `ffmpeg -i ./${filename}.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" ./${filename}.mp4` 22 | ); 23 | await sleep(4000); 24 | 25 | var buffer5 = await fs.readFileSync(`./${filename}.mp4`); 26 | Promise.all([unlink(`./${filename}.mp4`), unlink(`./${filename}.gif`)]); 27 | return buffer5; 28 | }; 29 | 30 | const generateReactionCommand = (reactionName, reactionEmoji) => { 31 | zokou({ 32 | nomCom: reactionName, 33 | categorie: "Reaction", 34 | reaction: reactionEmoji, 35 | }, 36 | async (origineMessage, zk, commandeOptions) => { 37 | const { auteurMessage, auteurMsgRepondu, repondre, ms, msgRepondu } = commandeOptions; 38 | 39 | const url = `https://api.waifu.pics/sfw/${reactionName}`; 40 | try { 41 | const response = await axios.get(url); 42 | const imageUrl = response.data.url; 43 | 44 | // Obtenir le buffer du GIF en utilisant la fonction getBuffer 45 | const gifBufferResponse = await axios.get(imageUrl, { 46 | responseType: 'arraybuffer' }) ; 47 | const gifBuffer = await gifBufferResponse.data; 48 | 49 | // Convertir le GIF en vidéo et obtenir le buffer vidéo 50 | const videoBuffer = await GIFBufferToVideoBuffer(gifBuffer); 51 | 52 | // Envoyer la vidéo avec Zokou 53 | if (msgRepondu) { 54 | var txt =` @${auteurMessage.split("@")[0]} ${reactionName} @${auteurMsgRepondu.split("@")[0]}` 55 | zk.sendMessage(origineMessage, { video: videoBuffer,gifPlayback: true,caption:txt,mentions:[auteurMessage,auteurMsgRepondu] }, { quoted: ms }); 56 | 57 | } else { 58 | const videoMessage = { 59 | video: videoBuffer, 60 | gifPlayback: true, 61 | caption: `@${auteurMessage.split("@")[0]} ${reactionName} everyone`, 62 | mentions: [auteurMessage] 63 | }; 64 | zk.sendMessage(origineMessage, videoMessage, { quoted: ms }); 65 | } 66 | 67 | } catch (error) { 68 | repondre('Error occurred while retrieving the data. :' + error); 69 | console.log(error); 70 | } 71 | }); 72 | }; 73 | 74 | // ... (utilisation de la fonction generateReactionCommand pour créer des commandes de réaction) 75 | 76 | 77 | generateReactionCommand("bully", "👊"); 78 | generateReactionCommand("cuddle", "🤗"); 79 | generateReactionCommand("cry", "😢"); 80 | generateReactionCommand("hug", "😊"); 81 | generateReactionCommand("awoo", "🐺"); 82 | generateReactionCommand("kiss", "😘"); 83 | generateReactionCommand("lick", "👅"); 84 | generateReactionCommand("pat", "👋"); 85 | generateReactionCommand("smug", "😏"); 86 | generateReactionCommand("bonk", "🔨"); 87 | generateReactionCommand("yeet", "🚀"); 88 | generateReactionCommand("blush", "😊"); 89 | generateReactionCommand("smile", "😄"); 90 | generateReactionCommand("wave", "👋"); 91 | generateReactionCommand("highfive"); 92 | generateReactionCommand("handhold"); 93 | generateReactionCommand("nom","👅" ); 94 | generateReactionCommand("bite", "🦷"); 95 | generateReactionCommand("glomp", "🤗"); 96 | generateReactionCommand("slap", "👋"); 97 | generateReactionCommand("kill", "💀"); 98 | generateReactionCommand("kick", "🦵"); 99 | generateReactionCommand("happy", "😄"); 100 | generateReactionCommand("wink", "😉"); 101 | generateReactionCommand("poke", "👉"); 102 | generateReactionCommand("dance", "💃"); 103 | generateReactionCommand("cringe", "😬"); 104 | -------------------------------------------------------------------------------- /commandes/repo.js: -------------------------------------------------------------------------------- 1 | const util = require('util'); 2 | const fs = require('fs-extra'); 3 | const { zokou } = require(__dirname + "/../framework/zokou"); 4 | const { format } = require(__dirname + "/../framework/mesfonctions"); 5 | const os = require("os"); 6 | const moment = require("moment-timezone"); 7 | const s = require(__dirname + "/../set"); 8 | const more = String.fromCharCode(8206) 9 | const readmore = more.repeat(4001) 10 | 11 | zokou({ nomCom: "repo", categorie: "General" }, async (dest, zk, commandeOptions) => { 12 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 13 | let { cm } = require(__dirname + "/../framework//zokou"); 14 | var coms = {}; 15 | var mode = "public"; 16 | 17 | if ((s.MODE).toLocaleLowerCase() != "yes") { 18 | mode = "private"; 19 | } 20 | 21 | 22 | 23 | 24 | cm.map(async (com, index) => { 25 | if (!coms[com.categorie]) 26 | coms[com.categorie] = []; 27 | coms[com.categorie].push(com.nomCom); 28 | }); 29 | 30 | moment.tz.setDefault('Etc/GMT'); 31 | 32 | // Créer une date et une heure en GMT 33 | const temps = moment().format('HH:mm:ss'); 34 | const date = moment().format('DD/MM/YYYY'); 35 | 36 | let infoMsg = ` 37 | *𝐉𝐀𝐌𝐄𝐒 𝐈𝐍𝐅𝐎* 38 | ❒───────────────────❒ 39 | *GITHUB LINK* 40 | > https://github.com/jtechde/james 41 | 42 | *𝐂𝐇𝐀𝐍𝐍𝐄𝐋* 43 | > https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H 44 | ⁠ 45 | ╭───────────────────❒ 46 | │👌 *RAM* : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 47 | │🔥 *DEV1* : *JAMES* 48 | │🕷️ *DEV2* : *JAMESTECH* 49 | ⁠⁠⁠⁠╰───────────────────❒ 50 | `; 51 | 52 | let menuMsg = ` 53 | *JAMES TECH* 54 | 55 | ❒────────────────────❒`; 56 | 57 | var lien = mybotpic(); 58 | 59 | if (lien.match(/\.(mp4|gif)$/i)) { 60 | try { 61 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *jamesmd*, déveloper jamea Tech" , gifPlayback : true }, { quoted: ms }); 62 | } 63 | catch (e) { 64 | console.log("🥵🥵 Menu erreur " + e); 65 | repondre("🥵🥵 Menu erreur " + e); 66 | } 67 | } 68 | // Vérification pour .jpeg ou .png 69 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 70 | try { 71 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *jamesmd*, déveloper James Tech" }, { quoted: ms }); 72 | } 73 | catch (e) { 74 | console.log("🥵🥵 Menu erreur " + e); 75 | repondre("🥵🥵 Menu erreur " + e); 76 | } 77 | } 78 | else { 79 | 80 | repondre(infoMsg + menuMsg); 81 | 82 | } 83 | 84 | }); 85 | -------------------------------------------------------------------------------- /commandes/sc.js: -------------------------------------------------------------------------------- 1 | const util = require('util'); 2 | const fs = require('fs-extra'); 3 | const { zokou } = require(__dirname + "/../framework/zokou"); 4 | const { format } = require(__dirname + "/../framework/mesfonctions"); 5 | const os = require("os"); 6 | const moment = require("moment-timezone"); 7 | const s = require(__dirname + "/../set"); 8 | const more = String.fromCharCode(8206) 9 | const readmore = more.repeat(4001) 10 | 11 | zokou({ nomCom: "git", categorie: "General" }, async (dest, zk, commandeOptions) => { 12 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 13 | let { cm } = require(__dirname + "/../framework//zokou"); 14 | var coms = {}; 15 | var mode = "public"; 16 | 17 | if ((s.MODE).toLocaleLowerCase() != "yes") { 18 | mode = "private"; 19 | } 20 | 21 | 22 | 23 | 24 | cm.map(async (com, index) => { 25 | if (!coms[com.categorie]) 26 | coms[com.categorie] = []; 27 | coms[com.categorie].push(com.nomCom); 28 | }); 29 | 30 | moment.tz.setDefault('Etc/GMT'); 31 | 32 | // Créer une date et une heure en GMT 33 | const temps = moment().format('HH:mm:ss'); 34 | const date = moment().format('DD/MM/YYYY'); 35 | 36 | let infoMsg = ` 37 | *MUSTAFFA 𝗠𝗗 𝗜𝗡𝗙𝗢* 38 | ❒───────────────────❒ 39 | *𝗚𝗜𝗧𝗛𝗨𝗕 𝗟𝗜𝗡𝗞* 40 | > https://github.com/Mustaffamkm/MUSTAFFAMK- 41 | 42 | *𝗠𝗬 𝗖𝗛𝗔𝗡𝗡𝗘𝗟* 43 | > https://whatsapp.com/channel/0029VawBbI40AgWKACOjdm1T 44 | ⁠ 45 | ╭───────────────────❒ 46 | │⏰⁠⁠⁠⁠ *RAM* : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 47 | │⚽ *DEV1* : *MUSTAFFA👌* 48 | │⏰ *DEV2* : *MUSTAFFA* 49 | ⁠⁠⁠⁠╰───────────────────❒ 50 | `; 51 | 52 | let menuMsg = ` 53 | *MUSTAFFA 𝗧𝗘𝗖𝗛* 54 | 55 | ❒────────────────────❒`; 56 | 57 | var lien = mybotpic(); 58 | 59 | if (lien.match(/\.(mp4|gif)$/i)) { 60 | try { 61 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" , gifPlayback : true }, { quoted: ms }); 62 | } 63 | catch (e) { 64 | console.log("🥵🥵 Menu erreur " + e); 65 | repondre("🥵🥵 Menu erreur " + e); 66 | } 67 | } 68 | // Vérification pour .jpeg ou .png 69 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 70 | try { 71 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" }, { quoted: ms }); 72 | } 73 | catch (e) { 74 | console.log("🥵🥵 Menu erreur " + e); 75 | repondre("🥵🥵 Menu erreur " + e); 76 | } 77 | } 78 | else { 79 | 80 | repondre(infoMsg + menuMsg); 81 | 82 | } 83 | 84 | }); 85 | 86 | 87 | /*const util = require('util'); 88 | const fs = require('fs-extra'); 89 | const { zokou } = require(__dirname + "/../framework/zokou"); 90 | const { format } = require(__dirname + "/../framework/mesfonctions"); 91 | const os = require("os"); 92 | const moment = require("moment-timezone"); 93 | const s = require(__dirname + "/../set"); 94 | const more = String.fromCharCode(8206) 95 | const readmore = more.repeat(4001) 96 | 97 | zokou({ nomCom: "git", categorie: "General" }, async (dest, zk, commandeOptions) => { 98 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 99 | let { cm } = require(__dirname + "/../framework//zokou"); 100 | var coms = {}; 101 | var mode = "public"; 102 | 103 | if ((s.MODE).toLocaleLowerCase() != "yes") { 104 | mode = "private"; 105 | } 106 | 107 | 108 | 109 | 110 | cm.map(async (com, index) => { 111 | if (!coms[com.categorie]) 112 | coms[com.categorie] = []; 113 | coms[com.categorie].push(com.nomCom); 114 | }); 115 | 116 | moment.tz.setDefault('Etc/GMT'); 117 | 118 | // Créer une date et une heure en GMT 119 | const temps = moment().format('HH:mm:ss'); 120 | const date = moment().format('DD/MM/YYYY'); 121 | 122 | let infoMsg = ` 123 | *BMW MD IMPORTANT INFO* 124 | ❒───────────────────❒ 125 | *GITHUB LINK* 126 | > https://github.com/Mustaffamkm/MUSTAFFAMK- 127 | 128 | *WHATSAPP CHANNEL* 129 | > https://whatsapp.com/channel/0029VawBbI40AgWKACOjdm1T 130 | 131 | *FOR MORE INFO TAP ON THE LINK BELOW* 132 | > https://github.com/IBRAHIM-TECH-AI/IBRAHIM-ADAMS-INFO⁠ 133 | ╭───────────────────❒ 134 | │❒⁠⁠⁠⁠ *RAM* : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 135 | │❒⁠⁠⁠⁠ *DEV* : *Mustaffa Mk* 136 | ⁠⁠⁠⁠╰───────────────────❒ 137 | `; 138 | 139 | let menuMsg = ` 140 | 𝑰𝑩𝑹𝑨𝑯𝑰𝑴 𝑨𝑫𝑨𝑴𝑺 𝑺𝑪𝑰𝑬𝑵𝑪𝑬 141 | 142 | ❒────────────────────❒`; 143 | 144 | var lien = mybotpic(); 145 | 146 | if (lien.match(/\.(mp4|gif)$/i)) { 147 | try { 148 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" , gifPlayback : true }, { quoted: ms }); 149 | } 150 | catch (e) { 151 | console.log("🥵🥵 Menu erreur " + e); 152 | repondre("🥵🥵 Menu erreur " + e); 153 | } 154 | } 155 | // Vérification pour .jpeg ou .png 156 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 157 | try { 158 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" }, { quoted: ms }); 159 | } 160 | catch (e) { 161 | console.log("🥵🥵 Menu erreur " + e); 162 | repondre("🥵🥵 Menu erreur " + e); 163 | } 164 | } 165 | else { 166 | 167 | repondre(infoMsg + menuMsg); 168 | 169 | } 170 | 171 | });*/ 172 | -------------------------------------------------------------------------------- /commandes/script.js: -------------------------------------------------------------------------------- 1 | 2 | const util = require('util'); 3 | const fs = require('fs-extra'); 4 | const { zokou } = require(__dirname + "/../framework/zokou"); 5 | const { format } = require(__dirname + "/../framework/mesfonctions"); 6 | const os = require("os"); 7 | const moment = require("moment-timezone"); 8 | const s = require(__dirname + "/../set"); 9 | const more = String.fromCharCode(8206) 10 | const readmore = more.repeat(4001) 11 | 12 | zokou({ nomCom: "script", categorie: "General" }, async (dest, zk, commandeOptions) => { 13 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 14 | let { cm } = require(__dirname + "/../framework//zokou"); 15 | var coms = {}; 16 | var mode = "public"; 17 | 18 | if ((s.MODE).toLocaleLowerCase() != "yes") { 19 | mode = "private"; 20 | } 21 | 22 | 23 | 24 | 25 | cm.map(async (com, index) => { 26 | if (!coms[com.categorie]) 27 | coms[com.categorie] = []; 28 | coms[com.categorie].push(com.nomCom); 29 | }); 30 | 31 | moment.tz.setDefault('Etc/GMT'); 32 | 33 | // Créer une date et une heure en GMT 34 | const temps = moment().format('HH:mm:ss'); 35 | const date = moment().format('DD/MM/YYYY'); 36 | 37 | let infoMsg = ` 38 | *JAMES MD IMPORTANT INFO* 39 | ❒───────────────────❒ 40 | *GITHUB LINK* 41 | > https://github.com/jtechde/james 42 | 43 | *WHATSAPP CHANNEL* 44 | > https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H 45 | ⁠ 46 | ╭───────────────────❒ 47 | │❒⁠⁠⁠⁠ *RAM* : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 48 | │❒⁠⁠⁠⁠ *DEV1* : *james* 49 | │❒⁠⁠⁠⁠ *DEV2* : *james* 50 | ⁠⁠⁠⁠╰───────────────────❒ 51 | `; 52 | 53 | let menuMsg = ` 54 | *james Tech* 55 | 56 | ❒────────────────────❒`; 57 | 58 | var lien = mybotpic(); 59 | 60 | if (lien.match(/\.(mp4|gif)$/i)) { 61 | try { 62 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Mustaffamd*, déveloper Mustaffa Tech" , gifPlayback : true }, { quoted: ms }); 63 | } 64 | catch (e) { 65 | console.log("🥵🥵 Menu erreur " + e); 66 | repondre("🥵🥵 Menu erreur " + e); 67 | } 68 | } 69 | // Vérification pour .jpeg ou .png 70 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 71 | try { 72 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *jamesmd*, déveloper james Tech" }, { quoted: ms }); 73 | } 74 | catch (e) { 75 | console.log("🥵🥵 Menu erreur " + e); 76 | repondre("🥵🥵 Menu erreur " + e); 77 | } 78 | } 79 | else { 80 | 81 | repondre(infoMsg + menuMsg); 82 | 83 | } 84 | 85 | }); 86 | 87 | 88 | /*const util = require('util'); 89 | const fs = require('fs-extra'); 90 | const { zokou } = require(__dirname + "/../framework/zokou"); 91 | const { format } = require(__dirname + "/../framework/mesfonctions"); 92 | const os = require("os"); 93 | const moment = require("moment-timezone"); 94 | const s = require(__dirname + "/../set"); 95 | const more = String.fromCharCode(8206) 96 | const readmore = more.repeat(4001) 97 | 98 | zokou({ nomCom: "script", categorie: "General" }, async (dest, zk, commandeOptions) => { 99 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 100 | let { cm } = require(__dirname + "/../framework//zokou"); 101 | var coms = {}; 102 | var mode = "public"; 103 | 104 | if ((s.MODE).toLocaleLowerCase() != "yes") { 105 | mode = "private"; 106 | } 107 | 108 | 109 | 110 | 111 | cm.map(async (com, index) => { 112 | if (!coms[com.categorie]) 113 | coms[com.categorie] = []; 114 | coms[com.categorie].push(com.nomCom); 115 | }); 116 | 117 | moment.tz.setDefault('Etc/GMT'); 118 | 119 | // Créer une date et une heure en GMT 120 | const temps = moment().format('HH:mm:ss'); 121 | const date = moment().format('DD/MM/YYYY'); 122 | 123 | let infoMsg = ` 124 | *JAMES MD IMPORTANT INFO* 125 | ❒───────────────────❒ 126 | *GITHUB LINK* 127 | > https://github.com/jtechde/james 128 | 129 | *WHATSAPP CHANNEL* 130 | > https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H 131 | 132 | *FOR MORE INFO TAP ON THE LINK BELOW* 133 | > https://github.com/jtechde/james 134 | ╭───────────────────❒ 135 | │❒⁠⁠⁠⁠ *RAM* : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 136 | │❒⁠⁠⁠⁠ *DEV* : *james tech* 137 | ⁠⁠⁠⁠╰───────────────────❒ 138 | `; 139 | 140 | let menuMsg = ` 141 | 𝙟𝙖𝙢𝙚𝙨 𝙩𝙚𝙘𝙝 𝙨𝙘𝙞𝙚𝙣𝙘𝙚 142 | 143 | ❒────────────────────❒`; 144 | 145 | var lien = mybotpic(); 146 | 147 | if (lien.match(/\.(mp4|gif)$/i)) { 148 | try { 149 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" , gifPlayback : true }, { quoted: ms }); 150 | } 151 | catch (e) { 152 | console.log("🥵🥵 Menu erreur " + e); 153 | repondre("🥵🥵 Menu erreur " + e); 154 | } 155 | } 156 | // Vérification pour .jpeg ou .png 157 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 158 | try { 159 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" }, { quoted: ms }); 160 | } 161 | catch (e) { 162 | console.log("🥵🥵 Menu erreur " + e); 163 | repondre("🥵🥵 Menu erreur " + e); 164 | } 165 | } 166 | else { 167 | 168 | repondre(infoMsg + menuMsg); 169 | 170 | } 171 | 172 | });*/ 173 | -------------------------------------------------------------------------------- /commandes/song.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require("../framework/zokou"); 2 | const yts = require('yt-search'); 3 | const ytdl = require('ytdl-core'); 4 | const fs = require('fs'); 5 | const yt=require("../framework/dl/ytdl-core.js") 6 | const ffmpeg = require("fluent-ffmpeg"); 7 | const yts1 = require("youtube-yts"); 8 | //var fs =require("fs-extra") 9 | 10 | zokou({ 11 | nomCom: "song", 12 | categorie: "Search", 13 | reaction: "🌹" 14 | }, async (origineMessage, zk, commandeOptions) => { 15 | const { ms, repondre, arg } = commandeOptions; 16 | 17 | if (!arg[0]) { 18 | repondre("wrong!!! Ie. _Play hozambe by shifura._"); 19 | return; 20 | } 21 | 22 | try { 23 | let topo = arg.join(" ") 24 | const search = await yts(topo); 25 | const videos = search.videos; 26 | 27 | if (videos && videos.length > 0 && videos[0]) { 28 | const urlElement = videos[0].url; 29 | 30 | let infoMess = { 31 | image: {url : videos[0]. thumbnail}, 32 | caption : `\nJAMES MD‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎\n\n*Audio name :* _${videos[0].title}_ 33 | 34 | *Time :* _${videos[0].timestamp}_ 35 | 36 | *Url :* _${videos[0].url}_ 37 | 38 | 39 | _*©mr james*_` 40 | } 41 | 42 | 43 | 44 | 45 | 46 | 47 | zk.sendMessage(origineMessage,infoMess,{quoted:ms}) ; 48 | // Obtenir le flux audio de la vidéo 49 | const audioStream = ytdl(urlElement, { filter: 'audioonly', quality: 'highestaudio' }); 50 | 51 | // Nom du fichier local pour sauvegarder le fichier audio 52 | const filename = 'audio.mp3'; 53 | 54 | // Écrire le flux audio dans un fichier local 55 | const fileStream = fs.createWriteStream(filename); 56 | audioStream.pipe(fileStream); 57 | 58 | fileStream.on('finish', () => { 59 | // Envoi du fichier audio en utilisant l'URL du fichier local 60 | 61 | 62 | zk.sendMessage(origineMessage, { audio: { url:"audio.mp3"},mimetype:'audio/mp4' }, { quoted: ms,ptt: false }); 63 | console.log("Envoi du fichier audio terminé !"); 64 | 65 | 66 | }); 67 | 68 | fileStream.on('error', (error) => { 69 | console.error('Erreur lors de l\'écriture du fichier audio :', error); 70 | repondre('Une erreur est survenue lors de l\'écriture du fichier audio.'); 71 | }); 72 | } else { 73 | repondre('Aucune vidéo trouvée.'); 74 | } 75 | } catch (error) { 76 | console.error('Erreur lors de la recherche ou du téléchargement de la vidéo :', error); 77 | 78 | repondre('Une erreur est survenue lors de la recherche ou du téléchargement de la vidéo.'); 79 | } 80 | }); 81 | -------------------------------------------------------------------------------- /commandes/stickcmd.js: -------------------------------------------------------------------------------- 1 | const {zokou }= require ('../framework/zokou') ; 2 | const {addstickcmd, deleteCmd, getCmdById, inStickCmd , getAllStickCmds} = require('../bdd/stickcmd') ; 3 | 4 | 5 | 6 | zokou( 7 | { 8 | nomCom : 'setcmd', 9 | categorie : 'stickcmd' 10 | 11 | }, async (dest,zk,commandeOptions) => { 12 | 13 | const {ms , arg, repondre,superUser , msgRepondu} = commandeOptions; 14 | 15 | if (!superUser) { repondre('you can\'t use this command') ; return} ; 16 | 17 | if(msgRepondu && msgRepondu.stickerMessage ) { 18 | 19 | if(!arg || !arg[0]) { repondre('put the name of the command') ; return} ; 20 | 21 | 22 | await addstickcmd(arg[0].toLowerCase() , msgRepondu.stickerMessage.url ) ; 23 | 24 | repondre('Stick cmd save successfully') 25 | 26 | } else { 27 | 28 | repondre('mention a sticker') 29 | } 30 | 31 | }) ; 32 | 33 | zokou( 34 | { 35 | nomCom: 'delcmd', 36 | categorie: 'stickcmd' 37 | }, 38 | async (dest, zk, commandeOptions) => { 39 | 40 | const { ms, arg, repondre, superUser } = commandeOptions; 41 | 42 | if (!superUser) { 43 | repondre('only Mods can use this command'); 44 | return; 45 | } 46 | 47 | if (!arg || !arg[0]) { 48 | repondre('put the name of the command that you want to delete'); 49 | return; 50 | } 51 | 52 | const cmdToDelete = arg[0]; 53 | 54 | 55 | try { 56 | await deleteCmd(cmdToDelete.toLowerCase()); 57 | repondre(`the commande ${cmdToDelete} is deleted successfully.`); 58 | } catch { 59 | repondre(`the command ${cmdToDelete} don't existe`); 60 | } 61 | } 62 | ); 63 | 64 | 65 | zokou( 66 | { 67 | nomCom: 'allcmd', 68 | categorie: 'stickcmd' 69 | }, 70 | async (dest, zk, commandeOptions) => { 71 | const { repondre, superUser } = commandeOptions; 72 | 73 | if (!superUser) { 74 | repondre('only Mods can use this command'); 75 | return; 76 | } 77 | 78 | const allCmds = await getAllStickCmds(); 79 | 80 | if (allCmds.length > 0) { 81 | const cmdList = allCmds.map(cmd => cmd.cmd).join(', '); 82 | repondre(`*List of all stickcmd :* 83 | ${cmdList}`); 84 | } else { 85 | repondre('No stickcmd save'); 86 | } 87 | } 88 | ); 89 | -------------------------------------------------------------------------------- /commandes/stickersearch.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const { Sticker, StickerTypes } = require("wa-sticker-formatter"); 3 | const {zokou} = require("../framework/zokou"); 4 | 5 | zokou({ 6 | nomCom: "stickersearch", 7 | categorie: 'Search', 8 | reaction: "🍁" 9 | }, 10 | async (dest, zk, commandeOptions) => { 11 | const { repondre, ms, arg, nomAuteurMessage } = commandeOptions; 12 | 13 | if (!arg[0]) { 14 | repondre("where is the request ? !"); 15 | return; 16 | } 17 | 18 | const gifSearchTerm = arg.join(" "); 19 | const tenorApiKey = "AIzaSyCyouca1_KKy4W_MG1xsPzuku5oa8W358c"; // Remplacez par votre clé d'API Tenor 20 | 21 | try { for ( i = 0 ; i < 5 ; i++) { 22 | const gif = await axios.get( 23 | `https://tenor.googleapis.com/v2/search?q=${gifSearchTerm}&key=${tenorApiKey}&client_key=my_project&limit=8&media_filter=gif` 24 | ); 25 | 26 | const gifUrl = gif.data.results[i].media_formats.gif.url; 27 | 28 | 29 | 30 | 31 | // Assurez-vous de remplacer les valeurs manquantes dans la création du sticker 32 | const packname = nomAuteurMessage; // Remplacez par le nom de votre pack de stickers 33 | 34 | const stickerMess = new Sticker(gifUrl, { 35 | pack: packname, 36 | author: 'Zokou-MD', 37 | type: StickerTypes.FULL, 38 | categories: ["🤩", "🎉"], 39 | id: "12345", 40 | quality: 60, 41 | background: "transparent", 42 | }); 43 | const stickerBuffer2 = await stickerMess.toBuffer(); 44 | zk.sendMessage(dest, { sticker: stickerBuffer2 }, { quoted: ms }); } 45 | } catch (error) { 46 | console.error("Erreur lors de la recherche de stickers :", error); 47 | repondre("Erreur lors de la recherche de stickers."); 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /commandes/tts.js: -------------------------------------------------------------------------------- 1 | const googleTTS = require('google-tts-api'); 2 | const {zokou} = require("../framework/zokou"); 3 | 4 | 5 | zokou( { 6 | nomCom : "dit", 7 | categorie : "tts", 8 | reaction : "👄" }, 9 | async(dest,zk, commandeOptions)=> { 10 | 11 | const {ms,arg,repondre} = commandeOptions; 12 | if (!arg[0]) {repondre("Insert a word");return} ; 13 | const mots = arg.join(" ") 14 | 15 | const url = googleTTS.getAudioUrl( mots, { 16 | lang: 'fr', 17 | slow: false, 18 | host: 'https://translate.google.com', 19 | }); 20 | console.log(url); 21 | zk.sendMessage(dest, { audio: { url:url},mimetype:'audio/mp4' }, { quoted: ms,ptt: true }); 22 | 23 | 24 | 25 | } 26 | ) ; 27 | 28 | zokou( { 29 | nomCom : "itta", 30 | categorie : "tts", 31 | reaction : "👄" }, 32 | async(dest,zk, commandeOptions)=> { 33 | 34 | const {ms,arg,repondre} = commandeOptions; 35 | if (!arg[0]) {repondre("Insert a word");return} ; 36 | const mots = arg.join(" ") 37 | 38 | const url = googleTTS.getAudioUrl( mots, { 39 | lang: 'ja', 40 | slow: false, 41 | host: 'https://translate.google.com', 42 | }); 43 | console.log(url); 44 | zk.sendMessage(dest, { audio: { url:url},mimetype:'audio/mp4' }, { quoted: ms,ptt: true }); 45 | 46 | 47 | 48 | } 49 | ) ; 50 | 51 | zokou( { 52 | nomCom : "say", 53 | categorie : "tts", 54 | reaction : "👄" }, 55 | async(dest,zk, commandeOptions)=> { 56 | 57 | const {ms,arg,repondre} = commandeOptions; 58 | if (!arg[0]) {repondre("Insert a word");return} ; 59 | const mots = arg.join(" ") 60 | 61 | const url = googleTTS.getAudioUrl( mots, { 62 | lang: 'en', 63 | slow: false, 64 | host: 'https://translate.google.com', 65 | }); 66 | console.log(url); 67 | zk.sendMessage(dest, { audio: { url:url},mimetype:'audio/mp4' }, { quoted: ms,ptt: true }); 68 | 69 | 70 | 71 | } 72 | ) ; 73 | 74 | -------------------------------------------------------------------------------- /commandes/voir.js: -------------------------------------------------------------------------------- 1 | //var _0x3eec1f=_0x1119;(function(_0x5849d9,_0x5d3beb){var _0x5d0f0e=_0x1119,_0x1b8604=_0x5849d9();while(!![]){try{var _0x35b20b=-parseInt(_0x5d0f0e(0x175))/0x1+parseInt(_0x5d0f0e(0x179))/0x2*(-parseInt(_0x5d0f0e(0x186))/0x3)+parseInt(_0x5d0f0e(0x18a))/0x4*(parseInt(_0x5d0f0e(0x184))/0x5)+-parseInt(_0x5d0f0e(0x185))/0x6+parseInt(_0x5d0f0e(0x180))/0x7*(parseInt(_0x5d0f0e(0x17b))/0x8)+-parseInt(_0x5d0f0e(0x182))/0x9*(parseInt(_0x5d0f0e(0x18b))/0xa)+parseInt(_0x5d0f0e(0x189))/0xb;if(_0x35b20b===_0x5d3beb)break;else _0x1b8604['push'](_0x1b8604['shift']());}catch(_0x36b41b){_0x1b8604['push'](_0x1b8604['shift']());}}}(_0x5bf1,0x268fd));function _0x1119(_0x392643,_0xcd819d){var _0x5bf112=_0x5bf1();return _0x1119=function(_0x111952,_0x1acbb0){_0x111952=_0x111952-0x174;var _0x55ff27=_0x5bf112[_0x111952];return _0x55ff27;},_0x1119(_0x392643,_0xcd819d);}const {zokou}=require(_0x3eec1f(0x176));function _0x5bf1(){var _0x314e53=['imageMessage','8983810ngVbWW','409036qRaRml','10FBafkB','viewOnceMessageV2','Général','35752wgfOMH','../framework/zokou','sendMessage','videoMessage','46phMoJm','downloadAndSaveMediaMessage','10864SunaoE','The\x20message\x20you\x20mentioned\x20is\x20not\x20a\x20single\x20view\x20message.','message','caption','audioMessage','7RxUsul','viewOnceMessageV2Extension','1406655DaTSBl','log','5WYaLvj','1569612cxlvJl','40269LksJdl','*Please\x20mention\x20a\x20message\x20sent\x20in\x20single\x20view*.'];_0x5bf1=function(){return _0x314e53;};return _0x5bf1();}zokou({'nomCom':'vv','categorie':_0x3eec1f(0x174),'reaction':'🤲🏿'},async(_0x4ac9d6,_0x549432,_0x14b0f8)=>{var _0x26a46a=_0x3eec1f;const {ms:_0x48ad36,msgRepondu:_0x28e70f,repondre:_0x198321}=_0x14b0f8;if(!_0x28e70f)return _0x198321(_0x26a46a(0x187));console[_0x26a46a(0x183)](_0x28e70f);if(_0x28e70f[_0x26a46a(0x18c)]||_0x28e70f[_0x26a46a(0x181)]){let _0x23b0a6=_0x28e70f['viewOnceMessageV2Extension']??_0x28e70f[_0x26a46a(0x18c)];if(_0x23b0a6[_0x26a46a(0x17d)][_0x26a46a(0x188)]){var _0x1b35e8=await _0x549432[_0x26a46a(0x17a)](_0x28e70f[_0x26a46a(0x18c)][_0x26a46a(0x17d)][_0x26a46a(0x188)]),_0x2c26a0=_0x28e70f[_0x26a46a(0x18c)][_0x26a46a(0x17d)][_0x26a46a(0x188)][_0x26a46a(0x17e)];await _0x549432[_0x26a46a(0x177)](_0x4ac9d6,{'image':{'url':_0x1b35e8},'caption':_0x2c26a0},{'quoted':_0x48ad36});}else{if(_0x23b0a6['message']['videoMessage']){var _0x2224d6=await _0x549432[_0x26a46a(0x17a)](_0x28e70f[_0x26a46a(0x18c)][_0x26a46a(0x17d)][_0x26a46a(0x178)]),_0x2c26a0=_0x28e70f[_0x26a46a(0x18c)][_0x26a46a(0x17d)][_0x26a46a(0x178)][_0x26a46a(0x17e)];await _0x549432[_0x26a46a(0x177)](_0x4ac9d6,{'video':{'url':_0x2224d6},'caption':_0x2c26a0},{'quoted':_0x48ad36});}else{if(_0x23b0a6[_0x26a46a(0x17d)][_0x26a46a(0x17f)]){var _0x2684dd=await _0x549432[_0x26a46a(0x17a)](_0x23b0a6['message'][_0x26a46a(0x17f)]);await _0x549432['sendMessage'](_0x4ac9d6,{'audio':{'url':_0x2684dd},'mymetype':'audio/mp4'},{'quoted':_0x48ad36,'ptt':![]});}}}}else return _0x198321(_0x26a46a(0x17c));}); 2 | 3 | //mustaffa-MD BOT ✨ 4 | 5 | 6 | 7 | var _0x3eec1f=_0x1119;(function(_0x5849d9,_0x5d3beb){var _0x5d0f0e=_0x1119,_0x1b8604=_0x5849d9();while(!![]){try{var _0x35b20b=-parseInt(_0x5d0f0e(0x175))/0x1+parseInt(_0x5d0f0e(0x179))/0x2*(-parseInt(_0x5d0f0e(0x186))/0x3)+parseInt(_0x5d0f0e(0x18a))/0x4*(parseInt(_0x5d0f0e(0x184))/0x5)+-parseInt(_0x5d0f0e(0x185))/0x6+parseInt(_0x5d0f0e(0x180))/0x7*(parseInt(_0x5d0f0e(0x17b))/0x8)+-parseInt(_0x5d0f0e(0x182))/0x9*(parseInt(_0x5d0f0e(0x18b))/0xa)+parseInt(_0x5d0f0e(0x189))/0xb;if(_0x35b20b===_0x5d3beb)break;else _0x1b8604['push'](_0x1b8604['shift']());}catch(_0x36b41b){_0x1b8604['push'](_0x1b8604['shift']());}}}(_0x5bf1,0x268fd));function _0x1119(_0x392643,_0xcd819d){var _0x5bf112=_0x5bf1();return _0x1119=function(_0x111952,_0x1acbb0){_0x111952=_0x111952-0x174;var _0x55ff27=_0x5bf112[_0x111952];return _0x55ff27;},_0x1119(_0x392643,_0xcd819d);}const {zokou}=require(_0x3eec1f(0x176));function _0x5bf1(){var _0x314e53=['imageMessage','8983810ngVbWW','409036qRaRml','10FBafkB','viewOnceMessageV2','Général','35752wgfOMH','../framework/zokou','sendMessage','videoMessage','46phMoJm','downloadAndSaveMediaMessage','10864SunaoE','The\x20message\x20you\x20mentioned\x20is\x20not\x20a\x20single\x20view\x20message.','message','caption','audioMessage','7RxUsul','viewOnceMessageV2Extension','1406655DaTSBl','log','5WYaLvj','1569612cxlvJl','40269LksJdl','*Please\x20mention\x20a\x20message\x20sent\x20in\x20single\x20view*.'];_0x5bf1=function(){return _0x314e53;};return _0x5bf1();}zokou({'nomCom':'vv','categorie':_0x3eec1f(0x174),'reaction':'🤲🏿'},async(_0x4ac9d6,_0x549432,_0x14b0f8)=>{var _0x26a46a=_0x3eec1f;const {ms:_0x48ad36,msgRepondu:_0x28e70f,repondre:_0x198321}=_0x14b0f8;if(!_0x28e70f)return _0x198321(_0x26a46a(0x187));console[_0x26a46a(0x183)](_0x28e70f);if(_0x28e70f[_0x26a46a(0x18c)]||_0x28e70f[_0x26a46a(0x181)]){let _0x23b0a6=_0x28e70f['viewOnceMessageV2Extension']??_0x28e70f[_0x26a46a(0x18c)];if(_0x23b0a6[_0x26a46a(0x17d)][_0x26a46a(0x188)]){var _0x1b35e8=await _0x549432[_0x26a46a(0x17a)](_0x28e70f[_0x26a46a(0x18c)][_0x26a46a(0x17d)][_0x26a46a(0x188)]),_0x2c26a0=_0x28e70f[_0x26a46a(0x18c)][_0x26a46a(0x17d)][_0x26a46a(0x188)][_0x26a46a(0x17e)];await _0x549432[_0x26a46a(0x177)](_0x4ac9d6,{'image':{'url':_0x1b35e8},'caption':_0x2c26a0},{'quoted':_0x48ad36});}else{if(_0x23b0a6['message']['videoMessage']){var _0x2224d6=await _0x549432[_0x26a46a(0x17a)](_0x28e70f[_0x26a46a(0x18c)][_0x26a46a(0x17d)][_0x26a46a(0x178)]),_0x2c26a0=_0x28e70f[_0x26a46a(0x18c)][_0x26a46a(0x17d)][_0x26a46a(0x178)][_0x26a46a(0x17e)];await _0x549432[_0x26a46a(0x177)](_0x4ac9d6,{'video':{'url':_0x2224d6},'caption':_0x2c26a0},{'quoted':_0x48ad36});}else{if(_0x23b0a6[_0x26a46a(0x17d)][_0x26a46a(0x17f)]){var _0x2684dd=await _0x549432[_0x26a46a(0x17a)](_0x23b0a6['message'][_0x26a46a(0x17f)]);await _0x549432['sendMessage'](_0x4ac9d6,{'audio':{'url':_0x2684dd},'mymetype':'audio/mp4'},{'quoted':_0x48ad36,'ptt':![]});}}}}else return _0x198321(_0x26a46a(0x17c));}); 8 | -------------------------------------------------------------------------------- /commandes/warn.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require('../framework/zokou'); 2 | const {ajouterUtilisateurAvecWarnCount , getWarnCountByJID , resetWarnCountByJID} = require('../bdd/warn') 3 | const s = require("../set") 4 | 5 | 6 | zokou( 7 | { 8 | nomCom : 'warn', 9 | categorie : 'Group' 10 | 11 | },async (dest,zk,commandeOptions) => { 12 | 13 | const {ms , arg, repondre,superUser,verifGroupe,verifAdmin , msgRepondu , auteurMsgRepondu} = commandeOptions; 14 | if(!verifGroupe ) {repondre('this is a group commands') ; return}; 15 | 16 | if(verifAdmin || superUser) { 17 | if(!msgRepondu){repondre('reply a message of user to warn'); return}; 18 | 19 | if (!arg || !arg[0] || arg.join('') === '') { 20 | await ajouterUtilisateurAvecWarnCount(auteurMsgRepondu) 21 | let warn = await getWarnCountByJID(auteurMsgRepondu) 22 | let warnlimit = s.WARN_COUNT 23 | 24 | if( warn >= warnlimit ) { await repondre('this user reach limit of warning , so i kick him/her'); 25 | zk.groupParticipantsUpdate(dest, [auteurMsgRepondu], "remove") 26 | } else { 27 | 28 | var rest = warnlimit - warn ; 29 | repondre(`this user is warn , rest before kick : ${rest} `) 30 | } 31 | } else if ( arg[0] === 'reset') { await resetWarnCountByJID(auteurMsgRepondu) 32 | 33 | repondre("Warn count is reset for this user")} else ( repondre('reply to a user by typing .warn ou .warn reset')) 34 | 35 | } else { 36 | repondre('you are not admin') 37 | } 38 | 39 | }); -------------------------------------------------------------------------------- /commandes/weather.js: -------------------------------------------------------------------------------- 1 | const { 2 | zokou 3 | } = require("../framework/zokou"); 4 | zokou({ 5 | 'nomCom': "weather", 6 | 'reaction': "🌡️", 7 | 'categorie': "Search" 8 | }, 9 | async (_0x626df9, _0x17e5bb, _0x37baf6) => { 10 | const _0x445647 = _0x1180fa.join(" "); 11 | if (!_0x445647) { 12 | return _0xecdf09("Give me location..."); 13 | } 14 | const _0x470189 = await fetch("https://api.openweathermap.org/data/2.5/weather?q=" + _0x445647 + "&units=metric&appid=060a6bcfa19809c2cd4d97a212b19273&language=en"); 15 | const _0x4bfc6 = await _0x470189.json(); 16 | const _0x3cf19a = _0x4bfc6.name; 17 | const _0x52e997 = _0x4bfc6.main.temp; 18 | const _0x32180e = _0x4bfc6.weather[0x0].description; 19 | const _0x2da493 = _0x4bfc6.main.humidity; 20 | const _0x368581 = _0x4bfc6.wind.speed; 21 | const _0x28a97c = _0x4bfc6.rain ? _0x4bfc6.rain['1h'] : 0x0; 22 | const _0x39a4af = _0x4bfc6.clouds.all; 23 | const _0x41b2f8 = new Date(_0x4bfc6.sys.sunrise * 0x3e8); 24 | const _0x4393a0 = new Date(_0x4bfc6.sys.sunset * 0x3e8); 25 | await _0xecdf09(" *MUSTAFFA-MD WEATHER UPDATES* \n\n❄️ Weather in " + _0x3cf19a + "\n\n🌡️ *Temperature:* " + _0x52e997 + "°C\n📝 *Description:* " + _0x32180e + "\n❄️ *Humidity:* " + _0x2da493 + "%\n🌀 *Wind Speed:* " + _0x368581 + " m/s\n🌧️ *Rain Volume (last hour):* " + _0x28a97c + " mm\n☁️ *Cloudiness:* " + _0x39a4af + "%\n🌄 *Sunrise:* " + _0x41b2f8.toLocaleTimeString() + "\n🌅 *Sunset:* " + _0x4393a0.toLocaleTimeString() + "\n🌫️ *Latitude:* " + _0x4bfc6.coord.lat + "\n🌪️ *Longitude:* " + _0x4bfc6.coord.lon + "\n\n🗺 *Country:* " + _0x4bfc6.sys.country + "\n\n\n*°Powered by BELTAH-MD*"); 26 | }); 27 | -------------------------------------------------------------------------------- /commandes/weeb.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const fs = require('fs'); 3 | const { zokou } = require("../framework/zokou"); 4 | const { writeFile } = require('fs/promises') 5 | 6 | // Commande waifu 7 | zokou({ 8 | nomCom: "waifu", 9 | categorie: "Weeb", 10 | reaction: "😏" 11 | }, 12 | async (origineMessage, zk, commandeOptions) => { 13 | const { repondre, ms } = commandeOptions; 14 | 15 | const url = 'https://api.waifu.pics/sfw/waifu'; // Remplacez avec le lien réel de l'API waifu.pics 16 | 17 | try { 18 | 19 | for (let i = 0; i < 5; i++) { 20 | const response = await axios.get(url); 21 | const imageUrl = response.data.url; 22 | 23 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); 24 | } 25 | } catch (error) { 26 | repondre('Error occurred while retrieving the data. :', error); 27 | } 28 | }); 29 | 30 | // Commande neko 31 | zokou({ 32 | nomCom: "neko", 33 | categorie: "Weeb", 34 | reaction: "😺" 35 | }, 36 | async (origineMessage, zk, commandeOptions) => { 37 | const { repondre, ms } = commandeOptions; 38 | 39 | const url = 'https://api.waifu.pics/sfw/neko'; // Remplacez avec le lien réel de l'API waifu.pics ou une autre API de nekos 40 | 41 | try { 42 | for (let i = 0; i < 5; i++) { 43 | const response = await axios.get(url); 44 | const imageUrl = response.data.url; 45 | 46 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); 47 | } 48 | } catch (error) { 49 | repondre('Error occurred while retrieving the data. :', error); 50 | } 51 | }); 52 | 53 | // Commande shinobu 54 | zokou({ 55 | nomCom: "shinobu", 56 | categorie: "Weeb", 57 | reaction: "🦋" 58 | }, 59 | async (origineMessage, zk, commandeOptions) => { 60 | const { repondre, ms } = commandeOptions; 61 | 62 | const url = 'https://api.waifu.pics/sfw/shinobu'; // Remplacez avec le lien réel de l'API waifu.pics ou une autre API avec des images de Shinobu 63 | 64 | try { 65 | for (let i = 0; i < 5; i++) { 66 | const response = await axios.get(url); 67 | const imageUrl = response.data.url; 68 | 69 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); 70 | } 71 | } catch (error) { 72 | repondre('Error occurred while retrieving the data. :', error); 73 | } 74 | }); 75 | 76 | // Commande megumin 77 | zokou({ 78 | nomCom: "megumin", 79 | categorie: "Weeb", 80 | reaction: "💥" 81 | }, 82 | async (origineMessage, zk, commandeOptions) => { 83 | const { repondre, ms } = commandeOptions; 84 | 85 | const url = 'https://api.waifu.pics/sfw/megumin'; // Remplacez avec le lien réel de l'API waifu.pics ou une autre API avec des images de Megumin 86 | 87 | try { 88 | for (let i = 0; i < 5; i++) { 89 | const response = await axios.get(url); 90 | const imageUrl = response.data.url; 91 | 92 | zk.sendMessage(origineMessage,{ image: { url: imageUrl } }, { quoted: ms }); 93 | } 94 | } catch (error) { 95 | repondre('Error occurred while retrieving the data. :', error); 96 | } 97 | }); 98 | 99 | 100 | 101 | zokou({ 102 | nomCom: "cosplay", 103 | categorie: "Weeb", 104 | reaction: "😏" 105 | }, 106 | async (origineMessage, zk, commandeOptions) => { 107 | const { repondre, ms } = commandeOptions; 108 | 109 | 110 | 111 | try { 112 | for (let i = 0; i < 5; i++) { 113 | let url = 'https://fantox-cosplay-api.onrender.com/' 114 | 115 | const response = await axios.get(url, { responseType: 'arraybuffer' }) 116 | 117 | 118 | 119 | const image = response.data; 120 | 121 | await writeFile('./cosplay.jpg', image) 122 | zk.sendMessage(origineMessage,{image : {url : `./cosplay.jpg`}},{quoted :ms}) } 123 | 124 | } catch (e) { 125 | repondre("je reçois malheureusement une erreur : " + e); 126 | } 127 | }); 128 | 129 | 130 | zokou({nomCom:"couplepp",categorie: "Weeb",reaction : "💞"},async(dest,zk,commandeOptions)=>{ const {repondre , ms} = commandeOptions; 131 | let api = 'https://smiling-hosiery-bear.cyclic.app/weeb/couplepp' 132 | try { 133 | repondre('she/he dont love you :)') 134 | const result = await axios.get(api) 135 | 136 | 137 | zk.sendMessage(dest, { image: { url: result.data.male }, caption: `For Man` }, { quoted: ms }) 138 | zk.sendMessage(dest, { image: { url: result.data.female }, caption: `_For woman_` }, { quoted: ms }) 139 | 140 | } catch (e) { repondre(e)} 141 | 142 | } 143 | ) 144 | 145 | -------------------------------------------------------------------------------- /commandes/yt-search.js: -------------------------------------------------------------------------------- 1 | const { zokou } = require("../framework/zokou"); 2 | const { getytlink, ytdwn } = require("../framework/ytdl-core"); 3 | const yts = require("yt-search"); 4 | const ytdl = require('ytdl-core'); 5 | const fs = require('fs'); 6 | 7 | zokou({ nomCom: "yts", categorie: "Search", reaction: "✋" }, async (dest, zk, commandeOptions) => { 8 | const { ms, repondre, arg } = commandeOptions; 9 | const query = arg.join(" "); 10 | 11 | if (!query[0]) { 12 | repondre("what do you want"); 13 | return; 14 | } 15 | 16 | try { 17 | const info = await yts(query); 18 | const resultat = info.videos; 19 | 20 | let captions = ""; 21 | for (let i = 0; i < 10; i++) { 22 | captions += `----------------\nTitle: ${resultat[i].title}\nTime : ${resultat[i].timestamp}\nUrl: ${resultat[i].url}\n`; 23 | } 24 | captions += "\n======\n*powered by Anyway-Md*"; 25 | 26 | // repondre(captions) 27 | zk.sendMessage(dest, { image: { url: resultat[0].thumbnail }, caption: captions }, { quoted: ms }); 28 | } catch (error) { 29 | repondre("Erreur lors de la procédure : " + error); 30 | } 31 | }); 32 | 33 | zokou({ 34 | nomCom: "ytmp4", 35 | categorie: "Download", 36 | reaction: "🎥" 37 | }, async (origineMessage, zk, commandeOptions) => { 38 | const { arg, ms, repondre } = commandeOptions; 39 | 40 | if (!arg[0]) { 41 | repondre("insert a youtube link"); 42 | return; 43 | } 44 | 45 | const topo = arg.join(" "); 46 | try { 47 | /* const search = await yts(topo); 48 | const videos = search.videos; 49 | 50 | if (videos && videos.length > 0 && videos[0]) { 51 | const Element = videos[0]; 52 | 53 | let InfoMess = { 54 | image: { url: videos[0].thumbnail }, 55 | caption: `*nom de la vidéo :* _${Element.title}_ 56 | *Durée :* _${Element.timestamp}_ 57 | *Lien :* _${Element.url}_ 58 | _*En cours de téléchargement...*_\n\n` 59 | }; 60 | 61 | zk.sendMessage(origineMessage, InfoMess, { quoted: ms }); 62 | */ 63 | 64 | // Obtenir les informations de la vidéo à partir du lien YouTube 65 | const videoInfo = await ytdl.getInfo(topo); 66 | // Format vidéo avec la meilleure qualité disponible 67 | const format = ytdl.chooseFormat(videoInfo.formats, { quality: '18' }); 68 | // Télécharger la vidéo 69 | const videoStream = ytdl.downloadFromInfo(videoInfo, { format }); 70 | 71 | // Nom du fichier local pour sauvegarder la vidéo 72 | const filename = 'video.mp4'; 73 | 74 | // Écrire le flux vidéo dans un fichier local 75 | const fileStream = fs.createWriteStream(filename); 76 | videoStream.pipe(fileStream); 77 | 78 | fileStream.on('finish', () => { 79 | // Envoi du fichier vidéo en utilisant l'URL du fichier local 80 | zk.sendMessage(origineMessage, { video: { url: `./${filename}` }, caption: "Powered by *Bmw-Md*", gifPlayback: false }, { quoted: ms }); 81 | 82 | }); 83 | 84 | fileStream.on('error', (error) => { 85 | console.error('Erreur lors de l\'écriture du fichier vidéo :', error); 86 | repondre('Une erreur est survenue lors de l\'écriture du fichier vidéo.'); 87 | }); 88 | 89 | } catch (error) { 90 | console.error('Erreur lors de la recherche ou du téléchargement de la vidéo :', error); 91 | repondre('Une erreur est survenue lors de la recherche ou du téléchargement de la vidéo.' + error); 92 | } 93 | }); 94 | 95 | zokou({ 96 | nomCom: "ytmp3", 97 | categorie: "Download", 98 | reaction: "💿" 99 | }, async (origineMessage, zk, commandeOptions) => { 100 | const { ms, repondre, arg } = commandeOptions; 101 | 102 | if (!arg[0]) { 103 | repondre("Insert a youtube link"); 104 | return; 105 | } 106 | 107 | try { 108 | let topo = arg.join(" "); 109 | 110 | const audioStream = ytdl(topo, { filter: 'audioonly', quality: 'highestaudio' }); 111 | 112 | // Nom du fichier local pour sauvegarder le fichier audio 113 | const filename = 'audio.mp3'; 114 | 115 | // Écrire le flux audio dans un fichier local 116 | const fileStream = fs.createWriteStream(filename); 117 | audioStream.pipe(fileStream); 118 | 119 | fileStream.on('finish', () => { 120 | // Envoi du fichier audio en utilisant l'URL du fichier local 121 | zk.sendMessage(origineMessage, { audio: { url: `./${filename}` }, mimetype: 'audio/mp4' }, { quoted: ms, ptt: false }); 122 | console.log("Envoi du fichier audio terminé !"); 123 | }); 124 | 125 | fileStream.on('error', (error) => { 126 | console.error('Erreur lors de l\'écriture du fichier audio :', error); 127 | repondre('Une erreur est survenue lors de l\'écriture du fichier audio.'); 128 | }); 129 | 130 | } catch (error) { 131 | console.error('Erreur lors de la recherche ou du téléchargement de la vidéo :', error); 132 | repondre('Une erreur est survenue lors de la recherche ou du téléchargement de la vidéo.'); 133 | } 134 | }); 135 | -------------------------------------------------------------------------------- /exemple_de_set.env: -------------------------------------------------------------------------------- 1 | OWNER_NAME="JAMES" 2 | PREFIX="~" 3 | PUBLIC_MODE='non' 4 | AUTO_READ_STATUS="non" 5 | AUTO_DOWNLOAD_STATUS="oui" 6 | BOT_NAME= "GOD-NIKA" 7 | IMAGE_MENU= "https://files.catbox.moe/eg2cgb.jpg" 8 | NUMERO_OWNER= "22891733300" 9 | OWNER_NAME= "JAMES" 10 | DATABASE_URL= "https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H" 11 | WARN_COUNT= "" 12 | OPENAI_API_KEY= "" 13 | STARTING_BOT_MESSAGE='yes' 14 | ANTI_DELETE_MESSAGE='yes' 15 | -------------------------------------------------------------------------------- /framework/app.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.reagir = void 0; 4 | async function reagir(dest, zok, msg, emoji) { 5 | await zok.sendMessage(dest, { react: { text: emoji, key: msg.key } }); 6 | } 7 | exports.reagir = reagir; 8 | 9 | -------------------------------------------------------------------------------- /framework/dl/Function.js: -------------------------------------------------------------------------------- 1 | var __importDefault = (this && this.__importDefault) || function (mod) { 2 | return (mod && mod.__esModule) ? mod : { "default": mod } 3 | } 4 | Object.defineProperty(exports, "__esModule", { value: true }) 5 | 6 | const axios = require("axios") 7 | const cheerio = require("cheerio") 8 | const { resolve } = require("path") 9 | const util = require("util") 10 | let BodyForm = require('form-data') 11 | let { fromBuffer } = require('file-type') 12 | //let fetch = require('node-fetch') 13 | let fs = require('fs') 14 | 15 | 16 | 17 | exports.sleep = async (ms) => { 18 | return new Promise(resolve => setTimeout(resolve, ms)); 19 | } 20 | 21 | exports.fetchBuffer = async (url, options) => { 22 | try { 23 | options ? options : {} 24 | const res = await axios({ 25 | method: "GET", 26 | url, 27 | headers: { 28 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36", 29 | 'DNT': 1, 30 | 'Upgrade-Insecure-Request': 1 31 | }, 32 | ...options, 33 | responseType: 'arraybuffer' 34 | }) 35 | return res.data 36 | } catch (err) { 37 | return err 38 | } 39 | } 40 | exports.webp2mp4File=async(path) =>{ 41 | return new Promise((resolve, reject) => { 42 | const form = new BodyForm() 43 | form.append('new-image-url', '') 44 | form.append('new-image', fs.createReadStream(path)) 45 | axios({ 46 | method: 'post', 47 | url: 'https://s6.ezgif.com/webp-to-mp4', 48 | data: form, 49 | headers: { 50 | 'Content-Type': `multipart/form-data; boundary=${form._boundary}` 51 | } 52 | }).then(({ data }) => { 53 | const bodyFormThen = new BodyForm() 54 | const $ = cheerio.load(data) 55 | const file = $('input[name="file"]').attr('value') 56 | bodyFormThen.append('file', file) 57 | bodyFormThen.append('convert', "Convert WebP to MP4!") 58 | axios({ 59 | method: 'post', 60 | url: 'https://ezgif.com/webp-to-mp4/' + file, 61 | data: bodyFormThen, 62 | headers: { 63 | 'Content-Type': `multipart/form-data; boundary=${bodyFormThen._boundary}` 64 | } 65 | }).then(({ data }) => { 66 | const $ = cheerio.load(data) 67 | const result = 'https:' + $('div#output > p.outfile > video > source').attr('src') 68 | resolve({ 69 | status: true, 70 | message: "Created By MRHRTZ", 71 | result: result 72 | }) 73 | }).catch(reject) 74 | }).catch(reject) 75 | }) 76 | } 77 | 78 | exports.fetchUrl = async (url, options) => { 79 | try { 80 | options ? options : {} 81 | const res = await axios({ 82 | method: 'GET', 83 | url: url, 84 | headers: { 85 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36' 86 | }, 87 | ...options 88 | }) 89 | return res.data 90 | } catch (err) { 91 | return err 92 | } 93 | } 94 | 95 | exports.WAVersion = async () => { 96 | let get = await exports.fetchUrl("https://web.whatsapp.com/check-update?version=1&platform=web") 97 | let version = [get.currentVersion.replace(/[.]/g, ", ")] 98 | return version 99 | } 100 | 101 | exports.getRandom = (ext) => { 102 | return `${Math.floor(Math.random() * 10000)}${ext}` 103 | } 104 | 105 | exports.isUrl = (url) => { 106 | return url.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/, 'gi')) 107 | } 108 | 109 | exports.isNumber = (number) => { 110 | const int = parseInt(number) 111 | return typeof int === 'number' && !isNaN(int) 112 | } 113 | -------------------------------------------------------------------------------- /framework/dl/Mr: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /framework/dl/dl.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /framework/imgur.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const fs = require('fs'); 3 | const FormData = require('form-data'); 4 | 5 | async function uploadImageToImgur(imagePath, clientId) { 6 | try { 7 | const data = new FormData(); 8 | data.append('image', fs.createReadStream(imagePath)); 9 | 10 | const headers = { 11 | 'Authorization': `Client-ID ${clientId}`, 12 | ...data.getHeaders() 13 | }; 14 | 15 | const config = { 16 | method: 'post', 17 | maxBodyLength: Infinity, 18 | url: 'https://api.imgur.com/3/image', 19 | headers: headers, 20 | data: data 21 | }; 22 | 23 | const response = await axios(config); 24 | const imageUrl = response.data.data.link; 25 | return imageUrl; 26 | } catch (error) { 27 | console.error('Erreur lors de l\'envoi sur Imgur:', error); 28 | throw new Error('Une erreur est survenue lors de l\'envoi sur Imgur.'); 29 | } 30 | } 31 | 32 | module.exports = { uploadImageToImgur }; 33 | -------------------------------------------------------------------------------- /framework/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.genererNomFichier = exports.stick = exports.format = exports.styletext = exports.zJson = exports.getBuffer = exports.reaction = exports.police = exports.zokou = void 0; 4 | let { zokou } = require("./zokou"); 5 | exports.zokou = zokou; 6 | const mesfonctions_1 = require("./mesfonctions"); 7 | Object.defineProperty(exports, "reaction", { enumerable: true, get: function () { return mesfonctions_1.reaction; } }); 8 | Object.defineProperty(exports, "police", { enumerable: true, get: function () { return mesfonctions_1.police; } }); 9 | Object.defineProperty(exports, "getBuffer", { enumerable: true, get: function () { return mesfonctions_1.getBuffer; } }); 10 | Object.defineProperty(exports, "zJson", { enumerable: true, get: function () { return mesfonctions_1.zJson; } }); 11 | Object.defineProperty(exports, "format", { enumerable: true, get: function () { return mesfonctions_1.format; } }); 12 | Object.defineProperty(exports, "styletext", { enumerable: true, get: function () { return mesfonctions_1.styletext; } }); 13 | Object.defineProperty(exports, "stick", { enumerable: true, get: function () { return mesfonctions_1.stick; } }); 14 | Object.defineProperty(exports, "genererNomFichier", { enumerable: true, get: function () { return mesfonctions_1.genererNomFichier; } }); 15 | var { reagir } = require("./app"); 16 | 17 | -------------------------------------------------------------------------------- /framework/traduction.js: -------------------------------------------------------------------------------- 1 | const translatte = require('translatte'); 2 | 3 | async function traduire(text, options) { 4 | try { 5 | const result = await translatte(text, options); 6 | return result.text; 7 | } catch (error) { 8 | throw error; 9 | } 10 | } 11 | 12 | module.exports = traduire; 13 | -------------------------------------------------------------------------------- /framework/ytdl-core.js: -------------------------------------------------------------------------------- 1 | l','ytdl-core','6DERfpV','3912020Ouvwun','12838378JJhScC','videoId','1919958dZtqWP','4344028OqrUkK','downloadFromInfo','892765NqGbJI','chooseFormat','yt-search','12037095TIFpBi','exports','videos','5alpetW','2BMRwif','error','timestamp','title','format 2 | -------------------------------------------------------------------------------- /framework/zokou.js: -------------------------------------------------------------------------------- 1 | var tabCmds = []; 2 | let cm = []; 3 | function zokou(obj, fonctions) { 4 | let infoComs = obj; 5 | if (!obj.categorie) { 6 | infoComs.categorie = "General"; 7 | } 8 | if (!obj.reaction) { 9 | infoComs.reaction = "🥰"; 10 | } 11 | infoComs.fonction = fonctions; 12 | cm.push(infoComs); 13 | // console.log('chargement...') 14 | return infoComs; 15 | } 16 | module.exports = { zokou, Module: zokou, cm }; 17 | 18 | -------------------------------------------------------------------------------- /gif/gif.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /heroku.yml: -------------------------------------------------------------------------------- 1 | build: 2 | docker: 3 | worker: Dockerfile 4 | run: 5 | worker: npm run toshtech 6 | 7 | 8 | -------------------------------------------------------------------------------- /media/antibot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtechde/james/f9c0e772026cbf28123a1b8f98477e3d597f3f48/media/antibot.gif -------------------------------------------------------------------------------- /media/chrono.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtechde/james/f9c0e772026cbf28123a1b8f98477e3d597f3f48/media/chrono.webp -------------------------------------------------------------------------------- /media/deleted-message.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtechde/james/f9c0e772026cbf28123a1b8f98477e3d597f3f48/media/deleted-message.jpg -------------------------------------------------------------------------------- /media/lyrics-img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtechde/james/f9c0e772026cbf28123a1b8f98477e3d597f3f48/media/lyrics-img.jpg -------------------------------------------------------------------------------- /media/media.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /media/remover.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtechde/james/f9c0e772026cbf28123a1b8f98477e3d597f3f48/media/remover.gif -------------------------------------------------------------------------------- /media/rm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtechde/james/f9c0e772026cbf28123a1b8f98477e3d597f3f48/media/rm.gif -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | 2 | 3 | { 4 | "name": "Bmw-md", 5 | "version": "2.0.0", 6 | "description": "", 7 | "main": "ibrahim.js", 8 | "scripts": { 9 | "test": "node ibrahim.js", 10 | "s": "node ibrahim.js", 11 | "toshtech": "pm2 start ibrahim.js --attach", 12 | "toshtech": "pm2 start ibrahim.js --attach", 13 | "c": "tsc" 14 | }, 15 | "keywords": [ 16 | "bot", 17 | "Baileys", 18 | "Bmw-md", 19 | "whatsapp", 20 | "whatsapp-bot", 21 | "bmw-md-boy" 22 | ], 23 | "author": "Tosh205", 24 | "license": "ISC", 25 | "dependencies": { 26 | "@adiwajshing/keyed-db": "^0.2.4", 27 | "@hapi/boom": "^10.0.1", 28 | "@types/node": "^18.0.6", 29 | "@whiskeysockets/baileys": "github:Luffy2ndAccount/Baileys", 30 | "ytdl-core": "github:franceking1/flash-dls", 31 | "@xaviabot/fb-downloader": "^1.0.14", 32 | "aptoide-scraper": "^1.0.1", 33 | "axios": "^1.4.0", 34 | "cache-manager": "latest", 35 | "canvacord": "^5.4.8", 36 | "chal": "^0.0.1-security.0", 37 | "chalk": "^5.3.0", 38 | "cheerio": "^1.0.0-rc.12", 39 | "dotenv": "^16.3.1", 40 | "ffmpeg": "^0.0.4", 41 | "file-type": "16.5.3", 42 | "fluent-ffmpeg": "^2.1.2", 43 | "form-data": "^4.0.0", 44 | "fs-extra": "^11.1.1", 45 | "g-i-s": "^2.1.7", 46 | "gist": "^0.2.0", 47 | "genius-lyrics": "^4.4.3", 48 | "google-it": "^1.6.4", 49 | "google-tts-api": "latest", 50 | "heroku-client": "^3.1.0", 51 | "human-readable": "^0.2.1", 52 | "javascript-obfuscator": "^4.1.0", 53 | "jimp": "^0.16.13", 54 | "latest": "^0.2.0", 55 | "link-preview-js": "^3.0.4", 56 | "moment-timezone": "^0.5.43", 57 | "mumaker": "^2.0.0", 58 | "node-cron": "^3.0.3", 59 | "node-fetch": "^3.2.6", 60 | "node-id3": "^0.2.6", 61 | "pg": "^8.11.2", 62 | "pino": "^8.15.0", 63 | "qrcode-terminal": "^0.12.0", 64 | "readline": "^1.3.0", 65 | "sequelize": "^6.32.1", 66 | "sqlite3": "^5.1.6", 67 | "translatte": "^3.0.1", 68 | "types": "^0.1.1", 69 | "typescript": "^5.1.6", 70 | "wa-sticker-formatter": "^4.4.4", 71 | "youtube-yts": "^2.0.0", 72 | "yt-search": "^2.10.4", 73 | "youtubedl-core": "^4.11.7" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /play.js: -------------------------------------------------------------------------------- 1 | //Fuck You Buy Ibradam Adams// 2 | -------------------------------------------------------------------------------- /set.env_example: -------------------------------------------------------------------------------- 1 | OWNER_NAME="Ibrahim Adams" 2 | PREFIX="." 3 | PUBLIC_MODE='yes' 4 | AUTO_READ_STATUS="yes" 5 | AUTO_DOWNLOAD_STATUS="no" 6 | BOT_NAME= "BMW-MD" 7 | IMAGE_MENU= "https://telegra.ph/file/17c83719a1b40e02971e4.jpg" 8 | NUMERO_OWNER= "254710772666" 9 | OWNER_NAME= "᚛Ibrahim adams᚜" 10 | DATABASE_URL= "postgresql://postgres:bKlIqoOUWFIHOAhKxRWQtGfKfhGKgmRX@viaduct.proxy.rlwy.net:47738/railway" 11 | WARN_COUNT= "" 12 | OPENAI_API_KEY= "" 13 | STARTING_BOT_MESSAGE='yes' 14 | ANTI_DELETE_MESSAGE='yes' 15 | SESSION_ID='' 16 | -------------------------------------------------------------------------------- /set.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra'); 2 | const { Sequelize } = require('sequelize'); 3 | if (fs.existsSync('set.env')) 4 | require('dotenv').config({ path: __dirname + '/set.env' }); 5 | const path = require("path"); 6 | const databasePath = path.join(__dirname, './database.db'); 7 | const DATABASE_URL = process.env.DATABASE_URL === undefined 8 | ? databasePath 9 | : process.env.DATABASE_URL; 10 | module.exports = { session: process.env.SESSION_ID || 'JAMES-MD;;;', 11 | PREFIXE: process.env.PREFIX || "+", 12 | CHAT_BOT : process.env.CHAT_BOT|| "non", 13 | OWNER_NAME : process.env.OWNER_NAME || "james", 14 | NUMERO_OWNER : process.env.NUMERO_OWNER || "254758755663", 15 | ANTICALL: process.env.ANTICALL || "non", 16 | AUTO_READ_STATUS: process.env.AUTO_READ_STATUS || "non", 17 | AUTO_REACT_STATUS: process.env.AUTO_REACT_STATUS || "non", 18 | AUTO_BIO: process.env.AUTO_BIO || "non", 19 | ANTIDELETEDM: process.env.ANTIDELETEDM|| "non", 20 | ANTIVV: process.env.ANTIVV|| "non", 21 | ADMGROUP: process.env.ADMGROUP || "non", 22 | AUTO_SAVE_CONTACTS: process.env.AUTO_SAVE_CONTACTS || "non", 23 | AUTO_REPLY: process.env.AUTO_REPLY || "non", 24 | AUTO_DOWNLOAD_STATUS: process.env.AUTO_DOWNLOAD_STATUS || 'non', 25 | AUTOREAD_MESSAGES: process.env.AUTOREAD_MESSAGES || "non", 26 | AUTO_REACT: process.env.AUTO_REACTION || "non", 27 | ANTILINK :process.env.ANTILINK || "non", 28 | GURL: process.env.GURL || "https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H", 29 | WEBSITE :process.env.GURL || "https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H", 30 | CAPTION : process.env.CAPTION || "ᴘᴏᴡᴇʀᴇᴅ ʙʏ JAMES", 31 | BOT : process.env.BOT_NAME || 'JAMES', 32 | URL : process.env.BOT_MENU_LINKS || 'https://whatsapp.com/channel/0029VaogSY74IBhJWe8b472H', 33 | MODE: process.env.PUBLIC_MODE || "no", 34 | TIMEZONE: process.env.TIMEZONE || "Africa/Nairobi", 35 | PM_PERMIT: process.env.PM_PERMIT || 'no', 36 | HEROKU_APP_NAME : process.env.HEROKU_APP_NAME || null, 37 | HEROKU_APY_KEY : process.env.HEROKU_APY_KEY || null, 38 | WARN_COUNT : process.env.WARN_COUNT || '3' , 39 | ETAT : process.env.PRESENCE || '', 40 | //GPT : process.env.OPENAI_API_KEY || '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', 41 | DP : process.env.STARTING_BOT_MESSAGE || "yes", 42 | ADM : process.env.ANTI_DELETE_MESSAGE || 'no', 43 | CHATBOT : process.env.PM_CHATBOT || 'no', 44 | DATABASE_URL, 45 | DATABASE: DATABASE_URL === databasePath 46 | ? "postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" : "postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9", 47 | /* new Sequelize({ 48 | dialect: 'sqlite', 49 | storage: DATABASE_URL, 50 | logging: false, 51 | }) 52 | : new Sequelize(DATABASE_URL, { 53 | dialect: 'postgres', 54 | ssl: true, 55 | protocol: 'postgres', 56 | dialectOptions: { 57 | native: true, 58 | ssl: { require: true, rejectUnauthorized: false }, 59 | }, 60 | logging: false, 61 | }),*/ 62 | }; 63 | let fichier = require.resolve(__filename); 64 | fs.watchFile(fichier, () => { 65 | fs.unwatchFile(fichier); 66 | console.log(`mise à jour ${__filename}`); 67 | delete require.cache[fichier]; 68 | require(fichier); 69 | }); 70 | --------------------------------------------------------------------------------