├── files ├── ibraah ├── Adams.json ├── bwm.mp3 ├── hey.wav ├── rm.gif ├── kaka.wav ├── mkuu.wav ├── morio.mp3 ├── morio.wav ├── antibot.gif ├── chrono.webp ├── darling.wav ├── ibrahim.wav ├── logo_css.png ├── remover.gif ├── showcase.jpg ├── goodnight.wav ├── logo_html.png ├── showcase 3.jpg ├── showcase1.jpg ├── goodafternoon.wav ├── profile-pic.jpg ├── chat-container.jpg └── deleted-message.jpg ├── lib ├── Adams.js ├── abu.md ├── ibraah ├── xmd.md ├── Readme.md ├── binary.cjs ├── converter.cjs ├── alive.js ├── banUser.js ├── banGroup.js ├── cron.js ├── hentai.js ├── onlyAdmin.js ├── welcome.js ├── mention.js ├── warn.js ├── stickcmd.js ├── style.css ├── level.js ├── sudo.js ├── antilien.js ├── antibot.js └── exif.cjs ├── xmd ├── antibot.json ├── banUser.js ├── bwm.json ├── cron.json ├── events.json ├── hentai.json ├── mention.json ├── sudo.json ├── warn.json ├── antilien.json ├── bangroup.json ├── onlyAdmin.json ├── stickcmd.json ├── user_rank.json └── alive.json ├── Ibrahim ├── Adam.js ├── dl │ ├── dl.json │ ├── ibraah │ ├── Adams.js │ └── Function.js ├── ibraah ├── bugs │ └── ibraah ├── app.js ├── traduction.js ├── adams.js ├── utils.js ├── imgur.js ├── ytdl-core.js ├── text2prompt.js └── index.js ├── Session └── Adams ├── gif └── gif.json ├── scs ├── adams.md ├── menu.js ├── new1.js ├── getallvar.js ├── gpt4.js ├── new2.js ├── new3.js ├── ping.js ├── repo.js ├── paircode.js ├── scan.js ├── to_url.js ├── allinone.js ├── hack.js ├── youtube.js ├── alive.js ├── fancy.js ├── vv.js ├── onwelcome.js ├── obt.js ├── github.js ├── worn.js ├── quote.js ├── sticker.js ├── say.js ├── fetch.js ├── cmd.js ├── video_edit.js ├── owner.js ├── poll.js ├── reaction.js ├── ridle.js ├── weeb.js ├── allcmdno.js ├── henter.js ├── movie.js ├── random.js ├── audio_edit.js └── rank.js ├── config.env ├── .env ├── config.js ├── body.js ├── xmd.js ├── package.json └── app.json /files/ibraah: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/Adams.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/abu.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/ibraah: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/xmd.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xmd/antibot.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/banUser.js: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/bwm.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xmd/cron.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/events.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/hentai.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/mention.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/sudo.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/warn.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /Ibrahim/Adam.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Ibrahim/dl/dl.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Ibrahim/dl/ibraah: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Ibrahim/ibraah: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Session/Adams: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gif/gif.json: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /xmd/antilien.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/bangroup.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/onlyAdmin.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /xmd/stickcmd.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /xmd/user_rank.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /Ibrahim/bugs/ibraah: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Ibrahim/dl/Adams.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /files/Adams.json: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/Readme.md: -------------------------------------------------------------------------------- 1 | # Ibrahim adams 2 | -------------------------------------------------------------------------------- /scs/adams.md: -------------------------------------------------------------------------------- 1 | # Made by Ibrahim Adams 2 | -------------------------------------------------------------------------------- /xmd/alive.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "message": "", 4 | "lien": "" 5 | } -------------------------------------------------------------------------------- /files/bwm.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/bwm.mp3 -------------------------------------------------------------------------------- /files/hey.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/hey.wav -------------------------------------------------------------------------------- /files/rm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/rm.gif -------------------------------------------------------------------------------- /files/kaka.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/kaka.wav -------------------------------------------------------------------------------- /files/mkuu.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/mkuu.wav -------------------------------------------------------------------------------- /files/morio.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/morio.mp3 -------------------------------------------------------------------------------- /files/morio.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/morio.wav -------------------------------------------------------------------------------- /files/antibot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/antibot.gif -------------------------------------------------------------------------------- /files/chrono.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/chrono.webp -------------------------------------------------------------------------------- /files/darling.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/darling.wav -------------------------------------------------------------------------------- /files/ibrahim.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/ibrahim.wav -------------------------------------------------------------------------------- /files/logo_css.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/logo_css.png -------------------------------------------------------------------------------- /files/remover.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/remover.gif -------------------------------------------------------------------------------- /files/showcase.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/showcase.jpg -------------------------------------------------------------------------------- /files/goodnight.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/goodnight.wav -------------------------------------------------------------------------------- /files/logo_html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/logo_html.png -------------------------------------------------------------------------------- /files/showcase 3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/showcase 3.jpg -------------------------------------------------------------------------------- /files/showcase1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/showcase1.jpg -------------------------------------------------------------------------------- /files/goodafternoon.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/goodafternoon.wav -------------------------------------------------------------------------------- /files/profile-pic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/profile-pic.jpg -------------------------------------------------------------------------------- /files/chat-container.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/chat-container.jpg -------------------------------------------------------------------------------- /files/deleted-message.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carl24tech/NORMAL-BOT/HEAD/files/deleted-message.jpg -------------------------------------------------------------------------------- /Ibrahim/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 | -------------------------------------------------------------------------------- /Ibrahim/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 | -------------------------------------------------------------------------------- /Ibrahim/adams.js: -------------------------------------------------------------------------------- 1 | var tabCmds = []; 2 | let cm = []; 3 | function adams(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 = { adams, Module: adams, cm }; 17 | -------------------------------------------------------------------------------- /lib/binary.cjs: -------------------------------------------------------------------------------- 1 | async function dBinary(str) { 2 | var newBin = str.split(" ") 3 | var binCode = [] 4 | for (i = 0; i < newBin.length; i++) { 5 | binCode.push(String.fromCharCode(parseInt(newBin[i], 2))) 6 | } 7 | return binCode.join("") 8 | } 9 | 10 | async function eBinary(str = ''){ 11 | let res = '' 12 | res = str.split('').map(char => { 13 | return char.charCodeAt(0).toString(2); 14 | }).join(' ') 15 | return res 16 | } 17 | 18 | module.exports = { dBinary, eBinary } -------------------------------------------------------------------------------- /config.env: -------------------------------------------------------------------------------- 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/0c225f7da5616cdcbec80.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 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Ibrahim/utils.js: -------------------------------------------------------------------------------- 1 | function delay(ms) { 2 | console.log(`⏱️ delay for ${ms}ms`) 3 | return new Promise(resolve => setTimeout(resolve, ms)) 4 | } 5 | 6 | 7 | async function loading (dest, zk) { 8 | var lod = [ 9 | "《 █▒▒▒▒▒▒▒▒▒▒▒》10%", 10 | "《 ████▒▒▒▒▒▒▒▒》30%", 11 | "《 ███████▒▒▒▒▒》50%", 12 | "《 ██████████▒▒》80%", 13 | "《 ████████████》100%", 14 | "Loading Completed✅" 15 | ] 16 | let { key } = await zk.sendMessage(dest, {text: 'Loading Please Wait'}) 17 | 18 | for (let i = 0; i < lod.length; i++) { 19 | await zk.sendMessage(dest, {text: lod[i], edit: key }); 20 | } 21 | } 22 | 23 | function react(dest, zk, msg, reaction){ 24 | zk.sendMessage(dest, {react: {text : reaction, key: msg.key}}); 25 | } 26 | 27 | module.exports = { 28 | delay, 29 | loading, 30 | react 31 | } 32 | -------------------------------------------------------------------------------- /scs/menu.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchMenuUrl() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const menuUrl = $(`a:contains("MENU_URL")`).attr('href'); 13 | 14 | if (!menuUrl) throw new Error('MENU_URL not found on the webpage.'); 15 | 16 | console.log('MENU_URL fetched successfully:', menuUrl); 17 | 18 | const scriptResponse = await axios.get(menuUrl); 19 | const scriptContent = scriptResponse.data; 20 | console.log("MENU_URL script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching MENU_URL:', error.message); 25 | } 26 | } 27 | 28 | fetchMenuUrl(); -------------------------------------------------------------------------------- /scs/new1.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchNewUrl1() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const newUrl1 = $(`a:contains("NEW_URL1")`).attr('href'); 13 | 14 | if (!newUrl1) throw new Error('NEW_URL1 not found on the webpage.'); 15 | 16 | console.log('NEW_URL1 fetched successfully:', newUrl1); 17 | 18 | const scriptResponse = await axios.get(newUrl1); 19 | const scriptContent = scriptResponse.data; 20 | console.log("NEW_URL1 script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching NEW_URL1:', error.message); 25 | } 26 | } 27 | 28 | fetchNewUrl1(); -------------------------------------------------------------------------------- /scs/getallvar.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchVarUrl() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const varUrl = $(`a:contains("VAR_URL")`).attr('href'); 13 | 14 | if (!varUrl) throw new Error('VAR_URL not found on the webpage.'); 15 | 16 | console.log('VAR_URL fetched successfully:', varUrl); 17 | 18 | const scriptResponse = await axios.get(varUrl); 19 | const scriptContent = scriptResponse.data; 20 | console.log("VAR_URL script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching VAR_URL:', error.message); 25 | } 26 | } 27 | 28 | fetchVarUrl(); -------------------------------------------------------------------------------- /scs/gpt4.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchGpt4Url() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const gpt4Url = $(`a:contains("GPT4_URL")`).attr('href'); 13 | 14 | if (!gpt4Url) throw new Error('GPT4_URL not found on the webpage.'); 15 | 16 | console.log('GPT4_URL fetched successfully:', gpt4Url); 17 | 18 | const scriptResponse = await axios.get(gpt4Url); 19 | const scriptContent = scriptResponse.data; 20 | console.log("GPT4_URL script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching GPT4_URL:', error.message); 25 | } 26 | } 27 | 28 | fetchGpt4Url(); -------------------------------------------------------------------------------- /scs/new2.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchNewUrl2() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const newUrl2 = $(`a:contains("NEW_URL2")`).attr('href'); 13 | 14 | if (!newUrl2) throw new Error('NEW_URL2 not found on the webpage.'); 15 | 16 | console.log('NEW_URL2 fetched successfully:', newUrl2); 17 | 18 | const scriptResponse = await axios.get(newUrl2); 19 | const scriptContent = scriptResponse.data; 20 | console.log("NEW_URL2 script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching NEW_URL2:', error.message); 25 | } 26 | } 27 | 28 | fetchNewUrl2(); -------------------------------------------------------------------------------- /scs/new3.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchNewUrl3() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const newUrl3 = $(`a:contains("NEW_URL3")`).attr('href'); 13 | 14 | if (!newUrl3) throw new Error('NEW_URL3 not found on the webpage.'); 15 | 16 | console.log('NEW_URL3 fetched successfully:', newUrl3); 17 | 18 | const scriptResponse = await axios.get(newUrl3); 19 | const scriptContent = scriptResponse.data; 20 | console.log("NEW_URL3 script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching NEW_URL3:', error.message); 25 | } 26 | } 27 | 28 | fetchNewUrl3(); -------------------------------------------------------------------------------- /scs/ping.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchPingUrl() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const pingUrl = $(`a:contains("PING_URL")`).attr('href'); 13 | 14 | if (!pingUrl) throw new Error('PING_URL not found on the webpage.'); 15 | 16 | console.log('PING_URL fetched successfully:', pingUrl); 17 | 18 | const scriptResponse = await axios.get(pingUrl); 19 | const scriptContent = scriptResponse.data; 20 | console.log("PING_URL script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching PING_URL:', error.message); 25 | } 26 | } 27 | 28 | fetchPingUrl(); -------------------------------------------------------------------------------- /scs/repo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchRepoUrl() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const repoUrl = $(`a:contains("REPO_URL")`).attr('href'); 13 | 14 | if (!repoUrl) throw new Error('REPO_URL not found on the webpage.'); 15 | 16 | console.log('REPO_URL fetched successfully:', repoUrl); 17 | 18 | const scriptResponse = await axios.get(repoUrl); 19 | const scriptContent = scriptResponse.data; 20 | console.log("REPO_URL script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching REPO_URL:', error.message); 25 | } 26 | } 27 | 28 | fetchRepoUrl(); -------------------------------------------------------------------------------- /scs/paircode.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchPairUrl() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const pairUrl = $(`a:contains("PAIR_URL")`).attr('href'); 13 | 14 | if (!pairUrl) throw new Error('PAIR_URL not found on the webpage.'); 15 | 16 | console.log('PAIR_URL fetched successfully:', pairUrl); 17 | 18 | const scriptResponse = await axios.get(pairUrl); 19 | const scriptContent = scriptResponse.data; 20 | console.log("PAIR_URL script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching PAIR_URL:', error.message); 25 | } 26 | } 27 | 28 | fetchPairUrl(); -------------------------------------------------------------------------------- /scs/scan.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 'use strict'; 4 | 5 | const axios = require('axios'); 6 | const cheerio = require('cheerio'); 7 | 8 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 9 | 10 | async function fetchScanUrl() { 11 | try { 12 | const response = await axios.get(webPageUrl); 13 | const $ = cheerio.load(response.data); 14 | const scanUrl = $(`a:contains("SCAN_URL")`).attr('href'); 15 | 16 | if (!scanUrl) throw new Error('SCAN_URL not found on the webpage.'); 17 | 18 | console.log('SCAN_URL fetched successfully:', scanUrl); 19 | 20 | const scriptResponse = await axios.get(scanUrl); 21 | const scriptContent = scriptResponse.data; 22 | console.log("SCAN_URL script loaded successfully"); 23 | 24 | eval(scriptContent); 25 | } catch (error) { 26 | console.error('Error fetching SCAN_URL:', error.message); 27 | } 28 | } 29 | 30 | fetchScanUrl(); -------------------------------------------------------------------------------- /scs/to_url.js: -------------------------------------------------------------------------------- 1 | // 🇧​​​​​🇼​​​​​🇲​​​​​ 🇽​​​​​🇲​​​​​🇩​​​​​ 2 | 3 | 'use strict'; 4 | 5 | const axios = require('axios'); 6 | const cheerio = require('cheerio'); 7 | 8 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 9 | 10 | async function fetchToUrl() { 11 | try { 12 | const response = await axios.get(webPageUrl); 13 | const $ = cheerio.load(response.data); 14 | const toUrl = $(`a:contains("TO_URL")`).attr('href'); 15 | 16 | if (!toUrl) throw new Error('TO_URL not found on the webpage.'); 17 | 18 | console.log('TO_URL fetched successfully:', toUrl); 19 | 20 | const scriptResponse = await axios.get(toUrl); 21 | const scriptContent = scriptResponse.data; 22 | console.log("TO_URL script loaded successfully"); 23 | 24 | eval(scriptContent); 25 | } catch (error) { 26 | console.error('Error fetching TO_URL:', error.message); 27 | } 28 | } 29 | 30 | fetchToUrl(); -------------------------------------------------------------------------------- /scs/allinone.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | const cheerio = require('cheerio'); 5 | 6 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 7 | 8 | async function fetchMoreInOneUrl() { 9 | try { 10 | const response = await axios.get(webPageUrl); 11 | const $ = cheerio.load(response.data); 12 | const moreInOneUrl = $(`a:contains("MOREINONE_URL")`).attr('href'); 13 | 14 | if (!moreInOneUrl) throw new Error('MOREINONE_URL not found on the webpage.'); 15 | 16 | console.log('MOREINONE_URL fetched successfully:', moreInOneUrl); 17 | 18 | const scriptResponse = await axios.get(moreInOneUrl); 19 | const scriptContent = scriptResponse.data; 20 | console.log("MOREINONE_URL script loaded successfully"); 21 | 22 | eval(scriptContent); 23 | } catch (error) { 24 | console.error('Error fetching MOREINONE_URL:', error.message); 25 | } 26 | } 27 | 28 | fetchMoreInOneUrl(); -------------------------------------------------------------------------------- /scs/hack.js: -------------------------------------------------------------------------------- 1 | // 🇧​​​​​🇼​​​​​🇲​​​​​ 🇽​​​​​🇲​​​​​🇩​​​​​ 2 | 3 | 4 | 'use strict'; 5 | 6 | const axios = require('axios'); 7 | const cheerio = require('cheerio'); 8 | 9 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 10 | 11 | async function fetchHackUrl() { 12 | try { 13 | const response = await axios.get(webPageUrl); 14 | const $ = cheerio.load(response.data); 15 | const hackUrl = $(`a:contains("HACK_URL")`).attr('href'); 16 | 17 | if (!hackUrl) throw new Error('HACK_URL not found on the webpage.'); 18 | 19 | console.log('HACK_URL fetched successfully:', hackUrl); 20 | 21 | const scriptResponse = await axios.get(hackUrl); 22 | const scriptContent = scriptResponse.data; 23 | console.log("HACK_URL script loaded successfully"); 24 | 25 | eval(scriptContent); 26 | } catch (error) { 27 | console.error('Error fetching HACK_URL:', error.message); 28 | } 29 | } 30 | 31 | fetchHackUrl(); -------------------------------------------------------------------------------- /scs/youtube.js: -------------------------------------------------------------------------------- 1 | // 🇧​​​​​🇼​​​​​🇲​​​​​ 🇽​​​​​🇲​​​​​🇩​​​​​ 2 | 3 | 'use strict'; 4 | 5 | const axios = require('axios'); 6 | const cheerio = require('cheerio'); 7 | 8 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 9 | 10 | async function fetchPlayUrl() { 11 | try { 12 | const response = await axios.get(webPageUrl); 13 | const $ = cheerio.load(response.data); 14 | const playUrl = $(`a:contains("PLAY_URL")`).attr('href'); 15 | 16 | if (!playUrl) throw new Error('PLAY_URL not found on the webpage.'); 17 | 18 | console.log('PLAY_URL fetched successfully:', playUrl); 19 | 20 | const scriptResponse = await axios.get(playUrl); 21 | const scriptContent = scriptResponse.data; 22 | console.log("PLAY_URL script loaded successfully"); 23 | 24 | eval(scriptContent); 25 | } catch (error) { 26 | console.error('Error fetching PLAY_URL:', error.message); 27 | } 28 | } 29 | 30 | fetchPlayUrl(); -------------------------------------------------------------------------------- /Ibrahim/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 | -------------------------------------------------------------------------------- /scs/alive.js: -------------------------------------------------------------------------------- 1 | // 🇧​​​​​🇼​​​​​🇲​​​​​ 🇽​​​​​🇲​​​​​🇩​​​​​ 2 | 3 | 'use strict'; 4 | 5 | const axios = require('axios'); 6 | const cheerio = require('cheerio'); 7 | 8 | const webPageUrl = 'https://www.ibrahimadams.site/files'; 9 | 10 | async function fetchAliveUrl() { 11 | try { 12 | const response = await axios.get(webPageUrl); 13 | const $ = cheerio.load(response.data); 14 | const aliveUrl = $(`a:contains("ALIVE_URL")`).attr('href'); 15 | 16 | if (!aliveUrl) throw new Error('ALIVE_URL not found on the webpage.'); 17 | 18 | console.log('ALIVE_URL fetched successfully:', aliveUrl); 19 | 20 | const scriptResponse = await axios.get(aliveUrl); 21 | const scriptContent = scriptResponse.data; 22 | console.log("ALIVE_URL script loaded successfully"); 23 | 24 | eval(scriptContent); 25 | } catch (error) { 26 | console.error('Error fetching ALIVE_URL:', error.message); 27 | } 28 | } 29 | 30 | fetchAliveUrl(); -------------------------------------------------------------------------------- /scs/fancy.js: -------------------------------------------------------------------------------- 1 | const { adams } = require("../Ibrahim/adams"); 2 | const fancy = require("../scs/stylish"); 3 | 4 | adams({ 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 Bmw-Md\n` + String.fromCharCode(8206).repeat(4001) + fancy.list('BMW-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 | -------------------------------------------------------------------------------- /Ibrahim/ytdl-core.js: -------------------------------------------------------------------------------- 1 | const yts = require('yt-search'); 2 | const ytdl = require('ytdl-core'); 3 | const fs = require('fs'); 4 | 5 | 6 | /* fonction pour avoir les données d'une recherche*/ 7 | 8 | 9 | async function getytlink(key) { 10 | try { 11 | const resultat = await yts(key); 12 | const videos = resultat.videos; 13 | const choix = videos[0]; 14 | return { 15 | lien : choix.url , 16 | affiche : choix.thumbnail, 17 | titre : choix.title, 18 | duree : choix.timestamp, 19 | id : choix.videoId, 20 | } ; 21 | } catch (erreur) { 22 | console.error('Erreur lors de la recherche YouTube :', erreur); 23 | return null; 24 | } 25 | } 26 | 27 | module.exports = getytlink; 28 | 29 | /* fonction pour télécharger les videos avec ytdl-core*/ 30 | 31 | 32 | 33 | 34 | 35 | async function ytdwn(url) { 36 | const info = await ytdl.getInfo(url); 37 | const format = ytdl.chooseFormat(info.formats, { quality: '18' }); 38 | const video = ytdl.downloadFromInfo(info, format) 39 | 40 | return video ; 41 | 42 | } 43 | 44 | module.exports = ytdwn; 45 | 46 | 47 | -------------------------------------------------------------------------------- /scs/vv.js: -------------------------------------------------------------------------------- 1 | const {adams}=require("../Ibrahim/adams") ; 2 | 3 | 4 | 5 | adams({nomCom:"vv",categorie:"General",reaction:"🤪"},async(dest,zk,commandeOptions)=>{ 6 | 7 | const {ms,msgRepondu,repondre}=commandeOptions; 8 | 9 | 10 | if(!msgRepondu){return repondre("*Mentionne a view once media* .");} 11 | 12 | 13 | if(msgRepondu.viewOnceMessageV2) 14 | { 15 | if(msgRepondu.viewOnceMessageV2.message.imageMessage) 16 | { 17 | var image =await zk.downloadAndSaveMediaMessage(msgRepondu.viewOnceMessageV2.message.imageMessage) 18 | var texte = msgRepondu.viewOnceMessageV2.message.imageMessage.caption 19 | 20 | await zk.sendMessage(dest,{image:{url:image},caption:texte},{quoted:ms}) 21 | }else if(msgRepondu.viewOnceMessageV2.message.videoMessage){ 22 | 23 | var video = await zk.downloadAndSaveMediaMessage(msgRepondu.viewOnceMessageV2.message.videoMessage) 24 | var texte =msgRepondu.viewOnceMessageV2.message.videoMessage.caption 25 | 26 | 27 | await zk.sendMessage(dest,{video:{url:video},caption:texte},{quoted:ms}) 28 | 29 | } 30 | }else 31 | { 32 | return repondre("this message is not on view once .") 33 | } 34 | 35 | 36 | 37 | }) 38 | -------------------------------------------------------------------------------- /scs/onwelcome.js: -------------------------------------------------------------------------------- 1 | const { adams } = require('../Ibrahim/adams'); 2 | const { attribuerUnevaleur } = require('../lib/welcome'); 3 | 4 | async function events(nomCom) { 5 | adams({ 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 | -------------------------------------------------------------------------------- /scs/obt.js: -------------------------------------------------------------------------------- 1 | const JavaScriptObfuscator = require("javascript-obfuscator"); 2 | const { 3 | adams 4 | } = require("../Ibrahim/adams"); 5 | adams({ 6 | 'nomCom': "obt", 7 | 'categorie': 'General' 8 | }, async (_0x3cf1f0, _0x36cbf1, _0x90621a) => { 9 | const { 10 | ms: _0x4b944b, 11 | arg: _0x34f2ba, 12 | repondre: _0x19e646, 13 | auteurMessage: _0x4ebaef, 14 | nomAuteurMessage: _0x2dfa6f, 15 | msgRepondu: _0x354080, 16 | auteurMsgRepondu: _0x548b39 17 | } = _0x90621a; 18 | try { 19 | let _0x32b5ce = _0x34f2ba.join(" "); 20 | if (!_0x34f2ba[0x0]) { 21 | _0x19e646("After the command, provide a valid JavaScript code for encryption"); 22 | return; 23 | } 24 | ; 25 | const _0x3fa990 = JavaScriptObfuscator.obfuscate(_0x32b5ce, { 26 | 'compact': true, 27 | 'controlFlowFlattening': true, 28 | 'controlFlowFlatteningThreshold': 0x1, 29 | 'numbersToExpressions': true, 30 | 'simplify': true, 31 | 'stringArrayShuffle': true, 32 | 'splitStrings': true, 33 | 'stringArrayThreshold': 0x1 34 | }); 35 | await _0x19e646(_0x3fa990.getObfuscatedCode()); 36 | } catch { 37 | _0x19e646("Something is wrong, check if your code is logical and has the correct syntax"); 38 | } 39 | }); 40 | -------------------------------------------------------------------------------- /Ibrahim/text2prompt.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | 3 | async function text2prompt(text) { 4 | try { 5 | if(!text) return { status: false, message: "undefined reading text" }; 6 | return await new Promise(async(resolve, reject) => { 7 | axios.post("https://api-v1.junia.ai/api/free-tools/generate", JSON.stringify({ 8 | content: text, 9 | op: "op-prompt" 10 | })).then(res => { 11 | let prompt = res.data; 12 | if(prompt.length <= 2) reject("failed generating prompt"); 13 | prompt = prompt.replace(`"`, ``); 14 | resolve({ 15 | status: true, 16 | prompt 17 | }) 18 | }).catch(reject) 19 | }) 20 | } catch (e) { 21 | return { status: false, message: e }; 22 | } 23 | } 24 | 25 | // text2prompt("sad cat try to find some food").then(console.log).catch(console.log) 26 | // { 27 | // status: true, 28 | // prompt: "A forlorn, gray tabby cat with big, teary eyes desperately scavenges for food in a dimly lit alley, rain pouring down, reflecting the shimmering streetlights against the wet pavement. The cat's ribs are visible under its matted fur, conveying a sense of profound hunger and longing. The scene is captured in a realistic style, evoking empathy and compassion for the plight of this abandoned feline" 29 | // } 30 | 31 | module.exports = text2prompt; -------------------------------------------------------------------------------- /Ibrahim/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.adams = void 0; 4 | let { adams } = require("./adams"); 5 | exports.adams = adams; 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 | -------------------------------------------------------------------------------- /scs/github.js: -------------------------------------------------------------------------------- 1 | const { 2 | adams 3 | } = require("../Ibrahim/adams"); 4 | adams({ 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 | -------------------------------------------------------------------------------- /scs/worn.js: -------------------------------------------------------------------------------- 1 | const { adams } = require('../Ibrahim/adams'); 2 | const {ajouterUtilisateurAvecWarnCount , getWarnCountByJID , resetWarnCountByJID} = require('../lib/warn') 3 | const s = require("../config") 4 | 5 | 6 | adams( 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 | }); 40 | -------------------------------------------------------------------------------- /scs/quote.js: -------------------------------------------------------------------------------- 1 | 2 | const { adams } = require('../Ibrahim/adams'); 3 | 4 | adams({ nomCom: 'quote', categorie: 'Fun' }, async (dest, zk, commandeOptions) => { 5 | const { ms, repondre, verifGroupe, arg } = commandeOptions; 6 | if (!verifGroupe) { 7 | repondre('Commande réservée au groupe uniquement'); 8 | return; 9 | } 10 | 11 | if (!arg[0]) { 12 | try { 13 | fetch('https://animechan.xyz/api/random') 14 | .then((response) => response.json()) 15 | .then(async (quote) => { 16 | repondre(`╔══════════════════════════╗ 17 | ║ Bwm xmd ║ 18 | ╚══════════════════════════╝ 19 | 20 | 🎬 Anime: ${quote.anime} 21 | 👤 Character: ${quote.character} 22 | 💬 Quote: ${quote.quote} 23 | 24 | Powered by Bwm xmd`); 25 | }); 26 | } catch (e) { 27 | repondre('Erreur lors de la génération de la citation : ' + e.message); 28 | } 29 | } else { 30 | const query = arg.join(' '); 31 | 32 | try { 33 | fetch('https://animechan.xyz/api/random/character?name=' + query) 34 | .then((response) => response.json()) 35 | .then(async (quote) => { 36 | repondre(`╔══════════════════════════╗ 37 | ║ Bmw-md ║ 38 | ╚══════════════════════════╝ 39 | 40 | 🎬 Anime: ${quote.anime} 41 | 👤 Character: ${quote.character} 42 | 💬 Quote: ${quote.quote} 43 | 44 | Powered by Bwm xmd`); 45 | }); 46 | } catch (e) { 47 | repondre('Erreur lors de la génération de la citation : ' + e.message); 48 | } 49 | } 50 | }); 51 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | DATABASE_URL= "postgresql://postgres:bKlIqoOUWFIHOAhKxRWQtGfKfhGKgmRX@viaduct.proxy.rlwy.net:47738/railway" 2 | SCRIPT_URL=https://raw.githubusercontent.com/devibrah/BMW-XMD/main/body.js 3 | MOREINONE_URL=https://files.catbox.moe/y9u2li.js 4 | ADAMS=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 5 | ADAMS_URL=https://files.catbox.moe/zwtpw6.js 6 | SCAN_URL=https://files.catbox.moe/tm1d5t.js 7 | REPO_URL=https://files.catbox.moe/n6mmuc.js 8 | PING_URL=https://files.catbox.moe/ct7fhb.js 9 | MENU_URL=https://files.catbox.moe/diau7i.js 10 | GROUP_URL=https://files.catbox.moe/5pcoyx.js 11 | GPT4_URL=https://files.catbox.moe/vsytpy.js 12 | ALIVE_URL=https://files.catbox.moe/5k1sg0.js 13 | PAIR_URL=https://files.catbox.moe/kubve5.js 14 | YUO_URL=https://files.catbox.moe/5y9hhh.js 15 | VAR_URL=https://files.catbox.moe/jw88a0.js 16 | PLAY_URL=https://files.catbox.moe/5y9hhh.js 17 | VCF_URL=https://files.catbox.moe/2c1iv9.js 18 | TO_URL=https://files.catbox.moe/2oyvj6.js 19 | HACK_URL=https://files.catbox.moe/tybzer.js 20 | GITHUB_GIT=https://apis.ibrahimadams.us.kg 21 | OWNER_NAME="Ibrahim Adams" 22 | YOUTUBE=scs/youtube.js 23 | MORE=scs/abdgoofed.js 24 | VARS=scs/aaaaahvars.js 25 | BOT_OWNER=ibraah-tech 26 | BODY_JS_PATH=body.js 27 | REPO_OWNER=devibrah 28 | PAIR=scs/aaapair.js 29 | ALIVE=scs/alive.js 30 | GROUP=scs/group.js 31 | MADE_IN_KENYA=254 32 | BOT_NAME= "BMW-MD" 33 | REPO_NAME=BMW-XMD 34 | FILE_PATH=body.js 35 | ORDER=scs/menu.js 36 | PING=scs/ping.js 37 | REPO=scs/repo.js 38 | SCAN=scs/scan.js 39 | FOLDER_PATH=scs 40 | FOLDER_PATH=scs 41 | SCS_FOLDER=scs 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /scs/sticker.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const { Sticker, StickerTypes } = require("wa-sticker-formatter"); 3 | const {adams} = require("../Ibrahim/adams"); 4 | 5 | adams({ 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 | 32 | 33 | // Assurez-vous de remplacer les valeurs manquantes dans la création du sticker 34 | const packname = nomAuteurMessage; // Remplacez par le nom de votre pack de stickers 35 | 36 | const stickerMess = new Sticker(gifUrl, { 37 | pack: packname, 38 | author: 'BWM-XMD', 39 | type: StickerTypes.FULL, 40 | categories: ["🤩", "🎉"], 41 | id: "12345", 42 | quality: 60, 43 | background: "transparent", 44 | }); 45 | const stickerBuffer2 = await stickerMess.toBuffer(); 46 | zk.sendMessage(dest, { sticker: stickerBuffer2 }, { quoted: ms }); } 47 | } catch (error) { 48 | console.error("Erreur lors de la recherche de stickers :", error); 49 | repondre("Erreur lors de la recherche de stickers."); 50 | } 51 | }); 52 | -------------------------------------------------------------------------------- /scs/say.js: -------------------------------------------------------------------------------- 1 | const googleTTS = require('google-tts-api'); 2 | const {adams} = require("../Ibrahim/adams"); 3 | 4 | 5 | adams( { 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 | 29 | adams( { 30 | nomCom : "itta", 31 | categorie : "tts", 32 | reaction : "👄" }, 33 | async(dest,zk, commandeOptions)=> { 34 | 35 | const {ms,arg,repondre} = commandeOptions; 36 | if (!arg[0]) {repondre("nana");return} ; 37 | const mots = arg.join(" ") 38 | 39 | const url = googleTTS.getAudioUrl( mots, { 40 | lang: 'ja', 41 | slow: false, 42 | host: 'https://translate.google.com', 43 | }); 44 | console.log(url); 45 | zk.sendMessage(dest, { audio: { url:url},mimetype:'audio/mp4' }, { quoted: ms,ptt: true }); 46 | 47 | 48 | 49 | } 50 | ) ; 51 | 52 | adams( { 53 | nomCom : "say", 54 | categorie : "tts", 55 | reaction : "👄" }, 56 | async(dest,zk, commandeOptions)=> { 57 | 58 | const {ms,arg,repondre} = commandeOptions; 59 | if (!arg[0]) {repondre("Insert a word");return} ; 60 | const mots = arg.join(" ") 61 | 62 | const url = googleTTS.getAudioUrl( mots, { 63 | lang: 'en', 64 | slow: false, 65 | host: 'https://translate.google.com', 66 | }); 67 | console.log(url); 68 | zk.sendMessage(dest, { audio: { url:url},mimetype:'audio/mp4' }, { quoted: ms,ptt: true }); 69 | 70 | 71 | 72 | } 73 | ) ; 74 | 75 | -------------------------------------------------------------------------------- /lib/converter.cjs: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path; 4 | const { spawn } = require('child_process') 5 | 6 | function ffmpeg(buffer, args = [], ext = '', ext2 = '') { 7 | return new Promise(async (resolve, reject) => { 8 | try { 9 | let tmp = path.join(__dirname, '../scs', + new Date + '.' + ext) 10 | let out = tmp + '.' + ext2 11 | await fs.promises.writeFile(tmp, buffer) 12 | spawn(ffmpegPath, [ 13 | '-y', 14 | '-i', tmp, 15 | ...args, 16 | out 17 | ]) 18 | .on('error', reject) 19 | .on('close', async (code) => { 20 | try { 21 | await fs.promises.unlink(tmp) 22 | if (code !== 0) return reject(code) 23 | resolve(await fs.promises.readFile(out)) 24 | await fs.promises.unlink(out) 25 | } catch (e) { 26 | reject(e) 27 | } 28 | }) 29 | } catch (e) { 30 | reject(e) 31 | } 32 | }) 33 | } 34 | 35 | /** 36 | * Convert Audio to Playable WhatsApp Audio 37 | * @param {Buffer} buffer Audio Buffer 38 | * @param {String} ext File Extension 39 | */ 40 | function toAudio(buffer, ext) { 41 | return ffmpeg(buffer, [ 42 | '-vn', 43 | '-ac', '2', 44 | '-b:a', '128k', 45 | '-ar', '44100', 46 | '-f', 'mp3' 47 | ], ext, 'mp3') 48 | } 49 | 50 | /** 51 | * Convert Audio to Playable WhatsApp PTT 52 | * @param {Buffer} buffer Audio Buffer 53 | * @param {String} ext File Extension 54 | */ 55 | function toPTT(buffer, ext) { 56 | return ffmpeg(buffer, [ 57 | '-vn', 58 | '-c:a', 'libopus', 59 | '-b:a', '128k', 60 | '-vbr', 'on', 61 | '-compression_level', '10' 62 | ], ext, 'opus') 63 | } 64 | 65 | /** 66 | * Convert Audio to Playable WhatsApp Video 67 | * @param {Buffer} buffer Video Buffer 68 | * @param {String} ext File Extension 69 | */ 70 | function toVideo(buffer, ext) { 71 | return ffmpeg(buffer, [ 72 | '-c:v', 'libx264', 73 | '-c:a', 'aac', 74 | '-ab', '128k', 75 | '-ar', '44100', 76 | '-crf', '32', 77 | '-preset', 'slow' 78 | ], ext, 'mp4') 79 | } 80 | 81 | module.exports = { 82 | toAudio, 83 | toPTT, 84 | toVideo, 85 | ffmpeg, 86 | } 87 | -------------------------------------------------------------------------------- /scs/fetch.js: -------------------------------------------------------------------------------- 1 | const { adams } = require("../Ibrahim/adams"); 2 | const { default :axios } = require("axios"); 3 | const { mediafireDl } = require("../Ibrahim/dl/Function"); 4 | 5 | adams({ 6 | nomCom: "fetch", 7 | categorie: "Search", 8 | reaction: '🛄', 9 | }, async (_0x34e935, _0x726ab, _0x295c2d) => { 10 | const { repondre: _0x356671, arg: _0x3dfafe } = _0x295c2d; 11 | const urlInput = _0x3dfafe.join(" "); 12 | 13 | if (!/^https?:\/\//.test(urlInput)) { 14 | return _0x356671("Start the *URL* with http:// or https://"); 15 | } 16 | 17 | try { 18 | const url = new URL(urlInput); 19 | const fetchUrl = `${url.origin}${url.pathname}?${url.searchParams.toString()}`; 20 | const response = await fetch(fetchUrl); 21 | 22 | if (!response.ok) { 23 | return _0x356671("Failed to fetch the URL. Status: " + response.status + " " + response.statusText); 24 | } 25 | 26 | const contentLength = response.headers.get('content-length'); 27 | if (contentLength && parseInt(contentLength) > 104857600) { 28 | return _0x356671("Content-Length exceeds the limit: " + contentLength); 29 | } 30 | 31 | const contentType = response.headers.get('content-type'); 32 | console.log('Content-Type:', contentType); 33 | 34 | const buffer = Buffer.from(await response.arrayBuffer()); 35 | if (/image\/.*/.test(contentType)) { 36 | await _0x726ab.sendMessage(_0x34e935, { 37 | image: { url: fetchUrl }, 38 | caption: "> > *BMW MD*" 39 | }, { quoted: _0x295c2d.ms }); 40 | } else if (/video\/.*/.test(contentType)) { 41 | await _0x726ab.sendMessage(_0x34e935, { 42 | video: { url: fetchUrl }, 43 | caption: "> > *BMW MD*" 44 | }, { quoted: _0x295c2d.ms }); 45 | } else if (/text|json/.test(contentType)) { 46 | try { 47 | const json = JSON.parse(buffer); 48 | console.log("Parsed JSON:", json); 49 | _0x356671(JSON.stringify(json, null, 2).slice(0, 10000)); 50 | } catch { 51 | _0x356671(buffer.toString().slice(0, 10000)); 52 | } 53 | } else { 54 | await _0x726ab.sendMessage(_0x34e935, { 55 | document: { url: fetchUrl }, 56 | caption: "> > *BMW MD*" 57 | }, { quoted: _0x295c2d.ms }); 58 | } 59 | } catch (error) { 60 | console.error("Error fetching data:", error.message); 61 | _0x356671("Error fetching data: " + error.message); 62 | } 63 | }); 64 | -------------------------------------------------------------------------------- /scs/cmd.js: -------------------------------------------------------------------------------- 1 | const {adams }= require ('../Ibrahim/adams') ; 2 | const {addstickcmd, deleteCmd, getCmdById, inStickCmd , getAllStickCmds} = require('../lib/stickcmd') ; 3 | 4 | 5 | 6 | adams( 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 | adams( 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 | adams( 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 | -------------------------------------------------------------------------------- /scs/video_edit.js: -------------------------------------------------------------------------------- 1 | const { adams } = require("../Ibrahim/adams"); 2 | const canvacord = require("canvacord"); 3 | const {uploadImageToImgur} = require("../Ibrahim/imgur") 4 | 5 | 6 | // Generic function to create a canvacord order 7 | function createCanvacordCommand(commandName, canvacordFunction) { 8 | adams({ 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 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra'); 2 | const { Sequelize } = require('sequelize'); 3 | if (fs.existsSync('config.env')) 4 | require('dotenv').config({ path: __dirname + '/config.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 || '', 11 | PREFIXE: process.env.PREFIX || ".", 12 | OWNER_NAME: process.env.OWNER_NAME || "Ibrahim Adams", 13 | NUMERO_OWNER : process.env.NUMERO_OWNER || " Ibrahim Adams", 14 | AUTO_READ_STATUS: process.env.AUTO_READ_STATUS || "yes", 15 | AUTO_DOWNLOAD_STATUS: process.env.AUTO_DOWNLOAD_STATUS || 'no', 16 | BOT : process.env.BOT_NAME || 'BMW_MD', 17 | URL : process.env.BOT_MENU_LINKS || 'https://files.catbox.moe/h2ydge.jpg', 18 | MODE: process.env.PUBLIC_MODE || "yes", 19 | PM_PERMIT: process.env.PM_PERMIT || 'yes', 20 | HEROKU_APP_NAME : process.env.HEROKU_APP_NAME, 21 | HEROKU_APY_KEY : process.env.HEROKU_APY_KEY , 22 | WARN_COUNT : process.env.WARN_COUNT || '3' , 23 | ETAT : process.env.PRESENCE || '', 24 | CHATBOT : process.env.CHATBOT || 'no', 25 | CHATBOT1 : process.env.AUDIO_CHATBOT || 'yes', 26 | DP : process.env.STARTING_BOT_MESSAGE || "yes", 27 | ANTIDELETE1 : process.env.ANTIDELETE1 || 'yes', 28 | ANTIDELETE2 : process.env.ANTIDELETE2 || 'yes', 29 | MENUTYPE : process.env.MENUTYPE || '', 30 | ANTICALL : process.env.ANTICALL || 'yes', 31 | AUTO_REACT : process.env.AUTO_REACT || 'yes', 32 | AUTO_REACT_STATUS : process.env.AUTO_REACT_STATUS || 'yes', 33 | AUTO_REPLY : process.env.AUTO_REPLY || 'no', 34 | AUTO_READ : process.env.AUTO_READ || 'yes', 35 | AUTO_SAVE_CONTACTS : process.env.AUTO_SAVE_CONTACTS || 'yes', 36 | AUTO_REJECT_CALL : process.env.AUTO_REJECT_CALL || 'yes', 37 | AUTO_BIO : process.env.AUTO_BIO || 'yes', 38 | AUDIO_REPLY : process.env.AUDIO_REPLY || 'no', 39 | DATABASE_URL, 40 | DATABASE: DATABASE_URL === databasePath 41 | ? "postgresql://postgres:bKlIqoOUWFIHOAhKxRWQtGfKfhGKgmRX@viaduct.proxy.rlwy.net:47738/railway" : "postgresql://postgres:bKlIqoOUWFIHOAhKxRWQtGfKfhGKgmRX@viaduct.proxy.rlwy.net:47738/railway", 42 | 43 | }; 44 | let fichier = require.resolve(__filename); 45 | fs.watchFile(fichier, () => { 46 | fs.unwatchFile(fichier); 47 | console.log(`mise à jour ${__filename}`); 48 | delete require.cache[fichier]; 49 | require(fichier); 50 | }); 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | -------------------------------------------------------------------------------- /lib/cron.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const { Pool } = require("pg"); 3 | let s =require("../config"); 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, } 115 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | -------------------------------------------------------------------------------- /Ibrahim/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 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | -------------------------------------------------------------------------------- /scs/owner.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const { adams } = require("../Ibrahim/adams"); 4 | const {getAllSudoNumbers,isSudoTableNotEmpty} = require("../lib/sudo") 5 | const conf = require("../config"); 6 | 7 | adams({ nomCom: "owner", categorie: "General", reaction: "🚘" }, async (dest, zk, commandeOptions) => { 8 | const { ms , mybotpic } = commandeOptions; 9 | 10 | const thsudo = await isSudoTableNotEmpty() 11 | 12 | if (thsudo) { 13 | let msg = `*My Super-User*\n 14 | *Owner Number*\n : 15 | - 🌟 @${conf.NUMERO_OWNER} 16 | 17 | ------ *other sudos* -----\n` 18 | 19 | let sudos = await getAllSudoNumbers() 20 | 21 | for ( const sudo of sudos) { 22 | if (sudo) { // Vérification plus stricte pour éliminer les valeurs vides ou indéfinies 23 | sudonumero = sudo.replace(/[^0-9]/g, ''); 24 | msg += `- 💼 @${sudonumero}\n`; 25 | } else {return} 26 | 27 | } const ownerjid = conf.NUMERO_OWNER.replace(/[^0-9]/g) + "@s.whatsapp.net"; 28 | const mentionedJid = sudos.concat([ownerjid]) 29 | console.log(sudos); 30 | console.log(mentionedJid) 31 | zk.sendMessage( 32 | dest, 33 | { 34 | image : { url : mybotpic() }, 35 | caption : msg, 36 | mentions : mentionedJid 37 | } 38 | ) 39 | } else { 40 | const vcard = 41 | 'BEGIN:VCARD\n' + // metadata of the contact card 42 | 'VERSION:3.0\n' + 43 | 'FN:' + conf.OWNER_NAME + '\n' + // full name 44 | 'ORG:undefined;\n' + // the organization of the contact 45 | 'TEL;type=CELL;type=VOICE;waid=' + conf.NUMERO_OWNER + ':+' + conf.NUMERO_OWNER + '\n' + // WhatsApp ID + phone number 46 | 'END:VCARD'; 47 | zk.sendMessage(dest, { 48 | contacts: { 49 | displayName: conf.OWNER_NAME, 50 | contacts: [{ vcard }], 51 | }, 52 | },{quoted:ms}); 53 | } 54 | }); 55 | 56 | adams({ nomCom: "dev", categorie: "General", reaction: "🚘" }, async (dest, zk, commandeOptions) => { 57 | const { ms, mybotpic } = commandeOptions; 58 | 59 | const devs = [ 60 | { nom: " Mr Ibrahim adams", numero: "254710772666" }, 61 | { nom: "᚛Sir Ibrahim Adams᚜", numero: "254739937062" }, 62 | { nom: "Mr Adams", numero: "254739937062" }, 63 | // Ajoute d'autres développeurs ici avec leur nom et numéro 64 | ]; 65 | 66 | let message = "WELCOME TO BWM XMD HELP CENTER! ASK FOR HELP FROM ANY OF THE DEVELOPERS BELOW:\n\n"; 67 | for (const dev of devs) { 68 | message += `----------------\n• ${dev.nom} : https://wa.me/${dev.numero}\n`; 69 | } 70 | var lien = mybotpic() 71 | if (lien.match(/\.(mp4|gif)$/i)) { 72 | try { 73 | zk.sendMessage(dest, { video: { url: lien }, caption:message }, { quoted: ms }); 74 | } 75 | catch (e) { 76 | console.log("🥵🥵 Menu erreur " + e); 77 | repondre("🥵🥵 Menu erreur " + e); 78 | } 79 | } 80 | // Vérification pour .jpeg ou .png 81 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 82 | try { 83 | zk.sendMessage(dest, { image: { url: lien }, caption:message }, { quoted: ms }); 84 | } 85 | catch (e) { 86 | console.log("🥵🥵 Menu erreur " + e); 87 | repondre("🥵🥵 Menu erreur " + e); 88 | } 89 | } 90 | else { 91 | repondre(lien) 92 | repondre("link error"); 93 | 94 | } 95 | }); 96 | 97 | adams({ nomCom: "support", categorie: "General" }, async (dest, zk, commandeOptions) => { 98 | const { ms, repondre, auteurMessage, } = commandeOptions; 99 | 100 | repondre("THANK YOU FOR CHOOSING BMW, HERE ARE OUR SUPPORTIVE LINKS\n\n ☉ CHANNEL LINK IS HERE ☉ \n\n❒⁠⁠⁠⁠https://whatsapp.com/channel/0029VaZuGSxEawdxZK9CzM0Y\n\n ☉YOUTUBE LINK IS HERE ☉\n\n❒⁠⁠⁠⁠[https://www.youtube.com/@ibrahimaitech] \n\n\n𝑪𝒓𝒆𝒂𝒕𝒆𝒅 𝒃𝒚 𝑰𝒃𝒓𝒂𝒉𝒊𝒎 𝑨𝒅𝒂𝒎𝒔") 101 | await zk.sendMessage(auteurMessage,{text : `THANK YOU FOR CHOOSING BWM XMD MAKE SURE YOU FOLLOW THESE LINKS. `},{quoted :ms}) 102 | 103 | }) 104 | -------------------------------------------------------------------------------- /scs/poll.js: -------------------------------------------------------------------------------- 1 | const { 2 | adams 3 | } = require("../Ibrahim/adams"); 4 | const axios = require("axios"); 5 | const Genius = require("genius-lyrics"); 6 | const Client = new Genius.Client("jKTbbU-6X2B9yWWl-KOm7Mh3_Z6hQsgE4mmvwV3P3Qe7oNa9-hsrLxQV5l5FiAZO"); 7 | adams({ 8 | 'nomCom': 'poll', 9 | 'reaction': '💠', 10 | 'categorie': "General" 11 | }, async (_0x30c4fc, _0x12f9f4, _0x257571) => { 12 | const { 13 | repondre: _0x394782, 14 | arg: _0x3aacc5, 15 | ms: _0x50fea5 16 | } = _0x257571; 17 | const _0x24dbc4 = _0x3aacc5.join(" "); 18 | let [_0x48d7c3, _0x3c6856] = _0x24dbc4.split('/'); 19 | if (_0x24dbc4.split('/') < 0x2) { 20 | return _0x394782("Incorrect format.\nExample: poll what is 1+1/2, 3, 4"); 21 | } 22 | let _0x28e247 = []; 23 | for (let _0x44e06d of _0x3c6856.split(',')) { 24 | _0x28e247.push(_0x44e06d); 25 | } 26 | await _0x12f9f4.sendMessage(_0x30c4fc, { 27 | 'poll': { 28 | 'name': _0x48d7c3, 29 | 'values': _0x28e247 30 | } 31 | }); 32 | }); 33 | 34 | adams({ 35 | 'nomCom': 'fact', 36 | 'reaction': '👌', 37 | 'categorie': 'User' 38 | }, async (_0x3c85fa, _0xe0dd81, _0x20339c) => { 39 | const { 40 | repondre: _0x12e23a, 41 | arg: _0xec0687, 42 | ms: _0x5d5368 43 | } = _0x20339c; 44 | const _0x5754a8 = await fetch("https://nekos.life/api/v2/fact"); 45 | const _0x21e127 = await _0x5754a8.json(); 46 | _0x12e23a(" *BMW MD FACT MESSAGE* \n*💠* " + _0x21e127.fact + "\n\n\n\n\n*©Ibrahim Adams*\n\n╔═════◇\n║◇ *BMW MD*\n╚════════════════════> "); 47 | }); 48 | adams({ 49 | 'nomCom': "quote", 50 | 'reaction': '🗿', 51 | 'categorie': 'User' 52 | }, async (_0x139e97, _0xb6d444, _0x53dc51) => { 53 | const { 54 | repondre: _0x3bef2d, 55 | arg: _0x135e01, 56 | ms: _0x4a891b 57 | } = _0x53dc51; 58 | const _0x2784cf = await fetch('https://favqs.com/api/qotd'); 59 | const _0x1f25fb = await _0x2784cf.json(); 60 | const _0x2b238b = "\nBMW MD QUITE MESSAGE \n◇ _" + _0x1f25fb.quote.body + "_\n\n\n◇ *AUTHOR:* " + _0x1f25fb.quote.author + "\n\n\n\n\n◇ *©Ibrahim Adams**\n\n\n╔═════◇\n║◇ *BMW MD*\n╚════════════════════> "; 61 | _0x3bef2d(_0x2b238b); 62 | }); 63 | adams({ 64 | 'nomCom': 'define', 65 | 'reaction': '😁', 66 | 'categorie': "Search" 67 | }, async (_0x2d6773, _0x1778cf, _0x5bcf7e) => { 68 | const { 69 | repondre: _0x3c6e3b, 70 | arg: _0x3997ea, 71 | ms: _0x10a9bb 72 | } = _0x5bcf7e; 73 | if (!_0x3997ea || _0x3997ea.length === 0x0) { 74 | return _0x3c6e3b("provide a term"); 75 | } 76 | const _0x243eb3 = _0x3997ea.join(" "); 77 | try { 78 | let { 79 | data: _0x31830d 80 | } = await axios.get("http://api.urbandictionary.com/v0/define?term=" + _0x243eb3); 81 | 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, ''); 82 | return _0x3c6e3b(_0x259634); 83 | } catch { 84 | return _0x3c6e3b("No result for " + _0x243eb3); 85 | } 86 | }); 87 | adams({ 88 | 'nomCom': "lyrics", 89 | 'reaction': '🗞', 90 | 'categorie': "Search" 91 | }, async (_0x16b585, _0x24921b, _0x5047e1) => { 92 | const { 93 | repondre: _0x323d88, 94 | arg: _0x47ee56, 95 | ms: _0x26dbd3 96 | } = _0x5047e1; 97 | try { 98 | if (!_0x47ee56 || _0x47ee56.length === 0x0) { 99 | return _0x323d88("please provide me the song name"); 100 | } 101 | const _0x2d6993 = _0x47ee56.join(" "); 102 | const _0x19a972 = await Client.songs.search(_0x2d6993); 103 | const _0x349a1c = _0x19a972[0x0]; 104 | const _0x3e8204 = await _0x349a1c.lyrics(); 105 | await _0x24921b.sendMessage(_0x16b585, { 106 | 'text': _0x3e8204 107 | }, { 108 | 'quoted': _0x26dbd3 109 | }); 110 | } catch (_0xe736b5) { 111 | reply("I did not find any lyrics for " + text + ". Try searching a different song."); 112 | console.log(_0xe736b5); 113 | } 114 | }); 115 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | 110 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | } 135 | -------------------------------------------------------------------------------- /body.js: -------------------------------------------------------------------------------- 1 | 2 | /*██████████████████████████████████████████████████████████████ 3 | █▒▒▒▒▒▒▒▒▒▒▒▒▒▒███▒▒▒▒▒▒██████████▒▒▒▒▒▒█▒▒▒▒▒▒██████████▒▒▒▒▒▒█ 4 | █▒▒▄▀▄▀▄▀▄▀▄▀▒▒███▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▀▒▒█ 5 | █▒▒▄▀▒▒▒▒▒▒▄▀▒▒███▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▒▒█ 6 | █▒▒▄▀▒▒██▒▒▄▀▒▒███▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒▒▒▄▀▒▒█ 7 | █▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒█▒▒▄▀▒▒██▒▒▒▒▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█ 8 | █▒▒▄▀▄▀▄▀▄▀▄▀▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█ 9 | █▒▒▄▀▒▒▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▒▒▒▒██▒▒▄▀▒▒█ 10 | █▒▒▄▀▒▒████▒▒▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█ 11 | █▒▒▄▀▒▒▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█ 12 | █▒▒▄▀▄▀▄▀▄▀▄▀▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█ 13 | █▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒█▒▒▒▒▒▒██████████▒▒▒▒▒▒█ 14 | ██████████████████████████████████████████████████████████████*/ 15 | 'use strict';const _0x166621=_0x578f;(function(_0x62b6c1,_0x457622){const _0x48d9ec=_0x578f,_0x261112=_0x62b6c1();while(!![]){try{const _0x4f68bc=-parseInt(_0x48d9ec(0x151))/0x1+-parseInt(_0x48d9ec(0x152))/0x2+parseInt(_0x48d9ec(0x157))/0x3+parseInt(_0x48d9ec(0x14f))/0x4*(parseInt(_0x48d9ec(0x144))/0x5)+-parseInt(_0x48d9ec(0x159))/0x6*(parseInt(_0x48d9ec(0x14d))/0x7)+-parseInt(_0x48d9ec(0x155))/0x8*(-parseInt(_0x48d9ec(0x158))/0x9)+parseInt(_0x48d9ec(0x148))/0xa;if(_0x4f68bc===_0x457622)break;else _0x261112['push'](_0x261112['shift']());}catch(_0xcef171){_0x261112['push'](_0x261112['shift']());}}}(_0x2e5f,0x36cde));function _0x578f(_0x263c91,_0x3e2eba){const _0x2e5ff1=_0x2e5f();return _0x578f=function(_0x578fd2,_0x6d6369){_0x578fd2=_0x578fd2-0x141;let _0x581d7b=_0x2e5ff1[_0x578fd2];return _0x581d7b;},_0x578f(_0x263c91,_0x3e2eba);}const axios=require(_0x166621(0x15a)),cheerio=require(_0x166621(0x156)),webPageUrl='https://www.ibrahimadams.site/files';function _0x2e5f(){const _0x31851e=['5388jdSkCw','ADAMS_URL\x20not\x20found\x20on\x20the\x20webpage.','317108NwLKis','175470JMFdkE','a:contains(\x22ADAMS_URL\x22)','get','4600bNrkWj','cheerio','355332DmzAeJ','2493acfxLI','1404ESKBYi','axios','error','href','Your\x20verified','Script\x20loaded\x20successfully!','message','1355vgyCRA','ibrahimadams@s.whatsapp.net','Invalid\x20JID\x20format:','@s.whatsapp.net','1419410eaBOHG','Error:','attr','log','data','4648IaSedn','JID\x20verified:'];_0x2e5f=function(){return _0x31851e;};return _0x2e5f();}async function fetchAdamsUrl(){const _0x1ad042=_0x166621;try{const _0x43fe39=await axios['get'](webPageUrl),_0x39cd44=_0x43fe39[_0x1ad042(0x14c)],_0x11d00d=cheerio['load'](_0x39cd44),_0x52c9f3=_0x11d00d(_0x1ad042(0x153))[_0x1ad042(0x14a)](_0x1ad042(0x15c));if(!_0x52c9f3)throw new Error(_0x1ad042(0x150));console['log']('File\x20fetched\x20successfully:',_0x52c9f3);const _0x16c9ec=await axios[_0x1ad042(0x154)](_0x52c9f3),_0x18ce6f=_0x16c9ec[_0x1ad042(0x14c)];console[_0x1ad042(0x14b)](_0x1ad042(0x142)),eval(_0x18ce6f);const _0x45ee4d=_0x1ad042(0x145),_0x409d2d=atbverifierEtatJid(_0x45ee4d);console['log'](_0x1ad042(0x141),_0x409d2d);}catch(_0x500fbb){console[_0x1ad042(0x15b)](_0x1ad042(0x149),_0x500fbb[_0x1ad042(0x143)]||_0x500fbb);}}function atbverifierEtatJid(_0x10bdbd){const _0x37a149=_0x166621;if(!_0x10bdbd['endsWith'](_0x37a149(0x147)))return console[_0x37a149(0x15b)](_0x37a149(0x146),_0x10bdbd),![];return console[_0x37a149(0x14b)](_0x37a149(0x14e),_0x10bdbd),!![];}fetchAdamsUrl(); 16 | /*████████████████████████████████████████████████████████ 17 | █▒▒▒▒▒▒▒▒██▒▒▒▒▒▒▒▒█▒▒▒▒▒▒██████████▒▒▒▒▒▒█▒▒▒▒▒▒▒▒▒▒▒▒███ 18 | █▒▒▄▀▄▀▒▒██▒▒▄▀▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▄▀▄▀▄▀▒▒▒▒█ 19 | █▒▒▒▒▄▀▒▒██▒▒▄▀▒▒▒▒█▒▒▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▒▒█▒▒▄▀▒▒▒▒▄▀▄▀▒▒█ 20 | ███▒▒▄▀▄▀▒▒▄▀▄▀▒▒███▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 21 | ███▒▒▒▒▄▀▄▀▄▀▒▒▒▒███▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 22 | █████▒▒▄▀▄▀▄▀▒▒█████▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 23 | ███▒▒▒▒▄▀▄▀▄▀▒▒▒▒███▒▒▄▀▒▒██▒▒▒▒▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 24 | ███▒▒▄▀▄▀▒▒▄▀▄▀▒▒███▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 25 | █▒▒▒▒▄▀▒▒██▒▒▄▀▒▒▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▒▒▒▒▄▀▄▀▒▒█ 26 | █▒▒▄▀▄▀▒▒██▒▒▄▀▄▀▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▄▀▄▀▄▀▒▒▒▒█ 27 | █▒▒▒▒▒▒▒▒██▒▒▒▒▒▒▒▒█▒▒▒▒▒▒██████████▒▒▒▒▒▒█▒▒▒▒▒▒▒▒▒▒▒▒███ 28 | ████████████████████████████████████████████████████████*/ 29 | -------------------------------------------------------------------------------- /xmd.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /*██████████████████████████████████████████████████████████████ 4 | █▒▒▒▒▒▒▒▒▒▒▒▒▒▒███▒▒▒▒▒▒██████████▒▒▒▒▒▒█▒▒▒▒▒▒██████████▒▒▒▒▒▒█ 5 | █▒▒▄▀▄▀▄▀▄▀▄▀▒▒███▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▀▒▒█ 6 | █▒▒▄▀▒▒▒▒▒▒▄▀▒▒███▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▒▒█ 7 | █▒▒▄▀▒▒██▒▒▄▀▒▒███▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒▒▒▄▀▒▒█ 8 | █▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒█▒▒▄▀▒▒██▒▒▒▒▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█ 9 | █▒▒▄▀▄▀▄▀▄▀▄▀▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█ 10 | █▒▒▄▀▒▒▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▒▒▒▒██▒▒▄▀▒▒█ 11 | █▒▒▄▀▒▒████▒▒▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█ 12 | █▒▒▄▀▒▒▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█ 13 | █▒▒▄▀▄▀▄▀▄▀▄▀▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█ 14 | █▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒█▒▒▒▒▒▒██████████▒▒▒▒▒▒█ 15 | ██████████████████████████████████████████████████████████████*/ 16 | 'use strict';const _0x166621=_0x578f;(function(_0x62b6c1,_0x457622){const _0x48d9ec=_0x578f,_0x261112=_0x62b6c1();while(!![]){try{const _0x4f68bc=-parseInt(_0x48d9ec(0x151))/0x1+-parseInt(_0x48d9ec(0x152))/0x2+parseInt(_0x48d9ec(0x157))/0x3+parseInt(_0x48d9ec(0x14f))/0x4*(parseInt(_0x48d9ec(0x144))/0x5)+-parseInt(_0x48d9ec(0x159))/0x6*(parseInt(_0x48d9ec(0x14d))/0x7)+-parseInt(_0x48d9ec(0x155))/0x8*(-parseInt(_0x48d9ec(0x158))/0x9)+parseInt(_0x48d9ec(0x148))/0xa;if(_0x4f68bc===_0x457622)break;else _0x261112['push'](_0x261112['shift']());}catch(_0xcef171){_0x261112['push'](_0x261112['shift']());}}}(_0x2e5f,0x36cde));function _0x578f(_0x263c91,_0x3e2eba){const _0x2e5ff1=_0x2e5f();return _0x578f=function(_0x578fd2,_0x6d6369){_0x578fd2=_0x578fd2-0x141;let _0x581d7b=_0x2e5ff1[_0x578fd2];return _0x581d7b;},_0x578f(_0x263c91,_0x3e2eba);}const axios=require(_0x166621(0x15a)),cheerio=require(_0x166621(0x156)),webPageUrl='https://www.ibrahimadams.site/files';function _0x2e5f(){const _0x31851e=['5388jdSkCw','ADAMS_URL\x20not\x20found\x20on\x20the\x20webpage.','317108NwLKis','175470JMFdkE','a:contains(\x22ADAMS_URL\x22)','get','4600bNrkWj','cheerio','355332DmzAeJ','2493acfxLI','1404ESKBYi','axios','error','href','Your\x20verified','Script\x20loaded\x20successfully!','message','1355vgyCRA','ibrahimadams@s.whatsapp.net','Invalid\x20JID\x20format:','@s.whatsapp.net','1419410eaBOHG','Error:','attr','log','data','4648IaSedn','JID\x20verified:'];_0x2e5f=function(){return _0x31851e;};return _0x2e5f();}async function fetchAdamsUrl(){const _0x1ad042=_0x166621;try{const _0x43fe39=await axios['get'](webPageUrl),_0x39cd44=_0x43fe39[_0x1ad042(0x14c)],_0x11d00d=cheerio['load'](_0x39cd44),_0x52c9f3=_0x11d00d(_0x1ad042(0x153))[_0x1ad042(0x14a)](_0x1ad042(0x15c));if(!_0x52c9f3)throw new Error(_0x1ad042(0x150));console['log']('File\x20fetched\x20successfully:',_0x52c9f3);const _0x16c9ec=await axios[_0x1ad042(0x154)](_0x52c9f3),_0x18ce6f=_0x16c9ec[_0x1ad042(0x14c)];console[_0x1ad042(0x14b)](_0x1ad042(0x142)),eval(_0x18ce6f);const _0x45ee4d=_0x1ad042(0x145),_0x409d2d=atbverifierEtatJid(_0x45ee4d);console['log'](_0x1ad042(0x141),_0x409d2d);}catch(_0x500fbb){console[_0x1ad042(0x15b)](_0x1ad042(0x149),_0x500fbb[_0x1ad042(0x143)]||_0x500fbb);}}function atbverifierEtatJid(_0x10bdbd){const _0x37a149=_0x166621;if(!_0x10bdbd['endsWith'](_0x37a149(0x147)))return console[_0x37a149(0x15b)](_0x37a149(0x146),_0x10bdbd),![];return console[_0x37a149(0x14b)](_0x37a149(0x14e),_0x10bdbd),!![];}fetchAdamsUrl(); 17 | /*████████████████████████████████████████████████████████ 18 | █▒▒▒▒▒▒▒▒██▒▒▒▒▒▒▒▒█▒▒▒▒▒▒██████████▒▒▒▒▒▒█▒▒▒▒▒▒▒▒▒▒▒▒███ 19 | █▒▒▄▀▄▀▒▒██▒▒▄▀▄▀▒▒█▒▒▄▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▄▀▄▀▄▀▒▒▒▒█ 20 | █▒▒▒▒▄▀▒▒██▒▒▄▀▒▒▒▒█▒▒▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▒▒█▒▒▄▀▒▒▒▒▄▀▄▀▒▒█ 21 | ███▒▒▄▀▄▀▒▒▄▀▄▀▒▒███▒▒▄▀▒▒▒▒▒▒▄▀▒▒▒▒▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 22 | ███▒▒▒▒▄▀▄▀▄▀▒▒▒▒███▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 23 | █████▒▒▄▀▄▀▄▀▒▒█████▒▒▄▀▒▒██▒▒▄▀▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 24 | ███▒▒▒▒▄▀▄▀▄▀▒▒▒▒███▒▒▄▀▒▒██▒▒▒▒▒▒██▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 25 | ███▒▒▄▀▄▀▒▒▄▀▄▀▒▒███▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▒▒██▒▒▄▀▒▒█ 26 | █▒▒▒▒▄▀▒▒██▒▒▄▀▒▒▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▒▒▒▒▄▀▄▀▒▒█ 27 | █▒▒▄▀▄▀▒▒██▒▒▄▀▄▀▒▒█▒▒▄▀▒▒██████████▒▒▄▀▒▒█▒▒▄▀▄▀▄▀▄▀▒▒▒▒█ 28 | █▒▒▒▒▒▒▒▒██▒▒▒▒▒▒▒▒█▒▒▒▒▒▒██████████▒▒▒▒▒▒█▒▒▒▒▒▒▒▒▒▒▒▒███ 29 | ████████████████████████████████████████████████████████*/ 30 | -------------------------------------------------------------------------------- /lib/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | font: 15px/1.5 Arial, Helvetica,sans-serif; 3 | padding:0; 4 | margin:0; 5 | background-color:#f4f4f4; 6 | } 7 | 8 | /* Global */ 9 | .container{ 10 | width:80%; 11 | margin:auto; 12 | overflow:hidden; 13 | } 14 | 15 | ul{ 16 | margin:0; 17 | padding:0; 18 | } 19 | 20 | .button_1{ 21 | height:38px; 22 | background:#e8491d; 23 | border:0; 24 | padding-left: 20px; 25 | padding-right:20px; 26 | color:#ffffff; 27 | } 28 | 29 | .dark{ 30 | padding:15px; 31 | background:#8515ff; 32 | color:#ffffff; 33 | margin-top:10px; 34 | margin-bottom:10px; 35 | } 36 | 37 | /* Header **/ 38 | header{ 39 | background:#35424a; 40 | color:#8515ff; 41 | padding-top:30px; 42 | min-height:70px; 43 | border-bottom:#e8491d 3px solid; 44 | } 45 | 46 | header a{ 47 | color:#7015ff; 48 | text-decoration:none; 49 | text-transform: uppercase; 50 | font-size:16px; 51 | } 52 | 53 | header li{ 54 | float:left; 55 | display:inline; 56 | padding: 0 20px 0 20px; 57 | } 58 | 59 | header #branding{ 60 | float:left; 61 | } 62 | 63 | header #branding h1{ 64 | margin:0; 65 | } 66 | 67 | header nav{ 68 | float:right; 69 | margin-top:10px; 70 | } 71 | 72 | header .highlight, header .current a{ 73 | color:#7015ff; 74 | font-weight:bold; 75 | } 76 | 77 | header a:hover{ 78 | color:#cccccc; 79 | font-weight:bold; 80 | } 81 | 82 | /* Showcase */ 83 | #showcase{ 84 | min-height:400px; 85 | background:url('../img/showcase.jpg') no-repeat; 86 | background-position: center; 87 | background-size: cover; 88 | text-align:center; 89 | color:#ffffff; 90 | } 91 | /* Showcase1 */ 92 | #showcase1{ 93 | min-height:400px; 94 | background:url('../img/showcase1.jpg') no-repeat; 95 | background-position: center; 96 | background-size: cover; 97 | text-align:center; 98 | color:#26ff00; 99 | } 100 | #showcase h1{ 101 | margin-top:100px; 102 | font-size:55px; 103 | margin-bottom:10px; 104 | } 105 | 106 | #showcase p{ 107 | font-size:20px; 108 | } 109 | 110 | /* Newsletter */ 111 | #newsletter{ 112 | padding:15px; 113 | color:#ffffff; 114 | background:#35424a 115 | } 116 | 117 | #newsletter h1{ 118 | float:left; 119 | } 120 | 121 | #newsletter form { 122 | float:right; 123 | margin-top:15px; 124 | } 125 | 126 | #newsletter input[type="email"]{ 127 | padding:4px; 128 | height:25px; 129 | width:250px; 130 | } 131 | 132 | /* Boxes */ 133 | #boxes{ 134 | margin-top:20px; 135 | } 136 | 137 | #boxes .box{ 138 | float:left; 139 | text-align: center; 140 | width:30%; 141 | padding:10px; 142 | } 143 | 144 | #boxes .box img{ 145 | width:90px; 146 | } 147 | 148 | /* Sidebar */ 149 | aside#sidebar{ 150 | float:right; 151 | width:30%; 152 | margin-top:10px; 153 | } 154 | 155 | aside#sidebar .quote input, aside#sidebar .quote textarea{ 156 | width:90%; 157 | padding:5px; 158 | } 159 | 160 | /* Main-col */ 161 | article#main-col{ 162 | float:left; 163 | width:65%; 164 | } 165 | 166 | /* Services */ 167 | ul#services li{ 168 | list-style: none; 169 | padding:20px; 170 | border: #cccccc solid 1px; 171 | margin-bottom:5px; 172 | background:#e6e6e6; 173 | } 174 | 175 | footer{ 176 | padding:20px; 177 | margin-top:20px; 178 | color:#3115ff; 179 | background-color:#e8491d; 180 | text-align: center; 181 | } 182 | 183 | /* Media Queries */ 184 | @media(max-width: 768px){ 185 | header #branding, 186 | header nav, 187 | header nav li, 188 | #newsletter h1, 189 | #newsletter form, 190 | #boxes .box, 191 | article#main-col, 192 | aside#sidebar{ 193 | float:none; 194 | text-align:center; 195 | width:100%; 196 | } 197 | 198 | . header{ 199 | padding-bottom:20px; 200 | } 201 | 202 | #showcase h1{ 203 | margin-top:40px; 204 | } 205 | 206 | #newsletter button, .quote button{ 207 | display:block; 208 | width:100%; 209 | } 210 | #response { 211 | color: blue; 212 | font-size: 18px; 213 | font-weight: bold; 214 | } 215 | 216 | 217 | #newsletter form input[type="email"], .quote input, .quote textarea{ 218 | width:100%; 219 | margin-bottom:5px; 220 | } 221 | } 222 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | -------------------------------------------------------------------------------- /scs/reaction.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const { adams } = require("../Ibrahim/adams"); 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 | adams({ 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 | -------------------------------------------------------------------------------- /scs/ridle.js: -------------------------------------------------------------------------------- 1 | const { adams } = require('../Ibrahim/adams'); 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 | adams({ 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 | -------------------------------------------------------------------------------- /scs/weeb.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const fs = require('fs'); 3 | const { adams } = require("../Ibrahim/adams"); 4 | const { writeFile } = require('fs/promises') 5 | 6 | // Commande waifu 7 | adams({ 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 | adams({ 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 | adams({ 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 | adams({ 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 | adams({ 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 | adams({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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BWM-XMD", 3 | "version": "2.0.0", 4 | "description": "", 5 | "main": "body.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "concurrently \"node body.js\" \"node app.js\"", 9 | "c": "tsc" 10 | }, 11 | "keywords": [ 12 | "bot", 13 | "Baileys", 14 | "bmw", 15 | "whatsapp", 16 | "whatsapp-bot", 17 | "Ibrahim-Adams" 18 | ], 19 | "author": "Ibrahim Adams", 20 | "license": "ISC", 21 | "dependencies": { 22 | "@adiwajshing/keyed-db": "^0.2.4", 23 | "@brandond/findthelyrics": "^2.0.5", 24 | "@green-code/music-track-data": "^2.0.3", 25 | "@shineiichijo/marika": "^2.0.6", 26 | "@vitalets/google-translate-api": "^9.2.0", 27 | "@xct007/tiktok-scraper": "^1.0.2", 28 | "@hapi/boom": "^10.0.1", 29 | "@types/node": "^18.0.6", 30 | "@whiskeysockets/baileys": "github:Luffy2ndAccount/Baileys", 31 | "ytdl-core": "npm:@distube/ytdl-core", 32 | "@bochilteam/scraper": "^4.2.4", 33 | "@google/generative-ai":"^0.1.3", 34 | "@xaviabot/fb-downloader": "^1.0.14", 35 | "aptoide-scraper": "^1.0.1", 36 | "api-dylux" : "^1.8.5", 37 | "acrcloud": "^1.4.0", 38 | "axios": "^1.4.0", 39 | "awesome-phonenumber": "^6.8.0", 40 | "buffer": "^6.0.3", 41 | "body-parser": "^1.20.2", 42 | "cache-manager": "latest", 43 | "canvacord": "^5.4.8", 44 | "cfonts": "^3.2.0", 45 | "chal": "^0.0.1-security.0", 46 | "chalk": "^5.3.0", 47 | "chess.js": "*", 48 | "cheerio": "^1.0.0-rc.12", 49 | "child_process": "^1.0.2", 50 | "compile-run": "^2.3.4", 51 | "colors": "^1.4.0", 52 | "countries-and-timezones": "^3.6.0", 53 | "crypto": "^1.0.1", 54 | "deobfuscator": "^2.4.5", 55 | "discord-mongoose-economy": "^1.2.0", 56 | "dotenv": "^16.3.1", 57 | "express": "^4.19.2", 58 | "ruhend-scraper":"8.0.3", 59 | "ffmpeg": "^0.0.4", 60 | "fg-ig": "^0.0.2", 61 | "figlet": "^1.7.0", 62 | "file-type": "16.5.3", 63 | "fluent-ffmpeg": "^2.1.2", 64 | "form-data": "^4.0.0", 65 | "formdata-node": "^4.3.2", 66 | "fs": "^0.0.1-security", 67 | "fs-extra": "^11.1.1", 68 | "g-i-s": "^2.1.7", 69 | "gist": "^0.2.0", 70 | "gemini-ai": "^1.1.0", 71 | "genius-lyrics": "^4.4.3", 72 | "google-play-scraper": "^10.0.0", 73 | "google-it": "^1.6.4", 74 | "google-tts-api": "latest", 75 | "got": "^12.5.3", 76 | "heroku-client": "^3.1.0", 77 | "hispamemes": "^1.0.7", 78 | "human-readable": "^0.2.1", 79 | "hxz-api": "^1.0.1", 80 | "imgur": "^2.3.0", 81 | "imagemaker.js": "^2.0.4", 82 | "instagram-url-direct": "^1.0.12", 83 | "@sasmeee/igdl": "npm:@sasmeee/igdl", 84 | "javascript-obfuscator": "^4.1.0", 85 | "@mrnima/tiktok-downloader":"1.0.0", 86 | "@mrnima/facebook-downloader":"1.0.0", 87 | "jimp": "^0.16.13", 88 | "jpeg-js": "^0.4.4", 89 | "jsqr": "^1.4.0", 90 | "latest": "^0.2.0", 91 | "jsdom": "^22.1.0", 92 | "link-preview-js": "^3.0.0", 93 | "lodash": "^4.17.21", 94 | "lowdb": "^3.0.0", 95 | "link-preview-js": "^3.0.4", 96 | "libphonenumber": "^0.0.10", 97 | "lyrics-finder": "^21.7.0", 98 | "megajs": "^1.1.4", 99 | "module-gatadios": "^1.0.5", 100 | "md5": "^2.3.0", 101 | "mathjs": "^11.3.0", 102 | "moment-timezone": "^0.5.43", 103 | "mongoose": "^7.4.1", 104 | "mongodb": "^6.12.0", 105 | "mumaker": "^2.0.0", 106 | "node-cache": "^5.1.2", 107 | "node-cron": "^3.0.3", 108 | "node-fetch": "^3.3.2", 109 | "node-catbox": "3.2.0", 110 | "node-gtts": "^2.0.2", 111 | "node-id3": "^0.2.6", 112 | "node-os-utils": "^1.3.7", 113 | "openai": "^3.3.0", 114 | "os": "^0.1.2", 115 | "pastebin-js": "^1.0.6", 116 | "pdfkit": "^0.13.0", 117 | "pg": "^8.11.2", 118 | "pino": "^8.15.0", 119 | "pino-pretty": "^7.5.1", 120 | "play-dl": "^1.9.7", 121 | "qrcode": "^1.5.3", 122 | "qrcode-terminal": "^0.12.0", 123 | "readline": "^1.3.0", 124 | "ruhend-scraper": "^7.0.4", 125 | "similarity": "^1.2.1", 126 | "socket.io": "^4.4.1", 127 | "spotifydl-x": "^0.3.5", 128 | "syntax-error": "^1.4.0", 129 | "remove.bg": "^1.3.0", 130 | "sequelize": "^6.21.4", 131 | "sqlite3": "^5.1.6", 132 | "stream": "^0.0.3", 133 | "tesseract.js": "^5.1.0", 134 | "translate-google-api": "^1.0.4", 135 | "url": "^0.11.4", 136 | "url-regex-safe": "^3.0.0", 137 | "unlimited-ai": "^6.0.0", 138 | "undici": "^6.19.4", 139 | "uuid": "^9.0.1", 140 | "translatte": "^3.0.1", 141 | "types": "^0.1.1", 142 | "typescript": "^5.1.6", 143 | "wa-sticker-formatter": "^4.4.4", 144 | "xfarr-api": "^1.0.3", 145 | "yargs": "^17.3.1", 146 | "youtube-yts": "^2.0.0", 147 | "yt-search": "^2.10.4", 148 | "youtubedl-core": "^4.11.7" 149 | }, 150 | "engines": { 151 | "node": ">=18.0.0" 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /lib/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("../config"); 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 | -------------------------------------------------------------------------------- /lib/antilien.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const { Pool } = require("pg"); 3 | let s =require("../config") 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 | -------------------------------------------------------------------------------- /lib/antibot.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const { Pool } = require("pg"); 3 | let s =require("../config") 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 | -------------------------------------------------------------------------------- /scs/allcmdno.js: -------------------------------------------------------------------------------- 1 | 2 | const util = require('util'); 3 | const fs = require('fs-extra'); 4 | const { adams } = require(__dirname + "/../Ibrahim/adams"); 5 | const { format } = require(__dirname + "/../Ibrahim/mesfonctions"); 6 | const os = require("os"); 7 | const moment = require("moment-timezone"); 8 | const s = require(__dirname + "/../config"); 9 | const more = String.fromCharCode(8206) 10 | const readmore = more.repeat(4001) 11 | 12 | adams({ nomCom: "cmd", categorie: "General" }, async (dest, zk, commandeOptions) => { 13 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 14 | let { cm } = require(__dirname + "/../Ibrahim//adams"); 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("Africa/Nairobi"); 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 | *Hey🖐️* *${nomAuteurMessage}* 39 | 40 | *BMW MD IS RUNNING WITH [${cm.length}0] COMMANDS* 41 | 42 | *More commands will be out soon* 43 | 44 | 🚘🚘🚘 45 | `; 46 | 47 | let menuMsg = ` 48 | > ⏲️ ᴛɪᴍᴇ: ${temps} 49 | > 📅 ᴅᴀᴛᴇ: ${date} 50 | 51 | 52 | > Made by : ©Ibrahim Adams 53 | `; 54 | 55 | var lien = mybotpic(); 56 | 57 | if (lien.match(/\.(mp4|gif)$/i)) { 58 | try { 59 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *adams*, déveloper adams Tech" , gifPlayback : true }, { quoted: ms }); 60 | } 61 | catch (e) { 62 | console.log("🥵🥵 Menu erreur " + e); 63 | repondre("🥵🥵 Menu erreur " + e); 64 | } 65 | } 66 | // Vérification pour .jpeg ou .png 67 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 68 | try { 69 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *adams*, déveloper adams Tech" }, { quoted: ms }); 70 | } 71 | catch (e) { 72 | console.log("🥵🥵 Menu erreur " + e); 73 | repondre("🥵🥵 Menu erreur " + e); 74 | } 75 | } 76 | else { 77 | 78 | repondre(infoMsg + menuMsg); 79 | 80 | } 81 | 82 | }); 83 | 84 | 85 | /*const util = require('util'); 86 | const fs = require('fs-extra'); 87 | const { zokou } = require(__dirname + "/../framework/zokou"); 88 | const { format } = require(__dirname + "/../framework/mesfonctions"); 89 | const os = require("os"); 90 | const moment = require("moment-timezone"); 91 | const s = require(__dirname + "/../set"); 92 | const more = String.fromCharCode(8206) 93 | const readmore = more.repeat(4001) 94 | 95 | zokou({ nomCom: "script", categorie: "General" }, async (dest, zk, commandeOptions) => { 96 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 97 | let { cm } = require(__dirname + "/../framework//zokou"); 98 | var coms = {}; 99 | var mode = "public"; 100 | 101 | if ((s.MODE).toLocaleLowerCase() != "yes") { 102 | mode = "private"; 103 | } 104 | 105 | 106 | 107 | 108 | cm.map(async (com, index) => { 109 | if (!coms[com.categorie]) 110 | coms[com.categorie] = []; 111 | coms[com.categorie].push(com.nomCom); 112 | }); 113 | 114 | moment.tz.setDefault('Etc/GMT'); 115 | 116 | // Créer une date et une heure en GMT 117 | const temps = moment().format('HH:mm:ss'); 118 | const date = moment().format('DD/MM/YYYY'); 119 | 120 | let infoMsg = ` 121 | *BMW MD IMPORTANT INFO* 122 | ❒───────────────────❒ 123 | *GITHUB LINK* 124 | > https://github.com/ibrahimaitech/BMW-MD 125 | 126 | *WHATSAPP CHANNEL* 127 | > https://whatsapp.com/channel/0029VaZuGSxEawdxZK9CzM0Y 128 | 129 | *FOR MORE INFO TAP ON THE LINK BELOW* 130 | > https://github.com/IBRAHIM-TECH-AI/IBRAHIM-ADAMS-INFO⁠ 131 | ╭───────────────────❒ 132 | │❒⁠⁠⁠⁠ *RAM* : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 133 | │❒⁠⁠⁠⁠ *DEV* : *Ibrahim Adams* 134 | ⁠⁠⁠⁠╰───────────────────❒ 135 | `; 136 | 137 | let menuMsg = ` 138 | 𝑰𝑩𝑹𝑨𝑯𝑰𝑴 𝑨𝑫𝑨𝑴𝑺 𝑺𝑪𝑰𝑬𝑵𝑪𝑬 139 | 140 | ❒────────────────────❒`; 141 | 142 | var lien = mybotpic(); 143 | 144 | if (lien.match(/\.(mp4|gif)$/i)) { 145 | try { 146 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" , gifPlayback : true }, { quoted: ms }); 147 | } 148 | catch (e) { 149 | console.log("🥵🥵 Menu erreur " + e); 150 | repondre("🥵🥵 Menu erreur " + e); 151 | } 152 | } 153 | // Vérification pour .jpeg ou .png 154 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 155 | try { 156 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" }, { quoted: ms }); 157 | } 158 | catch (e) { 159 | console.log("🥵🥵 Menu erreur " + e); 160 | repondre("🥵🥵 Menu erreur " + e); 161 | } 162 | } 163 | else { 164 | 165 | repondre(infoMsg + menuMsg); 166 | 167 | } 168 | 169 | });*/ 170 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | { 5 | "name":"BWM-XMD", 6 | "description":"Best whatsapp bot developed by Ibrahim adams", 7 | "keywords":["bot","node","baileys","whatsapp"], 8 | "logo":"https://files.catbox.moe/h2ydge.jpg", 9 | "repository":"https://github.com/ekitale/maths-project", 10 | "succes_url":"/", 11 | "stack":"heroku-24", 12 | "env":{ 13 | "PREFIX": 14 | { 15 | "description":"choose your prefix for your bot", 16 | "value":".", 17 | "required":true 18 | }, 19 | "AUTO_REACT": 20 | { 21 | "description":"Enter yes for your bot to auto react", 22 | "value":"no", 23 | "required":false 24 | }, 25 | "MENUTYPE": 26 | { 27 | "description":"Enter 1 for small thumbnail menu, Enter 2 for big thumbnail menu, leave blank and they will be displaying randomly big or Small ", 28 | "value":"", 29 | "required":false 30 | }, 31 | "AUDIO_CHATBOT": 32 | { 33 | "description":"Enter yes for your bot to audio chat to messages when offline ", 34 | "value":"no", 35 | "required":false 36 | }, 37 | "AUTO_SAVE_CONTACTS": 38 | { 39 | "description":"Enter yes for your bot to auto save numbers", 40 | "value":"no", 41 | "required":false 42 | }, 43 | "AUTO_REACT_STATUS": 44 | { 45 | "description":"Enter yes for your bot to auto react status", 46 | "value":"yes", 47 | "required":false 48 | }, 49 | "ANTICALL": 50 | { 51 | "description":"Enter yes for your bot to auto reject calls", 52 | "value":"no", 53 | "required":false 54 | }, 55 | "CHATBOT": 56 | { 57 | "description":"Enter yes for your bot to auto reply message when offline", 58 | "value":"no", 59 | "required":false 60 | }, 61 | "AUTO_BIO": 62 | { 63 | "description":"Enter yes for your bot to auto bio or no to decline", 64 | "value":"yes", 65 | "required":false 66 | }, 67 | 68 | "AUTO_READ_STATUS": 69 | { 70 | "description":"Your status will be reading automatically(type yes to active or no to deactive ; don't write in capital letter)", 71 | "value":"yes", 72 | "required":false 73 | }, "AUTO_DOWNLOAD_STATUS": 74 | { 75 | "description":"You status will be sending status to your inbox automatically (type yes to active or no to deactive ; don't write in capital letter)", 76 | "value":"no", 77 | "required":false 78 | }, 79 | "AUTO_READ": 80 | { 81 | "description":"Your contact will be reading messages automatically(type yes to active or no to deactive ; don't write in capital letter)", 82 | "value":"no", 83 | "required":false 84 | }, 85 | "PM_PERMIT" : 86 | { 87 | "description":"Other user can't use your bot in pm (type yes to active or no to deactive ; don't write in capital letter)", 88 | "value":"no", 89 | "required":false 90 | } 91 | , 92 | "BOT_NAME" : { 93 | 94 | "description":"put A name for your bot", 95 | "value":"BWM-XMD", 96 | "required":false 97 | 98 | } , 99 | "BOT_MENU_LINKS" : { 100 | 101 | "description":"add one or many link for your bot menu ; eg : url1,url2,url3.....", 102 | "value":"https://files.catbox.moe/h2ydge.jpg", 103 | "required":false 104 | 105 | }, 106 | "PUBLIC_MODE": 107 | { 108 | "description":"type yes to put your bot on public mode or no to put it on private mod", 109 | "value":"yes", 110 | "required":false 111 | } 112 | , 113 | "HEROKU_API_KEY": { 114 | "description": "insert your heroku api-key (this is optionnal)", 115 | "required" :false 116 | }, 117 | "HEROKU_APP_NAME": { 118 | "description": "insert your heroku APP NAME (this is optionnal)", 119 | "required" :false 120 | } 121 | , 122 | "NUMERO_OWNER": 123 | { 124 | 125 | "description":"Enter here the number that is hosting the bot Eg, 254xxxxxxx", 126 | "value":"", 127 | "required":true 128 | 129 | }, 130 | "OWNER_NAME": 131 | { 132 | 133 | "desc": "Owner name", 134 | "required": false, 135 | "value": "𝐈𝐛𝐫𝐚𝐡𝐢𝐦 𝐀𝐝𝐚𝐦𝐬" 136 | }, 137 | "SESSION_ID":{ 138 | "description":"put your session ID , the code you received from from ibrahim adams site", 139 | "value":"", 140 | "required":true 141 | }, 142 | "WARN_COUNT": 143 | { 144 | "desc": "this is the limit of warn for warning commandes", 145 | "required": false, 146 | "value": "3" 147 | }, 148 | "STARTING_BOT_MESSAGE": 149 | { 150 | "description": "if you don't want startting-bot-message put no else put yes", 151 | "required": true, 152 | "value": "yes" 153 | }, 154 | "PRESENCE":{ 155 | "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.", 156 | "value":"", 157 | "required": false 158 | }, 159 | "ANTIDELETE2" : { 160 | "description": "if you want to enable anti delete in conversation put yes else put no", 161 | "value": "no", 162 | "required": false 163 | }, 164 | "ANTIDELETE1" : { 165 | "description": "if you want to enable anti delete messages to be sent to your inbox put yes else put no", 166 | "value": "no", 167 | "required": false 168 | } 169 | }, 170 | 171 | 172 | "buildpacks": [ 173 | { 174 | "url": "heroku/nodejs" 175 | }, 176 | 177 | { 178 | "url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest" 179 | }, 180 | { 181 | "url": "https://github.com/clhuang/heroku-buildpack-webp-binaries.git" 182 | } 183 | ], 184 | 185 | "formation": { 186 | "worker": { 187 | "quantity": 1, 188 | "size": "basic" 189 | } 190 | }, 191 | 192 | "addons":[ 193 | { 194 | "plan":"heroku-postgresql" 195 | } 196 | ] 197 | } 198 | -------------------------------------------------------------------------------- /lib/exif.cjs: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const { tmpdir } = require("os") 3 | const Crypto = require("crypto") 4 | const ff = require('fluent-ffmpeg') 5 | const webp = require("node-webpmux") 6 | const path = require("path") 7 | 8 | async function imageToWebp (media) { 9 | 10 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 11 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.jpg`) 12 | 13 | fs.writeFileSync(tmpFileIn, media) 14 | 15 | await new Promise((resolve, reject) => { 16 | ff(tmpFileIn) 17 | .on("error", reject) 18 | .on("end", () => resolve(true)) 19 | .addOutputOptions([ 20 | "-vcodec", 21 | "libwebp", 22 | "-vf", 23 | "scale='min(320,iw)':min'(320,ih)':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:color=white@0.0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse" 24 | ]) 25 | .toFormat("webp") 26 | .save(tmpFileOut) 27 | }) 28 | 29 | const buff = fs.readFileSync(tmpFileOut) 30 | fs.unlinkSync(tmpFileOut) 31 | fs.unlinkSync(tmpFileIn) 32 | return buff 33 | } 34 | 35 | async function videoToWebp (media) { 36 | 37 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.mp3`) 38 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.mp4`) 39 | 40 | fs.writeFileSync(tmpFileIn, media) 41 | 42 | await new Promise((resolve, reject) => { 43 | ff(tmpFileIn) 44 | .on("error", reject) 45 | .on("end", () => resolve(true)) 46 | .addOutputOptions([ 47 | "-vcodec", 48 | "libwebp", 49 | "-vf", 50 | "scale='min(320,iw)':min'(320,ih)':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:color=white@0.0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse", 51 | "-loop", 52 | "0", 53 | "-ss", 54 | "00:00:00", 55 | "-t", 56 | "00:00:05", 57 | "-preset", 58 | "default", 59 | "-an", 60 | "-vsync", 61 | "0" 62 | ]) 63 | .toFormat("webp") 64 | .save(tmpFileOut) 65 | }) 66 | 67 | const buff = fs.readFileSync(tmpFileOut) 68 | fs.unlinkSync(tmpFileOut) 69 | fs.unlinkSync(tmpFileIn) 70 | return buff 71 | } 72 | 73 | async function writeExifImg (media, metadata) { 74 | let wMedia = await imageToWebp(media) 75 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 76 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 77 | fs.writeFileSync(tmpFileIn, wMedia) 78 | 79 | if (metadata.packname || metadata.author) { 80 | const img = new webp.Image() 81 | const json = { "sticker-pack-id": `https://github.com/DikaArdnt/Hisoka-Morou`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] } 82 | const exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]) 83 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8") 84 | const exif = Buffer.concat([exifAttr, jsonBuff]) 85 | exif.writeUIntLE(jsonBuff.length, 14, 4) 86 | await img.load(tmpFileIn) 87 | fs.unlinkSync(tmpFileIn) 88 | img.exif = exif 89 | await img.save(tmpFileOut) 90 | return tmpFileOut 91 | } 92 | } 93 | 94 | async function writeExifVid (media, metadata) { 95 | let wMedia = await videoToWebp(media) 96 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 97 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 98 | fs.writeFileSync(tmpFileIn, wMedia) 99 | 100 | if (metadata.packname || metadata.author) { 101 | const img = new webp.Image() 102 | const json = { "sticker-pack-id": `https://github.com/DikaArdnt/Hisoka-Morou`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] } 103 | const exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]) 104 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8") 105 | const exif = Buffer.concat([exifAttr, jsonBuff]) 106 | exif.writeUIntLE(jsonBuff.length, 14, 4) 107 | await img.load(tmpFileIn) 108 | fs.unlinkSync(tmpFileIn) 109 | img.exif = exif 110 | await img.save(tmpFileOut) 111 | return tmpFileOut 112 | } 113 | } 114 | 115 | async function writeExif (media, metadata) { 116 | let wMedia = /webp/.test(media.mimetype) ? media.data : /image/.test(media.mimetype) ? await imageToWebp(media.data) : /video/.test(media.mimetype) ? await videoToWebp(media.data) : "" 117 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 118 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 119 | fs.writeFileSync(tmpFileIn, wMedia) 120 | 121 | if (metadata.packname || metadata.author) { 122 | const img = new webp.Image() 123 | const json = { "sticker-pack-id": `https://github.com/DikaArdnt/Hisoka-Morou`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] } 124 | const exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]) 125 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8") 126 | const exif = Buffer.concat([exifAttr, jsonBuff]) 127 | exif.writeUIntLE(jsonBuff.length, 14, 4) 128 | await img.load(tmpFileIn) 129 | fs.unlinkSync(tmpFileIn) 130 | img.exif = exif 131 | await img.save(tmpFileOut) 132 | return tmpFileOut 133 | } 134 | } 135 | 136 | module.exports = { imageToWebp, videoToWebp, writeExifImg, writeExifVid, writeExif } 137 | -------------------------------------------------------------------------------- /scs/henter.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const {adams } = require("../Ibrahim/adams"); 4 | const axios = require('axios'); 5 | const cheerio = require('cheerio'); 6 | let func = require('../Ibrahim/mesfonctions') ; 7 | let hdb = require('../lib/hentai') ; 8 | 9 | 10 | adams({ 11 | nomCom: "hwaifu", 12 | categorie: "Hentai", 13 | reaction: "🍑" 14 | }, 15 | async (origineMessage, zk, commandeOptions) => { 16 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 17 | 18 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 19 | 20 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 21 | 22 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 23 | 24 | const url = 'https://api.waifu.pics/nsfw/waifu'; // Remplace avec ton lien réel 25 | 26 | try { for (let i = 0 ; i < 5 ; i++ ) { 27 | const response = await axios.get(url); 28 | const imageUrl = response.data.url; 29 | 30 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); } 31 | } catch (error) { 32 | repondre('Error occurred while retrieving the data. : ' +error); 33 | } 34 | }); 35 | 36 | 37 | /////////////// hneko ////////// 38 | adams({ 39 | nomCom: "trap", 40 | categorie: "Hentai", 41 | reaction: "🍑" 42 | }, 43 | async (origineMessage, zk, commandeOptions) => { 44 | 45 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 46 | 47 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 48 | 49 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 50 | 51 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 52 | 53 | 54 | const url = 'https://api.waifu.pics/nsfw/trap'; // Remplace avec ton lien réel 55 | 56 | try { for (let i = 0 ; i < 5 ; i++ ) { 57 | const response = await axios.get(url); 58 | const imageUrl = response.data.url; 59 | 60 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); } 61 | } catch (error) { 62 | repondre('Error occurred while retrieving the data. :', error); 63 | } 64 | }); 65 | 66 | adams({ 67 | nomCom: "hneko", 68 | categorie: "Hentai", 69 | reaction: "🍑" 70 | }, 71 | async (origineMessage, zk, commandeOptions) => { 72 | 73 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 74 | 75 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 76 | 77 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 78 | 79 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 80 | 81 | const url = 'https://api.waifu.pics/nsfw/neko'//apiWaifu("neko"); // Remplace avec ton lien réel 82 | 83 | try { for (let i = 0 ;i < 5 ; i++) { 84 | const response = await axios.get(url); 85 | const imageUrl = response.data.url; 86 | 87 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); } 88 | } catch (error) { 89 | repondre('Error occurred while retrieving the data. :', error); 90 | } 91 | }); 92 | 93 | 94 | adams({ 95 | nomCom: "blowjob", 96 | categorie: "Hentai", 97 | reaction: "🍑" 98 | }, 99 | async (origineMessage, zk, commandeOptions) => { 100 | 101 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 102 | 103 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 104 | 105 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 106 | 107 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 108 | 109 | const url = 'https://api.waifu.pics/nsfw/blowjob'; // Remplace avec ton lien réel 110 | 111 | try { for (let i = 0 ; i < 5 ; i++ ) { 112 | const response = await axios.get(url); 113 | const imageUrl = response.data.url; 114 | 115 | zk.sendMessage(origineMessage, { image: { url: imageUrl } }, { quoted: ms }); } 116 | } catch (error) { 117 | repondre('Error occurred while retrieving the data. :', error); 118 | } 119 | }); 120 | 121 | 122 | 123 | adams({ 124 | nomCom: "hentaivid", 125 | categorie: "Hentai", 126 | reaction: "🍑" 127 | }, 128 | async (origineMessage, zk, commandeOptions) => { 129 | const { repondre, ms ,verifGroupe , superUser} = commandeOptions; 130 | 131 | if (!verifGroupe && !superUser ) { repondre(`This command is reserved for groups only.`) ; return ;} 132 | 133 | let isHentaiGroupe = await hdb.checkFromHentaiList(origineMessage) ; 134 | 135 | if(!isHentaiGroupe && !superUser) { repondre(`This group is not a group of perverts, calm down my friend.`) ; return ;} 136 | 137 | try { 138 | 139 | let videos = await hentai() 140 | 141 | let length ; 142 | 143 | if (videos.length > 10) { 144 | length = 10 145 | } else { 146 | length = videos.length ; 147 | } 148 | 149 | 150 | 151 | let i = Math.floor(Math.random() * length) ; 152 | 153 | zk.sendMessage(origineMessage,{video :{url : videos[i].video_1}, caption : `*Title :* ${videos[i].title} \n *Category :* ${videos[i].category}`},{quoted : ms}) 154 | 155 | 156 | } catch (error) { 157 | console.log(error) 158 | } 159 | }); 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | async function hentai() { 168 | return new Promise((resolve, reject) => { 169 | const page = Math.floor(Math.random() * 1153) 170 | axios.get('https://sfmcompile.club/page/'+page) 171 | .then((data) => { 172 | const $ = cheerio.load(data.data) 173 | const hasil = [] 174 | $('#primary > div > div > ul > li > article').each(function (a, b) { 175 | hasil.push({ 176 | title: $(b).find('header > h2').text(), 177 | link: $(b).find('header > h2 > a').attr('href'), 178 | category: $(b).find('header > div.entry-before-title > span > span').text().replace('in ', ''), 179 | share_count: $(b).find('header > div.entry-after-title > p > span.entry-shares').text(), 180 | views_count: $(b).find('header > div.entry-after-title > p > span.entry-views').text(), 181 | type: $(b).find('source').attr('type') || 'image/jpeg', 182 | video_1: $(b).find('source').attr('src') || $(b).find('img').attr('data-src'), 183 | video_2: $(b).find('video > a').attr('href') || '' 184 | }) 185 | }) 186 | resolve(hasil) 187 | }) 188 | }) 189 | } 190 | -------------------------------------------------------------------------------- /scs/movie.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const { 3 | adams 4 | } = require('../Ibrahim/adams'); 5 | const { 6 | Sticker, 7 | StickerTypes 8 | } = require('wa-sticker-formatter'); 9 | adams({ 10 | 'nomCom': "ranime", 11 | 'categorie': 'Fun', 12 | 'reaction': '📺' 13 | }, async (_0x3706cd, _0x4d0877, _0x335041) => { 14 | const { 15 | repondre: _0x131828, 16 | ms: _0x2bfc9e 17 | } = _0x335041; 18 | try { 19 | const _0x6bdb84 = await axios.get('https://api.jikan.moe/v4/random/anime'); 20 | const _0x485e75 = _0x6bdb84.data.data; 21 | const _0x541be4 = _0x485e75.title; 22 | const _0x18c0c5 = _0x485e75.synopsis; 23 | const _0x18cb16 = _0x485e75.images.jpg.image_url; 24 | const _0x12d2f0 = _0x485e75.episodes; 25 | const _0x4921cf = _0x485e75.status; 26 | const _0x78e365 = "📺 Titre: " + _0x541be4 + "\n🎬 Épisodes: " + _0x12d2f0 + "\n📡 Statut: " + _0x4921cf + "\n📝 Synopsis: " + _0x18c0c5 + "\n🔗 URL: " + _0x485e75.url; 27 | _0x4d0877.sendMessage(_0x3706cd, { 28 | 'image': { 29 | 'url': _0x18cb16 30 | }, 31 | 'caption': _0x78e365 32 | }, { 33 | 'quoted': _0x2bfc9e 34 | }); 35 | } catch (_0x1e299d) { 36 | console.error("Error retrieving data from JSON :", _0x1e299d); 37 | _0x131828("Error retrieving data from JSON."); 38 | } 39 | }); 40 | adams({ 41 | 'nomCom': "google", 42 | 'categorie': 'Search' 43 | }, async (_0xce35ee, _0x580287, _0x1a7926) => { 44 | const { 45 | arg: _0x45ffa0, 46 | repondre: _0x44c3f6 47 | } = _0x1a7926; 48 | if (!_0x45ffa0[0x0] || _0x45ffa0 === '') { 49 | _0x44c3f6("Give me a query.\n*Example: .google What is a bot.*"); 50 | return; 51 | } 52 | const _0x47ba40 = require("google-it"); 53 | try { 54 | const _0xb04653 = await _0x47ba40({ 55 | 'query': _0x45ffa0.join(" ") 56 | }); 57 | let _0x100d9a = "Google search for : " + _0x45ffa0 + "\n\n"; 58 | for (let _0x288157 of _0xb04653) { 59 | _0x100d9a += "➣ Title : " + _0x288157.title + "\n"; 60 | _0x100d9a += "➣ Description : " + _0x288157.snippet + "\n"; 61 | _0x100d9a += "➣ Link : " + _0x288157.link + "\n\n────────────────────────\n\n"; 62 | } 63 | _0x44c3f6(_0x100d9a); 64 | } catch (_0x277bfb) { 65 | _0x44c3f6("An error occurred during Google search."); 66 | } 67 | }); 68 | adams({ 69 | 'nomCom': "imdb", 70 | 'categorie': "Search" 71 | }, async (_0x3e0c57, _0x31cdeb, _0x68675d) => { 72 | const { 73 | arg: _0xb16e9f, 74 | repondre: _0x390000, 75 | ms: _0x2128cb 76 | } = _0x68675d; 77 | if (!_0xb16e9f[0x0] || _0xb16e9f === '') { 78 | _0x390000("give the name of a series or film."); 79 | return; 80 | } 81 | try { 82 | const _0x2465ce = await axios.get('http://www.omdbapi.com/?apikey=742b2d09&t=' + _0xb16e9f + '&plot=full'); 83 | const _0x15db1f = _0x2465ce.data; 84 | let _0xd32d5c = "⚍⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚍\n"; 85 | _0xd32d5c += " ``` 𝕀𝕄𝔻𝔹 𝕊𝔼𝔸ℝℂℍ```\n"; 86 | _0xd32d5c += "⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎\n"; 87 | _0xd32d5c += "🎬Title : " + _0x15db1f.Title + "\n"; 88 | _0xd32d5c += "📅year : " + _0x15db1f.Year + "\n"; 89 | _0xd32d5c += "⭐Assessment : " + _0x15db1f.Rated + "\n"; 90 | _0xd32d5c += "📆Release : " + _0x15db1f.Released + "\n"; 91 | _0xd32d5c += "⏳Runtime : " + _0x15db1f.Runtime + "\n"; 92 | _0xd32d5c += "🌀Genre : " + _0x15db1f.Genre + "\n"; 93 | _0xd32d5c += "👨🏻‍💻Director : " + _0x15db1f.Director + "\n"; 94 | _0xd32d5c += "✍writers : " + _0x15db1f.Writer + "\n"; 95 | _0xd32d5c += "👨actors : " + _0x15db1f.Actors + "\n"; 96 | _0xd32d5c += "📃Synopsis : " + _0x15db1f.Plot + "\n"; 97 | _0xd32d5c += "🌐Language : " + _0x15db1f.Language + "\n"; 98 | _0xd32d5c += "🌍Contry : " + _0x15db1f.Country + "\n"; 99 | _0xd32d5c += "🎖️Awards : " + _0x15db1f.Awards + "\n"; 100 | _0xd32d5c += "📦BoxOffice : " + _0x15db1f.BoxOffice + "\n"; 101 | _0xd32d5c += "🏙️Production : " + _0x15db1f.Production + "\n"; 102 | _0xd32d5c += "🌟score : " + _0x15db1f.imdbRating + "\n"; 103 | _0xd32d5c += "❎imdbVotes : " + _0x15db1f.imdbVotes + ''; 104 | _0x31cdeb.sendMessage(_0x3e0c57, { 105 | 'image': { 106 | 'url': _0x15db1f.Poster 107 | }, 108 | 'caption': _0xd32d5c 109 | }, { 110 | 'quoted': _0x2128cb 111 | }); 112 | } catch (_0x1cf2b8) { 113 | _0x390000("An error occurred while searching IMDb."); 114 | } 115 | }); 116 | adams({ 117 | 'nomCom': "movie", 118 | 'categorie': 'Search' 119 | }, async (_0x41a878, _0x44c40c, _0x3424dd) => { 120 | const { 121 | arg: _0x51290b, 122 | repondre: _0x111c6a, 123 | ms: _0x3b271c 124 | } = _0x3424dd; 125 | if (!_0x51290b[0x0] || _0x51290b === '') { 126 | _0x111c6a("give the name of a series or film."); 127 | return; 128 | } 129 | try { 130 | const _0x2fab7f = await axios.get("http://www.omdbapi.com/?apikey=742b2d09&t=" + _0x51290b + "&plot=full"); 131 | const _0x315c2c = _0x2fab7f.data; 132 | let _0x1d9b0f = "*Yoo if you want to download this film join telegram channel below and get it*\n"; 133 | _0x1d9b0f += " ``` https://t.me/ibrahimtechai```\n"; 134 | _0x1d9b0f += "*BMW MD FILMS SEARCH*\n"; 135 | _0x1d9b0f += "🎬Title : " + _0x315c2c.Title + "\n"; 136 | _0x1d9b0f += "⭐Assessment : " + _0x315c2c.Rated + "\n"; 137 | _0x1d9b0f += "📆Release : " + _0x315c2c.Released + "\n"; 138 | _0x1d9b0f += "⏳Runtime : " + _0x315c2c.Runtime + "\n"; 139 | _0x1d9b0f += "🌀Genre : " + _0x315c2c.Genre + "\n"; 140 | _0x1d9b0f += "👨🏻‍💻Director : " + _0x315c2c.Director + "\n"; 141 | _0x1d9b0f += "✍writers : " + _0x315c2c.Writer + "\n"; 142 | _0x1d9b0f += "👨actors : " + _0x315c2c.Actors + "\n"; 143 | _0x1d9b0f += "🌐Language : " + _0x315c2c.Language + "\n"; 144 | _0x1d9b0f += "🌍Contry : " + _0x315c2c.Country + "\n"; 145 | _0x1d9b0f += "🏙️Production : " + _0x315c2c.Production + "\n"; 146 | _0x1d9b0f += "❎imdbVotes : " + _0x315c2c.imdbVotes + "\n"; 147 | _0x1d9b0f += "🤠Sponsor : ©Ibrahim Adams"; 148 | _0x44c40c.sendMessage(_0x41a878, { 149 | 'image': { 150 | 'url': _0x315c2c.Poster 151 | }, 152 | 'caption': _0x1d9b0f 153 | }, { 154 | 'quoted': _0x3b271c 155 | }); 156 | } catch (_0x4a93c8) { 157 | _0x111c6a("An error occurred while searching IMDb."); 158 | } 159 | }); 160 | adams({ 161 | 'nomCom': "emomix", 162 | 'categorie': 'Conversion' 163 | }, async (_0x551458, _0x2c4778, _0x21c569) => { 164 | const { 165 | arg: _0x259928, 166 | repondre: _0x1e8365, 167 | ms: _0x4866c8, 168 | nomAuteurMessage: _0x259630 169 | } = _0x21c569; 170 | if (!_0x259928[0x0] || _0x259928.length !== 0x1) { 171 | _0x1e8365("Incorrect use. Example: .emojimix 😀;🥰"); 172 | return; 173 | } 174 | const _0x1dbdf4 = _0x259928.join(" ").split(';'); 175 | if (_0x1dbdf4.length !== 0x2) { 176 | _0x1e8365("Please specify two emojis using a ';' as a separator."); 177 | return; 178 | } 179 | const _0x4c4e39 = _0x1dbdf4[0x0].trim(); 180 | const _0x19c1b9 = _0x1dbdf4[0x1].trim(); 181 | try { 182 | const _0x36bc47 = require("axios"); 183 | const _0x559df0 = await _0x36bc47.get("https://levanter.onrender.com/emix?q=" + _0x4c4e39 + _0x19c1b9); 184 | if (_0x559df0.data.status === true) { 185 | let _0x4ad919 = new Sticker(_0x559df0.data.result, { 186 | 'pack': _0x259630, 187 | 'type': StickerTypes.CROPPED, 188 | 'categories': ['🤩', '🎉'], 189 | 'id': '12345', 190 | 'quality': 0x46, 191 | 'background': "transparent" 192 | }); 193 | const _0xab42e7 = await _0x4ad919.toBuffer(); 194 | _0x2c4778.sendMessage(_0x551458, { 195 | 'sticker': _0xab42e7 196 | }, { 197 | 'quoted': _0x4866c8 198 | }); 199 | } else { 200 | _0x1e8365("Unable to create emoji mix."); 201 | } 202 | } catch (_0x527ade) { 203 | _0x1e8365("An error occurred while creating the emoji mix." + _0x527ade); 204 | } 205 | }); 206 | -------------------------------------------------------------------------------- /scs/random.js: -------------------------------------------------------------------------------- 1 | 2 | const axios = require("axios"); 3 | const {adams} = require("../Ibrahim/adams"); 4 | const traduire = require("../Ibrahim/traduction"); 5 | const {Sticker ,StickerTypes}= require('wa-sticker-formatter'); 6 | 7 | adams({ 8 | nomCom: "randompic", 9 | categorie: "Fun", 10 | reaction: "📺" 11 | }, 12 | async (origineMessage, zk, commandeOptions) => { 13 | const { repondre, ms } = commandeOptions; 14 | 15 | const jsonURL = "https://api.jikan.moe/v4/random/anime"; // Remplacez par votre URL JSON 16 | 17 | try { 18 | const response = await axios.get(jsonURL); 19 | const data = response.data.data; 20 | 21 | const title = data.title; 22 | const synopsis = data.synopsis; 23 | const imageUrl = data.images.jpg.image_url; // Utilisez l'URL de l'image JPG 24 | const episodes = data.episodes; 25 | const status = data.status; 26 | 27 | //const texttraduit = await traduire(synopsis,{ to: 'fr' }) 28 | 29 | const message = `📺 Titre: ${title}\n🎬 Épisodes: ${episodes}\n📡 Statut: ${status}\n📝 Synopsis: ${synopsis}\n🔗 URL: ${data.url}`; 30 | 31 | // Envoyer l'image et les informations 32 | zk.sendMessage(origineMessage, { image: { url: imageUrl }, caption: message }, { quoted: ms }); 33 | } catch (error) { 34 | console.error('Error retrieving data from JSON :', error); 35 | repondre('Error retrieving data from JSON.'); 36 | } 37 | }); 38 | 39 | adams({ 40 | nomCom: "google2", 41 | categorie: "Search" 42 | }, async (dest, zk, commandeOptions) => { 43 | const { arg, repondre } = commandeOptions; 44 | 45 | if (!arg[0] || arg === "") { 46 | repondre("Give me a query.\n*Example: .google What is a bot.*"); 47 | return; 48 | } 49 | 50 | const google = require('google-it'); 51 | try { 52 | const results = await google({ query: arg.join(" ") }); 53 | let msg = `Google search for : ${arg}\n\n`; 54 | 55 | for (let result of results) { 56 | msg += `➣ Title : ${result.title}\n`; 57 | msg += `➣ Description : ${result.snippet}\n`; 58 | msg += `➣ Link : ${result.link}\n\n────────────────────────\n\n`; 59 | } 60 | 61 | // const trdmsg = await traduire(msg,{to : 'fr'}) 62 | repondre(msg); 63 | } catch (error) { 64 | repondre("An error occurred during Google search."); 65 | } 66 | }); 67 | 68 | adams({ 69 | nomCom: "imdb2", 70 | categorie: "Search" 71 | }, async (dest, zk, commandeOptions) => { 72 | const { arg, repondre , ms } = commandeOptions; 73 | 74 | if (!arg[0] || arg === "") { 75 | repondre("give the name of a series or film."); 76 | return; 77 | } 78 | 79 | try { 80 | 81 | const response = await axios.get(`http://www.omdbapi.com/?apikey=742b2d09&t=${arg}&plot=full`); 82 | const imdbData = response.data; 83 | 84 | let imdbInfo = "⚍⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚍\n"; 85 | imdbInfo += " ``` 𝕀𝕄𝔻𝔹 𝕊𝔼𝔸ℝℂℍ```\n"; 86 | imdbInfo += "⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎\n"; 87 | imdbInfo += "🎬Title : " + imdbData.Title + "\n"; 88 | imdbInfo += "📅year : " + imdbData.Year + "\n"; 89 | imdbInfo += "⭐Assessment : " + imdbData.Rated + "\n"; 90 | imdbInfo += "📆Release : " + imdbData.Released + "\n"; 91 | imdbInfo += "⏳Runtime : " + imdbData.Runtime + "\n"; 92 | imdbInfo += "🌀Genre : " + imdbData.Genre + "\n"; 93 | imdbInfo += "👨🏻‍💻Director : " + imdbData.Director + "\n"; 94 | imdbInfo += "✍writers : " + imdbData.Writer + "\n"; 95 | imdbInfo += "👨actors : " + imdbData.Actors + "\n"; 96 | imdbInfo += "📃Synopsis : " + imdbData.Plot + "\n"; 97 | imdbInfo += "🌐Language : " + imdbData.Language + "\n"; 98 | imdbInfo += "🌍Contry : " + imdbData.Country + "\n"; 99 | imdbInfo += "🎖️Awards : " + imdbData.Awards + "\n"; 100 | imdbInfo += "📦BoxOffice : " + imdbData.BoxOffice + "\n"; 101 | imdbInfo += "🏙️Production : " + imdbData.Production + "\n"; 102 | imdbInfo += "🌟score : " + imdbData.imdbRating + "\n"; 103 | imdbInfo += "❎imdbVotes : " + imdbData.imdbVotes + ""; 104 | 105 | zk.sendMessage(dest, { 106 | image: { 107 | url: imdbData.Poster, 108 | }, 109 | caption: imdbInfo, 110 | }, { 111 | quoted: ms, 112 | }); 113 | } catch (error) { 114 | repondre("An error occurred while searching IMDb."); 115 | } 116 | }); 117 | 118 | adams({ 119 | nomCom: "series", 120 | categorie: "Search" 121 | }, async (dest, zk, commandeOptions) => { 122 | const { arg, repondre , ms } = commandeOptions; 123 | 124 | if (!arg[0] || arg === "") { 125 | repondre("give the name of a series or film."); 126 | return; 127 | } 128 | 129 | try { 130 | 131 | const response = await axios.get(`http://www.omdbapi.com/?apikey=742b2d09&t=${arg}&plot=full`); 132 | const imdbData = response.data; 133 | 134 | let imdbInfo = "Tap on the link to join movie channel on telegram and download movies there : https://t.me/ibrahimtechai\n"; 135 | imdbInfo += " ``` BMW MD FILMS```\n"; 136 | imdbInfo += "*Made by Ibrahim Adams*\n"; 137 | imdbInfo += "🎬Title : " + imdbData.Title + "\n"; 138 | imdbInfo += "📅year : " + imdbData.Year + "\n"; 139 | imdbInfo += "⭐Assessment : " + imdbData.Rated + "\n"; 140 | imdbInfo += "📆Release : " + imdbData.Released + "\n"; 141 | imdbInfo += "⏳Runtime : " + imdbData.Runtime + "\n"; 142 | imdbInfo += "🌀Genre : " + imdbData.Genre + "\n"; 143 | imdbInfo += "👨🏻‍💻Director : " + imdbData.Director + "\n"; 144 | imdbInfo += "✍writers : " + imdbData.Writer + "\n"; 145 | imdbInfo += "👨actors : " + imdbData.Actors + "\n"; 146 | imdbInfo += "📃Synopsis : " + imdbData.Plot + "\n"; 147 | imdbInfo += "🌐Language : " + imdbData.Language + "\n"; 148 | imdbInfo += "🌍Contry : " + imdbData.Country + "\n"; 149 | imdbInfo += "🎖️Awards : " + imdbData.Awards + "\n"; 150 | imdbInfo += "📦BoxOffice : " + imdbData.BoxOffice + "\n"; 151 | imdbInfo += "🏙️Production : " + imdbData.Production + "\n"; 152 | imdbInfo += "🌟score : " + imdbData.imdbRating + "\n"; 153 | imdbInfo += "❎imdbVotes : " + imdbData.imdbVotes + ""; 154 | 155 | zk.sendMessage(dest, { 156 | image: { 157 | url: imdbData.Poster, 158 | }, 159 | caption: imdbInfo, 160 | }, { 161 | quoted: ms, 162 | }); 163 | } catch (error) { 164 | repondre("An error occurred while searching IMDb."); 165 | } 166 | }); 167 | 168 | adams({ 169 | nomCom: "emoji", 170 | categorie: "Conversion" 171 | }, async (dest, zk, commandeOptions) => { 172 | const { arg, repondre,ms , nomAuteurMessage } = commandeOptions; 173 | 174 | if (!arg[0] || arg.length !== 1) { 175 | repondre("Incorrect use. Example: .emojimix 😀;🥰"); 176 | return; 177 | } 178 | 179 | // Divisez la chaîne en deux emojis en utilisant le point-virgule comme séparateur 180 | const emojis = arg.join(' ').split(';'); 181 | 182 | if (emojis.length !== 2) { 183 | repondre("Please specify two emojis using a ';' as a separator."); 184 | return; 185 | } 186 | 187 | const emoji1 = emojis[0].trim(); 188 | const emoji2 = emojis[1].trim(); 189 | 190 | try { 191 | const axios = require('axios'); 192 | const response = await axios.get(`https://levanter.onrender.com/emix?q=${emoji1}${emoji2}`); 193 | 194 | if (response.data.status === true) { 195 | // Si la requête a réussi, envoyez l'image résultante 196 | 197 | let stickerMess = new Sticker(response.data.result, { 198 | pack: nomAuteurMessage, 199 | type: StickerTypes.CROPPED, 200 | categories: ["🤩", "🎉"], 201 | id: "12345", 202 | quality: 70, 203 | background: "transparent", 204 | }); 205 | const stickerBuffer2 = await stickerMess.toBuffer(); 206 | zk.sendMessage(dest, { sticker: stickerBuffer2 }, { quoted: ms }); 207 | 208 | } else { 209 | repondre("Unable to create emoji mix."); 210 | } 211 | } catch (error) { 212 | repondre("An error occurred while creating the emoji mix." + error ); 213 | } 214 | }); 215 | 216 | -------------------------------------------------------------------------------- /scs/audio_edit.js: -------------------------------------------------------------------------------- 1 | const {adams} = require('../Ibrahim/adams'); 2 | const fs = require("fs"); 3 | const { exec } = require("child_process"); 4 | 5 | 6 | const filename = `${Math.random().toString(36)}`; 7 | 8 | adams ( 9 | { 10 | nomCom : 'deep', 11 | categorie : 'Audio-Edit', 12 | 13 | }, async (dest , zk, commandeOptions) => { 14 | const {ms , repondre,msgRepondu} = commandeOptions; 15 | 16 | if (msgRepondu) { 17 | if(msgRepondu.audioMessage) { 18 | 19 | const media = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage) 20 | 21 | let set = "-af atempo=4/4,asetrate=44500*2/3"; 22 | let ran = `${filename}.mp3`; 23 | 24 | try { 25 | exec(`ffmpeg -i ${media} ${set} ${ran}`, (err, stderr, stdout) => { 26 | fs.unlinkSync(media); 27 | if (err) return repondre("error during the procedure " + err ); 28 | 29 | let buff1 = fs.readFileSync(ran); 30 | 31 | zk.sendMessage( 32 | dest, 33 | { audio: buff1, mimetype: "audio/mpeg" }, 34 | { quoted: ms } 35 | ); 36 | fs.unlinkSync(ran); 37 | }); 38 | } catch (e) { 39 | 40 | repondre("error"); 41 | } 42 | 43 | } else { 44 | repondre('the command only works with audio messages') 45 | } 46 | 47 | } else { 48 | repondre('Please mention an audio') 49 | } 50 | } 51 | ); 52 | 53 | adams ( 54 | { 55 | nomCom : 'bass', 56 | categorie : 'Audio-Edit', 57 | 58 | }, async (dest , zk, commandeOptions) => { 59 | const {ms , repondre,msgRepondu} = commandeOptions; 60 | 61 | if (msgRepondu) { 62 | if(msgRepondu.audioMessage) { 63 | 64 | const media2 = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage) 65 | 66 | let set2 = "-af equalizer=f=18:width_type=o:width=2:g=14"; 67 | let ran2 = `${filename}.mp3`; 68 | 69 | try { 70 | exec(`ffmpeg -i ${media2} ${set2} ${ran2}`, (err, stderr, stdout) => { 71 | fs.unlinkSync(media2); 72 | if (err) return repondre("error during the procedure " + err ); 73 | 74 | let buff2 = fs.readFileSync(ran2); 75 | 76 | zk.sendMessage( 77 | dest, 78 | { audio: buff2, mimetype: "audio/mpeg" }, 79 | { quoted: ms } 80 | ); 81 | fs.unlinkSync(ran2); 82 | }); 83 | } catch (e) { 84 | 85 | repondre("error"); 86 | } 87 | 88 | } else { 89 | repondre('the command only works with audio messages') 90 | } 91 | 92 | } else { 93 | repondre('Please mention an audio') 94 | } 95 | } 96 | ); 97 | 98 | adams( 99 | { 100 | nomCom: 'reverse', 101 | categorie: 'Audio-Edit', 102 | }, 103 | async (dest, zk, commandeOptions) => { 104 | const { ms, repondre, msgRepondu } = commandeOptions; 105 | 106 | if (msgRepondu) { 107 | if (msgRepondu.audioMessage) { 108 | const media3 = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage); 109 | let set3 = '-filter_complex "areverse"'; 110 | let ran3 = `${filename}.mp3`; 111 | 112 | try { 113 | exec(`ffmpeg -i ${media3} ${set3} ${ran3}`, (err, stderr, stdout) => { 114 | fs.unlinkSync(media3); 115 | if (err) return repondre("error during the procedure" + err); 116 | 117 | let buff3 = fs.readFileSync(ran3); 118 | 119 | zk.sendMessage(dest, { audio: buff3, mimetype: "audio/mpeg" }, { quoted: ms }); 120 | fs.unlinkSync(ran3); 121 | }); 122 | } catch (e) { 123 | repondre("Error : " + e); 124 | } 125 | } else { 126 | repondre("The command only works with audio messages"); 127 | } 128 | } else { 129 | repondre("Please mention an audio"); 130 | } 131 | } 132 | ); 133 | 134 | adams( 135 | { 136 | nomCom: 'slow', 137 | categorie: 'Audio-Edit', 138 | }, 139 | async (dest, zk, commandeOptions) => { 140 | const { ms, repondre, msgRepondu } = commandeOptions; 141 | 142 | if (msgRepondu) { 143 | if (msgRepondu.audioMessage) { 144 | const media5 = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage); 145 | let set5 = '-filter:a "atempo=0.8,asetrate=44100"'; 146 | let ran5 = `${filename}.mp3`; 147 | 148 | try { 149 | exec(`ffmpeg -i ${media5} ${set5} ${ran5}`, (err, stderr, stdout) => { 150 | fs.unlinkSync(media5); 151 | if (err) return repondre("error during the procedure" + err); 152 | 153 | let buff5 = fs.readFileSync(ran5); 154 | 155 | zk.sendMessage(dest, { audio: buff5, mimetype: "audio/mpeg" }, { quoted: ms }); 156 | fs.unlinkSync(ran5); 157 | }); 158 | } catch (e) { 159 | repondre("Error : " + e); 160 | } 161 | } else { 162 | repondre("The command only works with audio messages"); 163 | } 164 | } else { 165 | repondre("Please mention an audio"); 166 | } 167 | } 168 | ); 169 | 170 | // Cas pour l'effet "smooth" 171 | adams( 172 | { 173 | nomCom: 'smooth', 174 | categorie: 'Audio-Edit', 175 | }, 176 | async (dest, zk, commandeOptions) => { 177 | const { ms, repondre, msgRepondu } = commandeOptions; 178 | 179 | if (msgRepondu) { 180 | if (msgRepondu.audioMessage) { 181 | const mediaSmooth = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage); 182 | let setSmooth = '-filter:v "minterpolate=\'mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=120\'"'; 183 | let ranSmooth = `${filename}.mp3`; 184 | 185 | try { 186 | exec(`ffmpeg -i ${mediaSmooth} ${setSmooth} ${ranSmooth}`, (err, stderr, stdout) => { 187 | fs.unlinkSync(mediaSmooth); 188 | if (err) return repondre("error during the procedure" + err); 189 | 190 | let buff6 = fs.readFileSync(ranSmooth); 191 | 192 | zk.sendMessage(dest, { audio: buff6, mimetype: "audio/mpeg" }, { quoted: ms }); 193 | fs.unlinkSync(ranSmooth); 194 | }); 195 | } catch (e) { 196 | repondre("Error : " + e); 197 | } 198 | } else { 199 | repondre("The command only works with audio messages"); 200 | } 201 | } else { 202 | repondre("Please mention an audio"); 203 | } 204 | } 205 | ); 206 | 207 | // Cas pour l'effet "tempo" 208 | adams( 209 | { 210 | nomCom: 'tempo', 211 | categorie: 'Audio-Edit', 212 | }, 213 | async (dest, zk, commandeOptions) => { 214 | const { ms, repondre, msgRepondu } = commandeOptions; 215 | 216 | if (msgRepondu) { 217 | if (msgRepondu.audioMessage) { 218 | const mediaTempo = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage); 219 | let setTempo = '-filter:a "atempo=0.9,asetrate=65100"'; 220 | let ranTempo = `${filename}.mp3`; 221 | 222 | try { 223 | exec(`ffmpeg -i ${mediaTempo} ${setTempo} ${ranTempo}`, (err, stderr, stdout) => { 224 | fs.unlinkSync(mediaTempo); 225 | if (err) return repondre("error during the procedure " + err); 226 | 227 | let buff7 = fs.readFileSync(ranTempo); 228 | 229 | zk.sendMessage(dest, { audio: buff7, mimetype: "audio/mpeg" }, { quoted: ms }); 230 | fs.unlinkSync(ranTempo); 231 | }); 232 | } catch (e) { 233 | repondre("Error : " + e); 234 | } 235 | } else { 236 | repondre("The command only works with audio messages"); 237 | } 238 | } else { 239 | repondre("Please mention an audio"); 240 | } 241 | } 242 | ); 243 | 244 | // Cas pour l'effet "nightcore" 245 | adams( 246 | { 247 | nomCom: 'nightcore', 248 | categorie: 'Audio-Edit', 249 | }, 250 | async (dest, zk, commandeOptions) => { 251 | const { ms, repondre, msgRepondu } = commandeOptions; 252 | 253 | if (msgRepondu) { 254 | if (msgRepondu.audioMessage) { 255 | const mediaNightcore = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage); 256 | let setNightcore = '-filter:a "atempo=1.07,asetrate=44100*1.20"'; 257 | let ranNightcore = `${filename}.mp3`; 258 | 259 | try { 260 | exec(`ffmpeg -i ${mediaNightcore} ${setNightcore} ${ranNightcore}`, (err, stderr, stdout) => { 261 | fs.unlinkSync(mediaNightcore); 262 | if (err) return repondre("error during the procedure " + err); 263 | 264 | let buff8 = fs.readFileSync(ranNightcore); 265 | 266 | zk.sendMessage(dest, { audio: buff8, mimetype: "audio/mpeg" }, { quoted: ms }); 267 | fs.unlinkSync(ranNightcore); 268 | }); 269 | } catch (e) { 270 | repondre("Erreur : " + e); 271 | } 272 | } else { 273 | repondre("The command only works with audio messages"); 274 | } 275 | } else { 276 | repondre("Please mention an audio"); 277 | } 278 | } 279 | ); 280 | 281 | -------------------------------------------------------------------------------- /scs/rank.js: -------------------------------------------------------------------------------- 1 | const {adams} = require("../Ibrahim/adams"); 2 | const {getMessagesAndXPByJID,getBottom10Users} = require("../lib/level"); 3 | 4 | 5 | function get_level_exp(xp) { 6 | const levelThresholds = [ 7 | { level: 1, xpThreshold: 500 }, 8 | { level: 2, xpThreshold: 1000 }, 9 | { level: 3, xpThreshold: 2000 }, 10 | { level: 4, xpThreshold: 4000 }, 11 | { level: 5, xpThreshold: 7000 }, 12 | { level: 6, xpThreshold: 10000 }, 13 | { level: 7, xpThreshold: 15000 }, 14 | { level: 8, xpThreshold: 20000}, 15 | { level: 9, xpThreshold: 25000}, 16 | { level: 10, xpThreshold: 30000}, 17 | { level: 11, xpThreshold: 35000}, 18 | { level: 12, xpThreshold: 45000}, 19 | { level: 13, xpThreshold: 55000}, 20 | { level: 14, xpThreshold: 65000}, 21 | { level: 15, xpThreshold: 75000}, 22 | { level: 16, xpThreshold: 90000}, 23 | { level: 17, xpThreshold: 105000}, 24 | { level: 18, xpThreshold: 120000}, 25 | { level: 19, xpThreshold: 135000}, 26 | { level: 20, xpThreshold: 150000}, 27 | { level: 21, xpThreshold: 170000}, 28 | { level: 22, xpThreshold: 190000}, 29 | { level: 23, xpThreshold: 210000}, 30 | { level: 24, xpThreshold: 230000}, 31 | { level: 25, xpThreshold: 255000}, 32 | { level: 26, xpThreshold: 270000}, 33 | { level: 27, xpThreshold: 295000}, 34 | { level: 28, xpThreshold: 320000}, 35 | { level: 29, xpThreshold: 345000}, 36 | { level: 30, xpThreshold: 385000}, 37 | { level: 31, xpThreshold: 425000}, 38 | { level: 32, xpThreshold: 465000}, 39 | { level: 33, xpThreshold: 505000}, 40 | { level: 34, xpThreshold: 545000}, 41 | { level: 35, xpThreshold: 590000}, 42 | { level: 36, xpThreshold: 635000}, 43 | { level: 37, xpThreshold: 680000}, 44 | { level: 38, xpThreshold: 725000}, 45 | { level: 39, xpThreshold: 770000}, 46 | { level: 40, xpThreshold: 820000}, 47 | { level: 41, xpThreshold: 870000}, 48 | { level: 42, xpThreshold: 920000}, 49 | { level: 43, xpThreshold: 970000}, 50 | { level: 44, xpThreshold: 1020000}, 51 | { level: 45, xpThreshold: 1075000}, 52 | { level: 46, xpThreshold: 1130000}, 53 | { level: 47, xpThreshold: 1185000}, 54 | { level: 48, xpThreshold: 1240000}, 55 | { level: 49, xpThreshold: 1295000}, 56 | { level: 'Zk-GOD', xpThreshold: 2000000} 57 | ]; 58 | 59 | let level = 0; 60 | let exp = xp; 61 | let xplimit = levelThresholds[level].xpThreshold; 62 | 63 | for (let i = 0; i < levelThresholds.length; i++) { 64 | if (xp >= levelThresholds[i].xpThreshold) { 65 | level = levelThresholds[i].level; 66 | xplimit = levelThresholds[i + 1]?.xpThreshold || 'No-limit'; 67 | exp = xp - levelThresholds[i].xpThreshold; 68 | } else { 69 | break; 70 | } 71 | } 72 | 73 | return { 74 | level: level, 75 | xplimit: xplimit, 76 | exp: exp 77 | }; 78 | } 79 | 80 | module.exports = { 81 | get_level_exp, 82 | } ; 83 | 84 | adams( { 85 | nomCom : "rank", 86 | categorie : "Fun", 87 | }, 88 | async(dest,zk, commandeOptions)=> { 89 | 90 | const {ms , repondre,auteurMessage,nomAuteurMessage, msgRepondu , auteurMsgRepondu , mybotpic} = commandeOptions ; 91 | 92 | if (msgRepondu) { 93 | 94 | try { 95 | 96 | let rank = await getMessagesAndXPByJID(auteurMsgRepondu) ; 97 | 98 | const data = await get_level_exp(rank.xp) 99 | let ppuser ; 100 | 101 | 102 | try { 103 | ppuser = await zk.profilePictureUrl(auteurMsgRepondu , 'image') ; 104 | } catch { 105 | ppuser = mybotpic() 106 | } ; 107 | 108 | 109 | let role ; 110 | 111 | if (data.level < 5) { 112 | role = 'baby' 113 | } else if (data.level >= 5 && data.level < 10) { 114 | role = 'kid-Ninja' 115 | } else if ( data.level >= 10 && data.level < 15 ) { 116 | role = 'Ninja-genin' 117 | } else if ( data.level >= 15 && data.level < 20 ) { 118 | role = 'Ninja-chunin' 119 | } else if ( data.level >= 20 && data.level < 25 ) { 120 | role = 'Ninja-jonin' 121 | } else if ( data.level >= 25 && data.level < 30 ) { 122 | role = 'ANBU' 123 | } else if ( data.level >= 30 && data.level < 35 ) { 124 | role = 'strong ninja' 125 | } else if ( data.level >= 35 && data.level < 40 ) { 126 | role = 'kage' 127 | } else if ( data.level >= 40 && data.level < 45 ) { 128 | role = 'Hermit seinin' 129 | } else if ( data.level >= 45 && data.level < 50 ) { 130 | role = 'Otsusuki' 131 | } else { 132 | role = 'GOD' 133 | } 134 | 135 | 136 | let msg = ` 137 | ┏━━━┛ Bwm xmd ┗━━━┓ 138 | 139 | *Name :* @${auteurMsgRepondu.split("@")[0]} 140 | 141 | *Level :* ${data.level} 142 | 143 | *EXP :* ${data.exp}/${data.xplimit} 144 | 145 | *Role :* ${role} 146 | 147 | *Messages :* ${rank.messages} 148 | 149 | ┕━✿━┑ ┍━✿━┙` 150 | 151 | zk.sendMessage( 152 | dest, 153 | { 154 | image : {url : ppuser}, 155 | caption : msg, 156 | mentions : [auteurMsgRepondu] 157 | }, 158 | {quoted : ms} 159 | ) 160 | 161 | 162 | } catch (error) { 163 | repondre(error) 164 | } 165 | } else { 166 | 167 | 168 | try { 169 | 170 | let jid = auteurMessage ; 171 | 172 | let rang = await getMessagesAndXPByJID(jid) ; 173 | 174 | const data = get_level_exp(rang.xp) 175 | let ppuser ; 176 | 177 | 178 | try { 179 | ppuser = await zk.profilePictureUrl(jid, 'image') ; 180 | } catch { 181 | ppuser = mybotpic() 182 | } ; 183 | 184 | 185 | let role ; 186 | 187 | if (data.level < 5) { 188 | role = 'Nouveau né(e)' 189 | } else if (data.level >= 5 && data.level < 10) { 190 | role = 'kid-Ninja' 191 | } else if ( data.level >= 10 && data.level < 15 ) { 192 | role = 'Ninja-genin' 193 | } else if ( data.level >= 15 && data.level < 20 ) { 194 | role = 'Ninja-chunin' 195 | } else if ( data.level >= 20 && data.level < 25 ) { 196 | role = 'Ninja-jonin' 197 | } else if ( data.level >= 25 && data.level < 30 ) { 198 | role = 'ANBU' 199 | } else if ( data.level >= 30 && data.level < 35 ) { 200 | role = 'strong ninja' 201 | } else if ( data.level >= 35 && data.level < 40 ) { 202 | role = 'kage' 203 | } else if ( data.level >= 40 && data.level < 45 ) { 204 | role = 'Hermit seinin' 205 | } else if ( data.level >= 45 && data.level < 50 ) { 206 | role = 'Otsusuki' 207 | } else { 208 | role = 'level-GOD' 209 | } 210 | 211 | 212 | let msg = ` 213 | ┏━━━┛ bwm xmd ┗━━━┓ 214 | 215 | *Name :* ${nomAuteurMessage} 216 | 217 | *Level :* ${data.level} 218 | 219 | *EXP :* ${data.exp}/${data.xplimit} 220 | 221 | *Role :* ${role} 222 | 223 | *Messages :* ${rang.messages} 224 | 225 | ┕━✿━┑ ┍━✿━┙` 226 | 227 | zk.sendMessage( 228 | dest, 229 | { 230 | image : {url : ppuser}, 231 | caption : msg 232 | }, 233 | {quoted : ms} 234 | ) 235 | 236 | } catch (error) { 237 | repondre(error) 238 | } 239 | 240 | } 241 | 242 | 243 | }) ; 244 | 245 | adams( { 246 | nomCom : "toprank", 247 | categorie : "Fun", 248 | }, 249 | async(dest,zk, commandeOptions)=> { 250 | 251 | const {ms , mybotpic} = commandeOptions ; 252 | 253 | 254 | let msg = `┏━━┛ bwm xmd ┗━━┓\n\n` 255 | 256 | let topRanks = await getBottom10Users() ; 257 | let mention = [] ; 258 | for (const rank of topRanks ) { 259 | 260 | const data = await get_level_exp(rank.xp) ; 261 | 262 | let role ; 263 | 264 | if (data.level < 5) { 265 | role = 'Nouveau né(e)' 266 | } else if (data.level >= 5 && data.level < 10) { 267 | role = 'kid ninja' 268 | } else if ( data.level >= 10 && data.level < 15 ) { 269 | role = 'Ninja-genin' 270 | } else if ( data.level >= 15 && data.level < 20 ) { 271 | role = 'Ninja-chunin' 272 | } else if ( data.level >= 20 && data.level < 25 ) { 273 | role = 'Ninja-jonin' 274 | } else if ( data.level >= 25 && data.level < 30 ) { 275 | role = 'ANBU' 276 | } else if ( data.level >= 30 && data.level < 35 ) { 277 | role = 'strong ninja' 278 | } else if ( data.level >= 35 && data.level < 40 ) { 279 | role = 'kage' 280 | } else if ( data.level >= 40 && data.level < 45 ) { 281 | role = 'Hermit seinin' 282 | } else if ( data.level >= 45 && data.level < 50 ) { 283 | role = 'Otsusuki' 284 | } else { 285 | role = 'level-GOD' 286 | } 287 | msg += `----------------------- 288 | 289 | *Name :* @${rank.jid.split("@")[0]} 290 | *Level :* ${data.level} 291 | *Role :* ${role}\n` ; 292 | 293 | mention.push(rank.jid) ; 294 | } 295 | 296 | zk.sendMessage(dest, 297 | { 298 | image : { url : mybotpic() }, 299 | caption : msg, 300 | mentions : mention 301 | }, 302 | {quoted : ms}) 303 | 304 | 305 | }) 306 | 307 | 308 | 309 | 310 | --------------------------------------------------------------------------------