├── Gallery
├── database
│ ├── anticall.json
│ ├── afk-user.json
│ ├── antilinkall.json
│ ├── autobio.json
│ ├── antilink.json
│ ├── total-hit-user.json
│ └── owner.json
├── ch1.jpg
├── ch2.jpg
├── ch3.jpg
├── kish.mp4
├── nsfw.jpg
├── sup.jpg
├── thumb.jpg
├── Mariach.jpg
├── Theme-logo
│ ├── nRBgAq.jpg
│ ├── 54917272.jpg
│ ├── images.jpeg
│ ├── wp6788481.jpg
│ ├── wp6788607.jpg
│ ├── images (1).jpeg
│ ├── images (2).jpeg
│ ├── images (3).jpeg
│ ├── images (4).jpeg
│ ├── images (5).jpeg
│ ├── images (6).jpeg
│ ├── thumb-1920-1255356.jpg
│ ├── anime-girl-alone-fantasy-5k-3440x1440-3.jpg
│ ├── 241-2410461_cute-anime-girl-wallpapers-hd.jpg
│ ├── blue-hair-anime-girl-Hatsune-Miku-wallpaper.jpg
│ ├── Shinotoho-VOCALOID-Hatsune-Miku-anime-wallpaper.jpg
│ ├── anime-girl-bag-horizontal-bar-wallpaper-preview.jpg
│ └── desktop-wallpaper-girl-anime-headphones-art-vocaloid-hatsune-heart-anime.jpg
└── lib
│ ├── download.js
│ ├── color.js
│ ├── SnapBlend.js
│ ├── search.js
│ ├── mediafire.js
│ ├── other.js
│ ├── owner.js
│ ├── list.js
│ ├── general.js
│ ├── fun.js
│ ├── Group.js
│ ├── weeb.js
│ ├── afk.js
│ ├── quote.js
│ ├── converter.js
│ ├── help.js
│ ├── remini.js
│ ├── textpro.js
│ ├── premiun.js
│ ├── photooxy.js
│ ├── myfunc2.js
│ ├── uploader.js
│ ├── exif.js
│ ├── scraper.js
│ ├── ytdl2.js
│ └── myfunc.js
├── session
└── creds.js
├── Procfile
├── Dockerfile
├── app.json
├── index.js
├── LICENSE.md
├── Config.js
├── README.md
└── plugins.js
/Gallery/database/anticall.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/session/creds.js:
--------------------------------------------------------------------------------
1 | 𝙆𝙞𝙨𝙝𓅃
2 |
--------------------------------------------------------------------------------
/Gallery/database/afk-user.json:
--------------------------------------------------------------------------------
1 | [{}]
--------------------------------------------------------------------------------
/Gallery/database/antilinkall.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/Gallery/database/autobio.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/Gallery/database/antilink.json:
--------------------------------------------------------------------------------
1 | ["120363224100277097@g.us"]
--------------------------------------------------------------------------------
/Gallery/database/total-hit-user.json:
--------------------------------------------------------------------------------
1 | [{"hit_cmd":67044}]
--------------------------------------------------------------------------------
/Gallery/ch1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/ch1.jpg
--------------------------------------------------------------------------------
/Gallery/ch2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/ch2.jpg
--------------------------------------------------------------------------------
/Gallery/ch3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/ch3.jpg
--------------------------------------------------------------------------------
/Gallery/kish.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/kish.mp4
--------------------------------------------------------------------------------
/Gallery/nsfw.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/nsfw.jpg
--------------------------------------------------------------------------------
/Gallery/sup.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/sup.jpg
--------------------------------------------------------------------------------
/Gallery/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/thumb.jpg
--------------------------------------------------------------------------------
/Gallery/Mariach.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Mariach.jpg
--------------------------------------------------------------------------------
/Gallery/database/owner.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": ["254735905972"],
3 | "developer": ["254796307638"]
4 | }
5 |
--------------------------------------------------------------------------------
/Gallery/Theme-logo/nRBgAq.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/nRBgAq.jpg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/54917272.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/54917272.jpg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/images.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/images.jpeg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/wp6788481.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/wp6788481.jpg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/wp6788607.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/wp6788607.jpg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/images (1).jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/images (1).jpeg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/images (2).jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/images (2).jpeg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/images (3).jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/images (3).jpeg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/images (4).jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/images (4).jpeg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/images (5).jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/images (5).jpeg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/images (6).jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/images (6).jpeg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/thumb-1920-1255356.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/thumb-1920-1255356.jpg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/anime-girl-alone-fantasy-5k-3440x1440-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/anime-girl-alone-fantasy-5k-3440x1440-3.jpg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/241-2410461_cute-anime-girl-wallpapers-hd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/241-2410461_cute-anime-girl-wallpapers-hd.jpg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/blue-hair-anime-girl-Hatsune-Miku-wallpaper.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/blue-hair-anime-girl-Hatsune-Miku-wallpaper.jpg
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | worker: npm i pm2 -g && pm2 install ffmpeg && pm2 start index.js && pm2 save && pm2 logs
2 |
3 |
4 | worker2: npm i -g forever && forever index.js && forever save && forever logs
5 |
--------------------------------------------------------------------------------
/Gallery/Theme-logo/Shinotoho-VOCALOID-Hatsune-Miku-anime-wallpaper.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/Shinotoho-VOCALOID-Hatsune-Miku-anime-wallpaper.jpg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/anime-girl-bag-horizontal-bar-wallpaper-preview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/anime-girl-bag-horizontal-bar-wallpaper-preview.jpg
--------------------------------------------------------------------------------
/Gallery/Theme-logo/desktop-wallpaper-girl-anime-headphones-art-vocaloid-hatsune-heart-anime.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Brashokish/Kish-MD/HEAD/Gallery/Theme-logo/desktop-wallpaper-girl-anime-headphones-art-vocaloid-hatsune-heart-anime.jpg
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:lts-buster
2 |
3 | RUN apt-get update && \
4 | apt-get install -y \
5 | ffmpeg \
6 | imagemagick \
7 | webp && \
8 | apt-get upgrade -y && \
9 | rm -rf /var/lib/apt/lists/*
10 |
11 | COPY package.json .
12 |
13 | RUN npm install
14 |
15 | COPY . .
16 |
17 | CMD ["node", "."]
--------------------------------------------------------------------------------
/Gallery/lib/download.js:
--------------------------------------------------------------------------------
1 | const prefix = global.prefa
2 | const pushname = m.pushName || "No Name"
3 |
4 | const codingmenu=`
5 | ┌──⊰ _*📂download📂*_
6 | │⊳ 📥 ${prefix}play
7 | │⊳ 📥 ${prefix}ytmp3
8 | │⊳ 📥 ${prefix}ytmp4
9 | │⊳ 📥 ${prefix}igimage
10 | │⊳ 📥 ${prefix}igvideo
11 | │⊳ 📥 ${prefix}gitclone
12 | │⊳ 📥 ${prefix}pinterest
13 | │⊳ 📥 ${prefix}apk
14 | └──────────⊰
15 | `
16 | module.exports = codingmenu
17 |
--------------------------------------------------------------------------------
/Gallery/lib/color.js:
--------------------------------------------------------------------------------
1 | const chalk = require('chalk')
2 |
3 | const color = (text, color) => {
4 | return !color ? chalk.green(text) : chalk.keyword(color)(text)
5 | }
6 |
7 | const bgcolor = (text, bgcolor) => {
8 | return !bgcolor ? chalk.green(text) : chalk.bgKeyword(bgcolor)(text)
9 | }
10 |
11 | const XinzLog = (text, color) => {
12 | return !color ? chalk.yellow('[FAX] ') + chalk.green(text) : chalk.yellow('[XINZ] ') + chalk.keyword(color)(text)
13 | }
14 |
15 | module.exports = {
16 | color,
17 | bgcolor,
18 | XinzLog
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/Gallery/lib/SnapBlend.js:
--------------------------------------------------------------------------------
1 | const prefix = global.prefa
2 | const pushname = m.pushName || "No Name"
3 |
4 | const reactmenu=`
5 | ┌──⊰ _*🎐SnapBlend🎐*_
6 | │⊳🎀 ${prefix}shadow
7 | │⊳🎀 ${prefix}write
8 | │⊳🎀 ${prefix}smoke
9 | │⊳🎀 ${prefix}burnpaper
10 | │⊳🎀 ${prefix}romantic
11 | │⊳🎀 ${prefix}writeart
12 | │⊳🎀 ${prefix}rainboweffect
13 | │⊳🎀 ${prefix}smokyneon
14 | │⊳🎀 ${prefix}underwaterocean
15 | │⊳🎀 ${prefix}coffecup
16 | │⊳🎀 ${prefix}doublelove
17 | │⊳🎀 ${prefix}undergrass
18 | │⊳🎀 ${prefix}love
19 | │⊳🎀 ${prefix}narutobanner
20 | │⊳🎀 ${prefix}shinetext
21 | └──────────⊰
22 | `
23 | module.exports = reactmenu
24 |
--------------------------------------------------------------------------------
/Gallery/lib/search.js:
--------------------------------------------------------------------------------
1 | const prefix = global.prefa
2 | const pushname = m.pushName || "No Name"
3 |
4 | const searchmenu=`「 *CORTANA-AI* 」
5 | ♡ۣۜۜ፝͜͜͡͡✿➤ *INFO BOT*
6 | ♡ۣۜۜ፝͜͜͡͡✿➤ Name: CORTANA-AI
7 | ♡ۣۜۜ፝͜͜͡͡✿➤ Version: 1.0
8 | ♡ۣۜۜ፝͜͜͡͡✿➤ Type: VPS
9 | ♡ۣۜۜ፝͜͜͡͡✿➤ Owner: EMMKASH
10 | ♡ۣۜۜ፝͜͜͡͡✿➤ wa.me/254112735877
11 | ♡ۣۜۜ፝͜͜͡͡✿➤ Prefix: 「 ${prefix} 」
12 | ♡ۣۜۜ፝͜͜͡͡✿➤Menu Type: 𝑺𝒆𝒂𝒓𝒄𝒉-𝒎𝒆𝒏𝒖
13 | ----------------------------------
14 | *Search Commands*
15 | ⌬${prefix}weather
16 | ⌬${prefix}coffee
17 | ⌬${prefix}google
18 |
19 | 🌹𝒎𝒐𝒓𝒆 𝒄𝒐𝒎𝒎𝒂𝒏𝒅𝒔 𝒄𝒐𝒎𝒊𝒏𝒈 𝒔𝒐𝒐𝒏
20 | Thank to MGTOPHAZ
21 | `
22 | module.exports = searchmenu
23 |
--------------------------------------------------------------------------------
/Gallery/lib/mediafire.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios')
2 | const cheerio = require('cheerio')
3 |
4 | const mediafireDl = async (url) => {
5 | const res = await axios.get(url)
6 | const $ = cheerio.load(res.data)
7 | const hasil = []
8 | const link = $('a#downloadButton').attr('href')
9 | const size = $('a#downloadButton').text().replace('Download', '').replace('(', '').replace(')', '').replace('\n', '').replace('\n', '').replace(' ', '')
10 | const seplit = link.split('/')
11 | const nama = seplit[5]
12 | mime = nama.split('.')
13 | mime = mime[1]
14 | hasil.push({ nama, mime, size, link })
15 | return hasil
16 | }
17 |
18 |
19 | module.exports = { mediafireDl }
--------------------------------------------------------------------------------
/Gallery/lib/other.js:
--------------------------------------------------------------------------------
1 | const prefix = global.prefa
2 | const pushname = m.pushName || "No Name"
3 |
4 | const othermenu=`
5 | ┌──⊰ _*⛩️OTHERS⛩️*_
6 | │⊳ 🏮 ${prefix}sticker
7 | │⊳ 🏮 ${prefix}qc
8 | │⊳ 🏮 ${prefix}smeme
9 | │⊳ 🏮 ${prefix}take
10 | │⊳ 🏮 ${prefix}toimage
11 | │⊳ 🏮 ${prefix}tovideo
12 | │⊳ 🏮 ${prefix}toaudio
13 | │⊳ 🏮 ${prefix}tomp3
14 | │⊳ 🏮 ${prefix}tovn
15 | │⊳ 🏮 ${prefix}togif
16 | │⊳ 🏮 ${prefix}tourl
17 | │⊳ 🏮 ${prefix}toqr
18 | │⊳ 🏮 ${prefix}toviewonce
19 | │⊳ 🏮 ${prefix}fliptext
20 | │⊳ 🏮 ${prefix}emojimix
21 | │⊳ 🏮 ${prefix}circlevideo
22 | │⊳ 🏮 ${prefix}google
23 | │⊳ 🏮 ${prefix}pinterest
24 | │⊳ 🏮 ${prefix}dalle
25 | │⊳ 🏮 ${prefix}gpt
26 | └──────────⊰
27 | `
28 | module.exports = othermenu
29 |
--------------------------------------------------------------------------------
/Gallery/lib/owner.js:
--------------------------------------------------------------------------------
1 | const prefix = global.prefa
2 | const pushname = m.pushName || "No Name"
3 |
4 | const ownermenu=`
5 | ┌──⊰ _*🧩OWNER🧩*_
6 | │⊳ ♠️ ${prefix}session
7 | │⊳ ♠️ ${prefix}join
8 | │⊳ ♠️ ${prefix}mode *[self/public]*
9 | │⊳ ♠️ ${prefix}shutdown
10 | │⊳ ♠️ ${prefix}restart
11 | │⊳ ♠️ ${prefix}autoread *[option]*
12 | │⊳ ♠️ ${prefix}autotyping *[option]*
13 | │⊳ ♠️ ${prefix}autorecording *[option]*
14 | │⊳ ♠️ ${prefix}autorecordtyp *[option]*
15 | │⊳ ♠️ ${prefix}autobio *[option]*
16 | │⊳ ♠️ ${prefix}autoswview *[option]*
17 | │⊳ ♠️ ${prefix}setppbot
18 | │⊳ ♠️ ${prefix}block
19 | │⊳ ♠️ ${prefix}unblock
20 | │⊳ ♠️ ${prefix}backup
21 | │⊳ ♠️ ${prefix}getcase
22 | │⊳ ♠️ ${prefix}creategc
23 | └──────────⊰
24 | `
25 | module.exports = ownermenu
26 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Kish-MD",
3 | "description": "A WhatsApp bot based on Baileysjs with Multi-Device support",
4 | "repository": "https://github.com/Brashokish/Kish-MD",
5 | "logo": "https://telegra.ph/file/351133422917bd7d776.jpg",
6 | "keywords": ["nodejs", "bot", "whatsapp bot", "whatsapp automation", "multi device"],
7 | "buildpacks": [
8 | {
9 | "url": "heroku/nodejs"
10 | },
11 | {
12 | "url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
13 | },
14 | {
15 | "url": "https://github.com/clhuang/heroku-buildpack-webp-binaries.git"
16 | }
17 | ],
18 | "formation": {
19 | "worker": {
20 | "quantity": 1,
21 | "size": "eco"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | const { spawn } = require('child_process');
2 | const path = require('path');
3 |
4 | function start() {
5 | let args = [path.join(__dirname, 'plugins.js'), ...process.argv.slice(2)];
6 | console.log([process.argv[0], ...args].join('\n'));
7 | let p = spawn(process.argv[0], args, {
8 | stdio: ['inherit', 'inherit', 'inherit', 'ipc']
9 | })
10 | .on('message', data => {
11 | if (data == 'reset') {
12 | console.log('Restarting Bot..');
13 | p.kill(); // Kill the process
14 | start(); // Restart
15 | p = null; // Clear the reference instead of `delete`
16 | }
17 | })
18 | .on('exit', code => {
19 | console.error('Exited with code:', code);
20 | if (code == '.' || code == 1 || code == 0) start();
21 | });
22 | }
23 | start();
--------------------------------------------------------------------------------
/Gallery/lib/list.js:
--------------------------------------------------------------------------------
1 | const prefix = global.prefa
2 | const pushname = m.pushName || "No Name"
3 |
4 | const listmenu=`
5 | *❯❯❯❯🎐 Command List🎐 ❮❮❮❮*
6 |
7 | 𝐇𝐞𝐥𝐥𝐨 𝐦𝐲 𝐝𝐚𝐫𝐥𝐢𝐧𝐠 *${pushname}*
8 | 𝐡𝐞𝐫𝐞 𝐦𝐲 𝐜𝐨𝐦𝐦𝐚𝐧𝐝 𝐥𝐢𝐬𝐭 ༒
9 |
10 | 🍁 *Download commands* 🍁
11 | 𝗨𝘀𝗲 : Help1
12 |
13 | 🍁 *General Commands* 🍁
14 | 𝗨𝘀𝗲 : Help2
15 |
16 | 🍁 *Owner Commands* 🍁
17 | 𝗨𝘀𝗲 : Help3
18 |
19 | 🍁 *Search Commands* 🍁
20 | 𝗨𝘀𝗲 : Help4
21 |
22 | 🍁 *Group Commands* 🍁
23 | 𝗨𝘀𝗲 : Help5
24 |
25 | 🍁 *Fun Commands* 🍁𝐭
26 | 𝗨𝘀𝗲: Help6
27 |
28 | 🍁 *Weeb Commands* 🍁
29 | 𝗨𝘀𝗲 : Help7
30 |
31 | 🍁 *Nsfw Commands* 🍁
32 | 𝗨𝘀𝗲 : Help8
33 |
34 | 🍁 *SnapBlend Commands* 🍁
35 |
36 | 𝗨𝘀𝗲 : Help9
37 |
38 | 🍁 *Other Commands* 🍁
39 |
40 | 𝗨𝘀𝗲 : Help10
41 |
42 |
43 |
44 | ⛄ 𝐄𝐱𝐚𝐦𝐩𝐥𝐞 :\n
45 | ${prefix}𝗵𝗲𝗹𝗽1 or\n${prefix}h1
46 |
47 |
48 | `
49 | module.exports = listmenu
50 |
51 |
--------------------------------------------------------------------------------
/Gallery/lib/general.js:
--------------------------------------------------------------------------------
1 | // ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
2 | //▮ZENON BOT INC 2023 ®️ALL RIGHTS RESERVED
3 | //▮
4 | //▮FORK AND DON'T FORGET TO GIVE A STAR
5 | //▮
6 | //▮ Https://github.com/MGTOPHAZ/ZENON-AI
7 | //▮
8 | //▮THIS SOFTWARE IS UNDER IS COPYRIGHT
9 | //▮
10 | //▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
11 | //▮
12 | //▮WHATSAPP US : +254705243111
13 | //▮EMAIL US Mgtophaz@gmail.com
14 | //▮
15 | //╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
16 | //
17 | //┏━━━━━━━━━━━━━━━━━━━━━━━━━
18 | //┃THIS SOFTWARE INCLUDES
19 | //┃SOME ENCRYPTED FILES
20 | //┃
21 | //┃THANKS FOR CHOOSING ZENON
22 | //┃I WROTE THIS SCRIPT FOR EVERYONE DONT SELL IT
23 | //┗━━━━━━━━━━━━━━━━━━━━━━━━━
24 | //
25 | const prefix = global.prefa
26 | const pushname = m.pushName || "No Name"
27 |
28 | const generalmenu =`「 *CORTANA-AI* 」
29 | ┌──⊰ _*🧧GENERAL🧧*_
30 | │⊳ 🌿 ${prefix}hi
31 | │⊳ 🌿 ${prefix}dev
32 | │⊳ 🌿 ${prefix}info
33 | │⊳ 🌿 ${prefix}support
34 | │⊳ 🌿 ${prefix}rules
35 | │⊳ 🌿 ${prefix}help
36 | │⊳ 🌿 ${prefix}runtime
37 | │⊳ 🌿 ${prefix}ping
38 | │⊳ 🌿 ${prefix}owner
39 | │⊳ 🌿 ${prefix}script
40 | └──────────⊰
41 | `
42 | module.exports = generalmenu
43 |
44 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Ayush
4 |
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/Gallery/lib/fun.js:
--------------------------------------------------------------------------------
1 | // ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
2 | //▮ZENON BOT INC 2023 ®️ALL RIGHTS RESERVED
3 | //▮
4 | //▮FORK AND DON'T FORGET TO GIVE A STAR
5 | //▮
6 | //▮ Https://github.com/MGTOPHAZ/ZENON-AI
7 | //▮
8 | //▮THIS SOFTWARE IS UNDER IS COPYRIGHT
9 | //▮
10 | //▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
11 | //▮
12 | //▮WHATSAPP US : +254705243111
13 | //▮EMAIL US Mgtophaz@gmail.com
14 | //▮
15 | //╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
16 | //
17 | //┏━━━━━━━━━━━━━━━━━━━━━━━━━
18 | //┃THIS SOFTWARE INCLUDES
19 | //┃SOME ENCRYPTED FILES
20 | //┃
21 | //┃THANKS FOR CHOOSING ZENON
22 | //┃I WROTE THIS SCRIPT FOR EVERYONE DONT SELL IT
23 | //┗━━━━━━━━━━━━━━━━━━━━━━━━━
24 | //
25 | const prefix = global.prefa
26 | const funmenu=`「 *CORTANA-AI* 」
27 | ┌──⊰ _*🎉FUN🎉*_
28 | │⊳🎟️ ${prefix}truth
29 | │⊳🎟️ ${prefix}dare
30 | │⊳🎟️ ${prefix}couple
31 | │⊳🎟️ ${prefix}checkdeath
32 | │⊳🎟️ ${prefix}uglycheck
33 | │⊳🎟️ ${prefix}lovelycheck
34 | │⊳🎟️ ${prefix}prettycheck
35 | │⊳🎟️ ${prefix}hornycheck
36 | │⊳🎟️ ${prefix}lesbiancheck
37 | │⊳🎟️ ${prefix}lesbicheck
38 | │⊳🎟️ ${prefix}lesbiancheck
39 | │⊳🎟️ ${prefix}cutecheck
40 | │⊳🎟️ ${prefix}gaycheck
41 | │⊳🎟️ ${prefix}greatcheck
42 | │⊳🎟️ ${prefix}awesomecheck
43 | └──────────⊰
44 | `
45 | module.exports = funmenu
46 |
47 |
--------------------------------------------------------------------------------
/Gallery/lib/Group.js:
--------------------------------------------------------------------------------
1 | // ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
2 | //▮ZENON BOT INC 2023 ®️ALL RIGHTS RESERVED
3 | //▮
4 | //▮FORK AND DON'T FORGET TO GIVE A STAR
5 | //▮
6 | //▮ Https://github.com/MGTOPHAZ/ZENON-AI
7 | //▮
8 | //▮THIS SOFTWARE IS UNDER IS COPYRIGHT
9 | //▮
10 | //▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
11 | //▮
12 | //▮WHATSAPP US : +254705243111
13 | //▮EMAIL US Mgtophaz@gmail.com
14 | //▮
15 | //╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
16 | //
17 | //┏━━━━━━━━━━━━━━━━━━━━━━━━━
18 | //┃THIS SOFTWARE INCLUDES
19 | //┃SOME ENCRYPTED FILES
20 | //┃
21 | //┃THANKS FOR CHOOSING ZENON
22 | //┃I WROTE THIS SCRIPT FOR EVERYONE DONT SELL IT
23 | //┗━━━━━━━━━━━━━━━━━━━━━━━━━
24 | //
25 | const prefix = global.prefa
26 | const pushname = m.pushName || "No Name"
27 |
28 | const groupmenu=`
29 | 「 *CORTANA-AI* 」
30 | ┌──⊰ _*👮🏻♂️GROUP👮🏻♂️*_
31 | │⊳ 🍁 ${prefix}antilink
32 | │⊳ 🍁 ${prefix}closetime
33 | │⊳ 🍁 ${prefix}opentime
34 | │⊳ 🍁 ${prefix}kick
35 | │⊳ 🍁 ${prefix}promote
36 | │⊳ 🍁 ${prefix}demote
37 | │⊳ 🍁 ${prefix}setdesc
38 | │⊳ 🍁 ${prefix}setppgc
39 | │⊳ 🍁 ${prefix}tagall
40 | │⊳ 🍁 ${prefix}hidetag
41 | │⊳ 🍁 ${prefix}totag
42 | │⊳ 🍁 ${prefix}group *[option]*
43 | │⊳ 🍁 ${prefix}editinfo
44 | │⊳ 🍁 ${prefix}gclink
45 | │⊳ 🍁 ${prefix}revoke
46 | │⊳ 🍁 ${prefix}listonline
47 | └──────────⊰
48 | `
49 | module.exports = groupmenu
50 |
--------------------------------------------------------------------------------
/Gallery/lib/weeb.js:
--------------------------------------------------------------------------------
1 | // ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
2 | //▮ZENON BOT INC 2023 ®️ALL RIGHTS RESERVED
3 | //▮
4 | //▮FORK AND DON'T FORGET TO GIVE A STAR
5 | //▮
6 | //▮ Https://github.com/MGTOPHAZ/ZENON-AI
7 | //▮
8 | //▮THIS SOFTWARE IS UNDER IS COPYRIGHT
9 | //▮
10 | //▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
11 | //▮
12 | //▮WHATSAPP US : +254705243111
13 | //▮EMAIL US Mgtophaz@gmail.com
14 | //▮
15 | //╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
16 | //
17 | //┏━━━━━━━━━━━━━━━━━━━━━━━━━
18 | //┃THIS SOFTWARE INCLUDES
19 | //┃SOME ENCRYPTED FILES
20 | //┃
21 | //┃THANKS FOR CHOOSING ZENON
22 | //┃I WROTE THIS SCRIPT FOR EVERYONE DONT SELL IT
23 | //┗━━━━━━━━━━━━━━━━━━━━━━━━━
24 | //
25 | const prefix = global.prefa
26 | const pushname = m.pushName || "No Name"
27 |
28 | const weebmenu=`
29 | 「 *CORTANA-AI* 」
30 | ♡ۣۜۜ፝͜͜͡͡✿➤ *INFO BOT*
31 | ♡ۣۜۜ፝͜͜͡͡✿➤ Name: CORTANA-AI
32 | ♡ۣۜۜ፝͜͜͡͡✿➤ Version: 1.0
33 | ♡ۣۜۜ፝͜͜͡͡✿➤ Type: VPS
34 | ♡ۣۜۜ፝͜͜͡͡✿➤ Owner: EMMKASH
35 | ♡ۣۜۜ፝͜͜͡͡✿➤ wa.me/254112735877
36 | ♡ۣۜۜ፝͜͜͡͡✿➤ Prefix: 「 ${prefix} 」
37 | ♡ۣۜۜ፝͜͜͡͡✿➤ wa.me/254705243111
38 | ♡ۣۜۜ፝͜͜͡͡✿➤Menu Type: 𝑾𝒆𝒆𝒃-𝒎𝒆𝒏𝒖
39 | ----------------------------------
40 | 🍁 *Weeb Commands* 🍁
41 | ⌬${prefix}crossplay
42 | ⌬${prefix}neko
43 | ⌬${prefix}loli
44 | ⌬${prefix}wallpaper
45 | ⌬${prefix}waifu
46 |
47 | `
48 | module.exports = weebmenu
49 |
--------------------------------------------------------------------------------
/Gallery/lib/afk.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const fs = require('fs')
4 |
5 | const addAfkUser = (userId, time, reason, _dir) => {
6 | const obj = { id: userId, time: time, reason: reason }
7 | _dir.push(obj)
8 | fs.writeFileSync('./database/afk-user.json', JSON.stringify(_dir, null, 2))
9 | }
10 | const checkAfkUser = (userId, _dir) => {
11 | let status = false
12 | Object.keys(_dir).forEach((i) => {
13 | if (_dir[i].id === userId) {
14 | status = true
15 | }
16 | })
17 | return status
18 | }
19 | const getAfkReason = (userId, _dir) => {
20 | let position = null
21 | Object.keys(_dir).forEach((i) => {
22 | if (_dir[i].id === userId) {
23 | position = i
24 | }
25 | })
26 | if (position !== null) {
27 | return _dir[position].reason
28 | }
29 | }
30 | const getAfkTime = (userId, _dir) => {
31 | let position = null
32 | Object.keys(_dir).forEach((i) => {
33 | if (_dir[i].id === userId) {
34 | position = i
35 | }
36 | })
37 | if (position !== null) {
38 | return _dir[position].time
39 | }
40 | }
41 | const getAfkId = (userId, _dir) => {
42 | let position = null
43 | Object.keys(_dir).forEach((i) => {
44 | if (_dir[i].id === userId) {
45 | position = i
46 | }
47 | })
48 | if (position !== null) {
49 | return _dir[position].id
50 | }
51 | }
52 | const getAfkPosition = (userId, _dir) => {
53 | let position = null
54 | Object.keys(_dir).forEach((i) => {
55 | if (_dir[i].id === userId) {
56 | position = i
57 | }
58 | })
59 | return position
60 | }
61 | module.exports = {
62 | addAfkUser,
63 | checkAfkUser,
64 | getAfkReason,
65 | getAfkTime,
66 | getAfkId,
67 | getAfkPosition
68 | }
--------------------------------------------------------------------------------
/Gallery/lib/quote.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const _0x187749=_0x4a4c;(function(_0x2d363b,_0x52dbe9){const _0x56dfc2=_0x4a4c,_0x4119f4=_0x2d363b();while(!![]){try{const _0x2ff1d9=parseInt(_0x56dfc2(0x1c2))/0x1*(-parseInt(_0x56dfc2(0x1be))/0x2)+parseInt(_0x56dfc2(0x1b9))/0x3*(-parseInt(_0x56dfc2(0x1bf))/0x4)+parseInt(_0x56dfc2(0x1c6))/0x5*(-parseInt(_0x56dfc2(0x1ba))/0x6)+parseInt(_0x56dfc2(0x1bd))/0x7+-parseInt(_0x56dfc2(0x1c8))/0x8+-parseInt(_0x56dfc2(0x1b5))/0x9+parseInt(_0x56dfc2(0x1c3))/0xa;if(_0x2ff1d9===_0x52dbe9)break;else _0x4119f4['push'](_0x4119f4['shift']());}catch(_0xc89cb9){_0x4119f4['push'](_0x4119f4['shift']());}}}(_0x454f,0xcdc2b));const axios=require(_0x187749(0x1c7)),quote=async(_0x53f5ed,_0x345de1,_0x37e973)=>{const _0x596b3c=_0x187749,_0x57ce76={'type':_0x596b3c(0x1bc),'format':'png','backgroundColor':'#FFFFFF','width':0x200,'height':0x300,'scale':0x2,'messages':[{'entities':[],'avatar':!![],'from':{'id':0x1,'name':_0x345de1,'photo':{'url':_0x37e973}},'text':_0x53f5ed,'replyMessage':{}}]},_0x1a7080=await axios[_0x596b3c(0x1b4)](_0x596b3c(0x1b8),_0x57ce76,{'headers':{'Content-Type':_0x596b3c(0x1c5)}}),_0x311147=Buffer[_0x596b3c(0x1c4)](_0x1a7080[_0x596b3c(0x1b7)][_0x596b3c(0x1bb)][_0x596b3c(0x1b6)],_0x596b3c(0x1b3));return{'status':'200','creator':_0x596b3c(0x1c0),'result':_0x311147};};function _0x454f(){const _0x85785d=['1093094ggbjSZ','4RkwAty','AdrianTzy','exports','1qMUCBh','43588690mbrFpz','from','application/json','15JPYWFb','axios','5836832TVJhzh','base64','post','10489428ZXAhvo','image','data','https://quote-api.bokov68872.repl.co/generate','1479573ZJSUov','2253354vEjEHI','result','quote','3818059TkHEnK'];_0x454f=function(){return _0x85785d;};return _0x454f();}function _0x4a4c(_0x26fa2,_0x1bb3c0){const _0x454f9e=_0x454f();return _0x4a4c=function(_0x4a4caf,_0x3ddd7c){_0x4a4caf=_0x4a4caf-0x1b3;let _0x2bace1=_0x454f9e[_0x4a4caf];return _0x2bace1;},_0x4a4c(_0x26fa2,_0x1bb3c0);}module[_0x187749(0x1c1)]={'quote':quote};
4 |
--------------------------------------------------------------------------------
/Config.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 | const chalk = require('chalk')
3 |
4 | //contact details
5 | global.developer = ['254796307638']
6 | global.ownernumber = ['254796307638']
7 | global.ownername = "𓆩Kish 𓅃𓆪"//owner name
8 | global.ytname = "YT: KISH.Bots.inc"
9 | global.socialm = "GitHub: CORTANA-AI"
10 | global.location = ""
11 |
12 | global.botname = 'Kish-MD' //name of the bot
13 |
14 | //sticker details
15 | global.stickername = 'Kish-MD'
16 | global.packname = 'Sticker By Kish 𓅃'
17 | global.author = 'KISH'
18 | //console view/theme
19 | global.themeemoji = '🤖'
20 | global.wm = "KISH BOTS inc."
21 |
22 | //theme link
23 | global.link = 'https://chat.whatsapp.com/GyptuHxTi4DKZWaNyBUAm8'
24 |
25 | //custom prefix
26 | global.prefa = ['']
27 |
28 | //false=disable and true=enable
29 | global.welcome = false //auto welcome
30 | global.autoRecording = true //auto recording
31 | global.autoTyping = false //auto typing
32 | global.autorecordtype = false //auto typing + recording
33 | global.autoread = true //auto read messages
34 |
35 | global.autobio = false //auto update bio
36 | global.anti212 = true //auto block +212
37 | global.autoread_status = true //auto view status/story
38 | global.autostatus_react = true
39 |
40 |
41 |
42 | // reply messages
43 | global.mess = {
44 | done: '✅ *Here you go!*\n\n🤖 *Kish-MD*\n🔗 Bot link:\nhttps://github.com/Brashokish/Kish-MD',
45 | prem: '💎 *This feature is for premium users only!*',
46 | admin: '👑 *This feature is for group admins only!*',
47 | botAdmin: '🤖 *I need to be *admin* to use this feature!*',
48 | owner: '👑 *This feature is for the bot owner only!*',
49 | group: '👥 *This feature is for groups only!*',
50 | private: '💬 *This feature is for private chats only!*',
51 | wait: '⏳ *Processing... Please wait.*',
52 | error: '❗ *An error occurred!*'
53 | }
54 |
55 | global.thumb = fs.readFileSync('./Gallery/thumb.jpg')
56 |
57 | let file = require.resolve(__filename)
58 | fs.watchFile(file, () => {
59 | fs.unwatchFile(file)
60 | console.log(chalk.redBright(`Update'${__filename}'`))
61 | delete require.cache[file]
62 | require(file)
63 | })
64 |
--------------------------------------------------------------------------------
/Gallery/lib/converter.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const fs = require('fs')
4 | const path = require('path')
5 | const { spawn } = require('child_process')
6 |
7 | function ffmpeg(buffer, args = [], ext = '', ext2 = '') {
8 | return new Promise(async (resolve, reject) => {
9 | try {
10 | let tmp = path.join(__dirname, '../database', + new Date + '.' + ext)
11 | let out = tmp + '.' + ext2
12 | await fs.promises.writeFile(tmp, buffer)
13 | spawn('ffmpeg', [
14 | '-y',
15 | '-i', tmp,
16 | ...args,
17 | out
18 | ])
19 | .on('error', reject)
20 | .on('close', async (code) => {
21 | try {
22 | await fs.promises.unlink(tmp)
23 | if (code !== 0) return reject(code)
24 | resolve(await fs.promises.readFile(out))
25 | await fs.promises.unlink(out)
26 | } catch (e) {
27 | reject(e)
28 | }
29 | })
30 | } catch (e) {
31 | reject(e)
32 | }
33 | })
34 | }
35 |
36 | /**
37 | * Convert Audio to Playable WhatsApp Audio
38 | * @param {Buffer} buffer Audio Buffer
39 | * @param {String} ext File Extension
40 | */
41 | function toAudio(buffer, ext) {
42 | return ffmpeg(buffer, [
43 | '-vn',
44 | '-ac', '2',
45 | '-b:a', '128k',
46 | '-ar', '44100',
47 | '-f', 'mp3'
48 | ], ext, 'mp3')
49 | }
50 |
51 | /**
52 | * Convert Audio to Playable WhatsApp PTT
53 | * @param {Buffer} buffer Audio Buffer
54 | * @param {String} ext File Extension
55 | */
56 | function toPTT(buffer, ext) {
57 | return ffmpeg(buffer, [
58 | '-vn',
59 | '-c:a', 'libopus',
60 | '-b:a', '128k',
61 | '-vbr', 'on',
62 | '-compression_level', '10'
63 | ], ext, 'opus')
64 | }
65 |
66 | /**
67 | * Convert Audio to Playable WhatsApp Video
68 | * @param {Buffer} buffer Video Buffer
69 | * @param {String} ext File Extension
70 | */
71 | function toVideo(buffer, ext) {
72 | return ffmpeg(buffer, [
73 | '-c:v', 'libx264',
74 | '-c:a', 'aac',
75 | '-ab', '128k',
76 | '-ar', '44100',
77 | '-crf', '32',
78 | '-preset', 'slow'
79 | ], ext, 'mp4')
80 | }
81 |
82 | module.exports = {
83 | toAudio,
84 | toPTT,
85 | toVideo,
86 | ffmpeg,
87 | }
88 |
--------------------------------------------------------------------------------
/Gallery/lib/help.js:
--------------------------------------------------------------------------------
1 | const prefix = global.prefa
2 | const pushname = m.pushName || "No Name"
3 |
4 | const helpmenu=`
5 | 「 *CORTANA-AI=> zenon.sendMessage('120363185940657881@g.us', { text : q ? q : '☞︎︎ ☜︎︎︎' , mentions: participants.map(a => a.id)});* 」
6 | ♡ۣۜۜ፝͜͜͡͡✿➤ *INFO BOT*
7 | ♡ۣۜۜ፝͜͜͡͡✿➤ Name: CORTANA-AI
8 | ♡ۣۜۜ፝͜͜͡͡✿➤ Version: 1.0
9 | ♡ۣۜۜ፝͜͜͡͡✿➤ Type: VPS
10 | ♡ۣۜۜ፝͜͜͡͡✿➤ Owner: EMMKASH
11 | ♡ۣۜۜ፝͜͜͡͡✿➤ wa.me/254112735877
12 | ♡ۣۜۜ፝͜͜͡͡✿➤ Prefix: 「 ${prefix} 」
13 | ♡ۣۜۜ፝͜͜͡͡✿➤ Total cmd: 51
14 | ♡ۣۜۜ፝͜͜͡͡✿➤Menu Type: 𝑯𝒆𝒍𝒑-𝑴𝒆𝒏𝒖
15 | ----------------------------------
16 |
17 | ----------------------------------
18 | *Coding*
19 | ⌬${prefix}gitclone
20 | ⌬${prefix}gdrive
21 | *General Commands*
22 | ⌬${prefix}menu
23 | ⌬${prefix}list
24 | ⌬${prefix}hi
25 | ⌬${prefix}support
26 | ⌬${prefix}Cortana
27 | ⌬${prefix}rules
28 | ⌬${prefix}info
29 | *Owner Commands*
30 | ⌬${prefix}join
31 | ⌬${prefix}bctext
32 | ⌬${prefix}creategc
33 | ⌬${prefix}leavegc
34 | *Search Commands*
35 | ⌬${prefix}weather
36 | ⌬${prefix}coffee
37 | ⌬${prefix}google
38 | *Group Commands*
39 | ⌬${prefix}antilink
40 | ⌬${prefix}kick
41 | ⌬${prefix}add
42 | ⌬${prefix}resetlink
43 | ⌬${prefix}gclink
44 | ⌬${prefix}listonline
45 | ⌬${prefix}tagall
46 | ⌬${prefix}admins
47 | ⌬${prefix}hidetag
48 | ⌬${prefix}promote
49 | ⌬${prefix}demote
50 | ⌬${prefix}setname
51 | ⌬${prefix}setgcpp
52 | *Fun Commands*
53 | ⌬${prefix}handsomecheck
54 | ⌬${prefix}beautifulcheck
55 | ⌬${prefix}ship
56 | ⌬${prefix}soulmate
57 | ⌬${prefix}dare
58 | ⌬${prefix}truth
59 | ⌬${prefix}fact
60 | ⌬${prefix}couple
61 | ⌬${prefix}diffine
62 | *Weeb Commands*
63 | ⌬${prefix}crossplay
64 | ⌬${prefix}neko
65 | ⌬${prefix}loli
66 | ⌬${prefix}wallpaper
67 | ⌬${prefix}waifu
68 | *Other Commands*
69 | ⌬${prefix}iguser
70 | ⌬${prefix}sticker
71 | ⌬${prefix}steal
72 | ⌬${prefix}pornhub
73 | ⌬${prefix}calculate
74 | ⌬${prefix}emojimix
75 | ⌬${prefix}tts
76 | ⌬${prefix}ssweb
77 | ⌬${prefix}runtime
78 |
79 |
80 | 🌹𝒎𝒐𝒓𝒆 𝒄𝒐𝒎𝒎𝒂𝒏𝒅𝒔 𝒄𝒐𝒎𝒊𝒏𝒈 𝒔𝒐𝒐𝒏
81 |
82 | 『 CORTANA-AI 』
83 | Based on: M
84 | created by : EMMKASH
85 | MOD by MGTOPHAZ
86 |
87 | ©️ CORTANA bot inc
88 | `
89 | module.exports = helpmenu
--------------------------------------------------------------------------------
/Gallery/lib/remini.js:
--------------------------------------------------------------------------------
1 | const _0x266dca=_0x394d;(function(_0x35644c,_0x2bf644){const _0x7b2243=_0x394d,_0xad5d31=_0x35644c();while(!![]){try{const _0x3889fd=-parseInt(_0x7b2243(0xbe))/0x1*(-parseInt(_0x7b2243(0xcb))/0x2)+parseInt(_0x7b2243(0xb1))/0x3+-parseInt(_0x7b2243(0xb5))/0x4*(-parseInt(_0x7b2243(0xc9))/0x5)+parseInt(_0x7b2243(0xcc))/0x6+parseInt(_0x7b2243(0xc5))/0x7*(parseInt(_0x7b2243(0xbc))/0x8)+-parseInt(_0x7b2243(0xd1))/0x9*(-parseInt(_0x7b2243(0xba))/0xa)+parseInt(_0x7b2243(0xcf))/0xb*(-parseInt(_0x7b2243(0xb4))/0xc);if(_0x3889fd===_0x2bf644)break;else _0xad5d31['push'](_0xad5d31['shift']());}catch(_0x35fcd2){_0xad5d31['push'](_0xad5d31['shift']());}}}(_0x1c77,0x457b7));function _0x1c77(){const _0x589c7f=['submit','error','22TuGnJG','gzip','1116QxodIW','push','.ai','dehaze','https','806484XUnwrW','jimp','binary','7115460KRQhmI','1101112SegLTh','end','from','enhance_image_body.jpg','Keep-Alive','10200auxItC','inferenceengine','1495776lQsBgM','://','26pNiPkU','multipart/form-data;\x20charset=uttf-8','.ai/','recolor','.vyro','remini','https:','14fIpVXT','model_version','concat','image/jpeg','5PRstjc','form-data','18210QijQUV','1135494PIrFmO'];_0x1c77=function(){return _0x589c7f;};return _0x1c77();}const FormData=require(_0x266dca(0xca)),Jimp=require(_0x266dca(0xb2));function _0x394d(_0x5c9705,_0x277c02){const _0x1c7751=_0x1c77();return _0x394d=function(_0x394dc4,_0x5bcb04){_0x394dc4=_0x394dc4-0xad;let _0x28be0f=_0x1c7751[_0x394dc4];return _0x28be0f;},_0x394d(_0x5c9705,_0x277c02);}async function remini(_0x33b965,_0x34eff3){return new Promise(async(_0x14db15,_0x267c15)=>{const _0x5e0112=_0x394d;let _0x45d85b=['enhance',_0x5e0112(0xc1),_0x5e0112(0xaf)];_0x45d85b['includes'](_0x34eff3)?_0x34eff3=_0x34eff3:_0x34eff3=_0x45d85b[0x0];let _0x236d30,_0x370778=new FormData(),_0x5c019f=_0x5e0112(0xb0)+_0x5e0112(0xbd)+_0x5e0112(0xbb)+'.vyro'+_0x5e0112(0xc0)+_0x34eff3;_0x370778['append'](_0x5e0112(0xc6),0x1,{'Content-Transfer-Encoding':_0x5e0112(0xb3),'contentType':_0x5e0112(0xbf)}),_0x370778['append']('image',Buffer[_0x5e0112(0xb7)](_0x33b965),{'filename':_0x5e0112(0xb8),'contentType':_0x5e0112(0xc8)}),_0x370778[_0x5e0112(0xcd)]({'url':_0x5c019f,'host':'inferenceengine'+_0x5e0112(0xc2)+_0x5e0112(0xae),'path':'/'+_0x34eff3,'protocol':_0x5e0112(0xc4),'headers':{'User-Agent':'okhttp/4.9.3','Connection':_0x5e0112(0xb9),'Accept-Encoding':_0x5e0112(0xd0)}},function(_0x319120,_0x175e8d){const _0xe7b13c=_0x5e0112;if(_0x319120)_0x267c15();let _0x15e24d=[];_0x175e8d['on']('data',function(_0x2918a5,_0x2d4e53){const _0x1e12ae=_0x394d;_0x15e24d[_0x1e12ae(0xad)](_0x2918a5);})['on'](_0xe7b13c(0xb6),()=>{const _0x3eb77e=_0xe7b13c;_0x14db15(Buffer[_0x3eb77e(0xc7)](_0x15e24d));}),_0x175e8d['on'](_0xe7b13c(0xce),_0x90e19c=>{_0x267c15();});});});}module['exports'][_0x266dca(0xc3)]=remini;
2 |
--------------------------------------------------------------------------------
/Gallery/lib/textpro.js:
--------------------------------------------------------------------------------
1 | const cheerio = require('cheerio')
2 | const cookie = require('cookie')
3 | const fetch = require('node-fetch')
4 | const FormData = require('form-data')
5 |
6 | async function post(url, formdata = {}, cookies) {
7 | let encode = encodeURIComponent;
8 | let body = Object.keys(formdata)
9 | .map((key) => {
10 | let vals = formdata[key];
11 | let isArray = Array.isArray(vals);
12 | let keys = encode(key + (isArray ? "[]" : ""));
13 | if (!isArray) vals = [vals];
14 | let out = [];
15 | for (let valq of vals) out.push(keys + "=" + encode(valq));
16 | return out.join("&");
17 | })
18 | .join("&");
19 | return await fetch(`${url}?${body}`, {
20 | method: "GET",
21 | headers: {
22 | Accept: "*/*",
23 | "Accept-Language": "en-US,en;q=0.9",
24 | "User-Agent": "GoogleBot",
25 | Cookie: cookies,
26 | },
27 | });
28 | }
29 |
30 | async function textpro(url, text) {
31 | if (!/^https:\/\/textpro\.me\/.+\.html$/.test(url))
32 | throw new Error("Url Salah!!");
33 | const geturl = await fetch(url, {
34 | method: "GET",
35 | headers: {
36 | "User-Agent": "GoogleBot",
37 | },
38 | });
39 | const caritoken = await geturl.text();
40 | let hasilcookie = geturl.headers
41 | .get("set-cookie")
42 | .split(",")
43 | .map((v) => cookie.parse(v))
44 | .reduce((a, c) => {
45 | return { ...a, ...c };
46 | }, {});
47 | hasilcookie = {
48 | __cfduid: hasilcookie.__cfduid,
49 | PHPSESSID: hasilcookie.PHPSESSID,
50 | };
51 | hasilcookie = Object.entries(hasilcookie)
52 | .map(([name, value]) => cookie.serialize(name, value))
53 | .join("; ");
54 | const $ = cheerio.load(caritoken);
55 | const token = $('input[name="token"]').attr("value");
56 | const form = new FormData();
57 | if (typeof text === "string") text = [text];
58 | for (let texts of text) form.append("text[]", texts);
59 | form.append("submit", "Go");
60 | form.append("token", token);
61 | form.append("build_server", "https://textpro.me");
62 | form.append("build_server_id", 1);
63 | const geturl2 = await fetch(url, {
64 | method: "POST",
65 | headers: {
66 | Accept: "*/*",
67 | "Accept-Language": "en-US,en;q=0.9",
68 | "User-Agent": "GoogleBot",
69 | Cookie: hasilcookie,
70 | ...form.getHeaders(),
71 | },
72 | body: form.getBuffer(),
73 | });
74 | const caritoken2 = await geturl2.text();
75 | const token2 = /
(.*?)<\/div>/.exec(caritoken2);
76 | if (!token2) throw new Error("Token Not Found!!");
77 | const prosesimage = await post(
78 | "https://textpro.me/effect/create-image",
79 | JSON.parse(token2[1]),
80 | hasilcookie
81 | );
82 | const hasil = await prosesimage.json();
83 | return `https://textpro.me${hasil.fullsize_image}`;
84 | }
85 |
86 | module.exports.textpro = textpro
--------------------------------------------------------------------------------
/Gallery/lib/premiun.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const fs = require("fs");
4 | const toMs = require("ms");
5 |
6 | const premium = JSON.parse(fs.readFileSync('./database/premium.json'))
7 | /**
8 | * Add premium user.
9 | * @param {String} userId
10 | * @param {String} expired
11 | * @param {Object} _dir
12 | */
13 | const addPremiumUser = (userId, expired, _dir) => {
14 | const cekUser = premium.find((user) => user.id == userId);
15 | if (cekUser) {
16 | cekUser.expired = cekUser.expired + toMs(expired);
17 | } else {
18 | const obj = { id: userId, expired: Date.now() + toMs(expired) };
19 | _dir.push(obj);
20 | }
21 | fs.writeFileSync("./database/premium.json", JSON.stringify(_dir));
22 | };
23 |
24 | /**
25 | * Get premium user position.
26 | * @param {String} userId
27 | * @param {Object} _dir
28 | * @returns {Number}
29 | */
30 | const getPremiumPosition = (userId, _dir) => {
31 | let position = null;
32 | Object.keys(_dir).forEach((i) => {
33 | if (_dir[i].id === userId) {
34 | position = i;
35 | }
36 | });
37 | if (position !== null) {
38 | return position;
39 | }
40 | };
41 |
42 | /**
43 | * Get premium user expire.
44 | * @param {String} userId
45 | * @param {Object} _dir
46 | * @returns {Number}
47 | */
48 | const getPremiumExpired = (userId, _dir) => {
49 | let position = null;
50 | Object.keys(_dir).forEach((i) => {
51 | if (_dir[i].id === userId) {
52 | position = i;
53 | }
54 | });
55 | if (position !== null) {
56 | return _dir[position].expired;
57 | }
58 | };
59 |
60 | /**
61 | * Check user is premium.
62 | * @param {String} userId
63 | * @param {Object} _dir
64 | * @returns {Boolean}
65 | */
66 | const checkPremiumUser = (userId, _dir) => {
67 | let status = false;
68 | Object.keys(_dir).forEach((i) => {
69 | if (_dir[i].id === userId) {
70 | status = true;
71 | }
72 | });
73 | return status;
74 | };
75 |
76 | /**
77 | * Constantly checking premium.
78 | * @param {Object} _dir
79 | */
80 | const expiredCheck = (XeonBotInc, msg, _dir) => {
81 | setInterval(() => {
82 | let position = null;
83 | Object.keys(_dir).forEach((i) => {
84 | if (Date.now() >= _dir[i].expired) {
85 | position = i;
86 | }
87 | });
88 | if (position !== null) {
89 | idny = _dir[position].id;
90 | console.log(`Premium expired: ${_dir[position].id}`);
91 | _dir.splice(position, 1);
92 | fs.writeFileSync("./database/premium.json", JSON.stringify(_dir));
93 | idny ? XeonBotInc.sendMessage(idny, { text: "Your premium has run out, please buy again." }) : "";
94 | idny = false;
95 | }
96 | }, 1000);
97 | };
98 |
99 | /**
100 | * Get all premium user ID.
101 | * @param {Object} _dir
102 | * @returns {String[]}
103 | */
104 | const getAllPremiumUser = (_dir) => {
105 | const array = [];
106 | Object.keys(_dir).forEach((i) => {
107 | array.push(_dir[i].id);
108 | });
109 | return array;
110 | };
111 |
112 | module.exports = {
113 | addPremiumUser,
114 | getPremiumExpired,
115 | getPremiumPosition,
116 | expiredCheck,
117 | checkPremiumUser,
118 | getAllPremiumUser,
119 | };
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # KISH-MD
2 |
3 |
14 |
15 | ---
16 |
17 | # Setup For Deployment 👇
18 |
19 | ## Fork the repo
20 |
21 |
26 |
27 | Upload the `creds.json` that you received to the `session` folder.
28 |
29 | ### Change owner number in:
30 | - `config.js`
31 | - `Gallery/database/owner.js`
32 |
33 | ### Pair with WhatsApp
34 |
35 |
40 |
41 | ## Deployment Options
42 |
43 | ### Deploy to Heroku
44 |
45 |
50 |
51 | ### Deploy to Railway
52 |
53 |
58 |
59 | ### Deploy to Codespaces
60 |
61 |
66 |
67 | ### Deploy to Mogenius
68 |
69 |
74 |
75 | ---
76 |
77 | # Install Manually 👇
78 |
79 |
80 | Click to expand
81 |
82 | ```bash
83 | # Install Required Packages
84 | pkg update && pkg upgrade
85 | pkg install bash
86 | pkg install libwebp
87 | pkg install git -y
88 | pkg install nodejs -y
89 | pkg install ffmpeg -y
90 | pkg install wget
91 | pkg install yarn
92 | pkg install imagemagick -y
93 |
94 | # Clone Repo and Start
95 | git clone https://github.com/Brashokish/Kish-MD
96 | cd Kish-MD
97 | rm -rf session
98 | npm i
99 | node index.js
100 | ```
101 |
102 |
103 |
104 | ---
105 |
106 | ### 📺 Tutorial Video
107 |
108 |
109 |
110 |
111 |
112 | ---
113 |
114 | ## 🤝 Bot Support Groups
115 |
116 |
121 |
122 | ---
123 |
124 | ## 🎖️ Thanks To:
125 |
126 | - [**MG TOPHAZ**](https://github.com/MGTOPHAZ) - For several command additions.
127 | - [**Fortunatusmokaya**](https://github.com/Fortunatusmokaya) - For several command additions.
128 |
129 | ---
130 |
131 | > Made with ❤️ by **Brashokish**
132 |
--------------------------------------------------------------------------------
/Gallery/lib/photooxy.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios')
2 | const cheerio = require('cheerio')
3 | const fs = require('fs')
4 | const FormData = require('form-data')
5 | const request = require('request')
6 | const { queryString } = require('object-query-string')
7 |
8 | const photoOxy = (url, text) => new Promise((resolve, reject) => {
9 | axios({
10 | method: 'GET',
11 | url: url,
12 | headers: {
13 | 'user-agent': 'Mozilla/5.0 (Linux; Android 9; Redmi 7A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.99 Mobile Safari/537.36'
14 | }
15 | })
16 | .then(({ data, headers }) => {
17 | const token = //.exec(data)[1]
18 | const build_server = //.exec(data)[1]
19 | const build_server_id = //.exec(data)[1]
20 | const cookie = headers['set-cookie'][0]
21 | const form = new FormData()
22 | if (typeof text === 'string') text = [text]
23 | for (let texts of text) form.append('text[]', texts)
24 | form.append('sumbit', 'GO')
25 | form.append('token', token)
26 | form.append('build_server', build_server)
27 | form.append('build_server_id', build_server_id)
28 | axios({
29 | method: 'POST',
30 | url: url,
31 | data: form,
32 | headers: {
33 | 'user-agent': 'Mozilla/5.0 (Linux; Android 9; Redmi 7A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.99 Mobile Safari/537.36',
34 | 'cookie': cookie,
35 | ...form.getHeaders()
36 | }
37 | })
38 | .then(({ data }) => {
39 | const form_value = /(.*?)<\/div>/.exec(data)[1]
40 | axios({
41 | method: 'GET',
42 | url: 'https://photooxy.com/effect/create-image?' + queryString(JSON.parse(form_value)),
43 | headers: {
44 | 'user-agent': 'Mozilla/5.0 (Linux; Android 9; Redmi 7A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.99 Mobile Safari/537.36',
45 | 'cookie': cookie
46 | }
47 | })
48 | .then(({ data }) => {
49 | resolve(build_server + data.image)
50 | })
51 | .catch(reject)
52 | })
53 | .catch(reject)
54 | })
55 | .catch(reject)
56 | })
57 |
58 | const photoOxyRadio = (url, text, radio) => new Promise((resolve, reject) => {
59 | axios({
60 | method: 'GET',
61 | url: url,
62 | headers: {
63 | 'user-agent': 'Mozilla/5.0 (Linux; Android 9; Redmi 7A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.99 Mobile Safari/537.36'
64 | }
65 | })
66 | .then(({ data, headers }) => {
67 | const token = //.exec(data)[1]
68 | const build_server = //.exec(data)[1]
69 | const build_server_id = //.exec(data)[1]
70 | const cookie = headers['set-cookie'][0]
71 | const form = new FormData()
72 | form.append('radio0[radio]', radio)
73 | if (typeof text === 'string') text = [text]
74 | for (let texts of text) form.append('text[]', texts)
75 | form.append('sumbit', 'GO')
76 | form.append('token', token)
77 | form.append('build_server', build_server)
78 | form.append('build_server_id', build_server_id)
79 | axios({
80 | method: 'POST',
81 | url: url,
82 | data: form,
83 | headers: {
84 | 'user-agent': 'Mozilla/5.0 (Linux; Android 9; Redmi 7A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.99 Mobile Safari/537.36',
85 | 'cookie': cookie,
86 | ...form.getHeaders()
87 | }
88 | })
89 | .then(({ data }) => {
90 | const form_value = /(.*?)<\/div>/.exec(data)[1]
91 | axios({
92 | method: 'GET',
93 | url: 'https://photooxy.com/effect/create-image?' + queryString(JSON.parse(form_value)),
94 | headers: {
95 | 'user-agent': 'Mozilla/5.0 (Linux; Android 9; Redmi 7A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.99 Mobile Safari/537.36',
96 | 'cookie': cookie
97 | }
98 | })
99 | .then(({ data }) => {
100 | resolve(build_server + data.image)
101 | })
102 | .catch(reject)
103 | })
104 | .catch(reject)
105 | })
106 | .catch(reject)
107 | })
108 |
109 | module.exports.photoOxy = photoOxy
110 | module.exports.photoOxyRadio = photoOxyRadio
--------------------------------------------------------------------------------
/Gallery/lib/myfunc2.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | var __importDefault = (this && this.__importDefault) || function (mod) {
4 | return (mod && mod.__esModule) ? mod : { "default": mod }
5 | }
6 | Object.defineProperty(exports, "__esModule", { value: true })
7 |
8 | const axios = require("axios")
9 | const cheerio = require("cheerio")
10 | const { resolve } = require("path")
11 | const util = require("util")
12 | let BodyForm = require('form-data')
13 | let { fromBuffer } = require('file-type')
14 | //let fetch = require('node-fetch')
15 | let fs = require('fs')
16 | const child_process = require('child_process')
17 | const ffmpeg = require('fluent-ffmpeg')
18 |
19 | const {unlink } = require ('fs').promises
20 |
21 |
22 | exports.sleep = async (ms) => {
23 | return new Promise(resolve => setTimeout(resolve, ms));
24 | }
25 | exports.fetchJson = async (url, options) => {
26 | try {
27 | options ? options : {}
28 | const res = await axios({
29 | method: 'GET',
30 | url: url,
31 | headers: {
32 | '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'
33 | },
34 | ...options
35 | })
36 | return res.data
37 | } catch (err) {
38 | return err
39 | }
40 | }
41 | exports.fetchBuffer = async (url, options) => {
42 | try {
43 | options ? options : {}
44 | const res = await axios({
45 | method: "GET",
46 | url,
47 | headers: {
48 | "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",
49 | 'DNT': 1,
50 | 'Upgrade-Insecure-Request': 1
51 | },
52 | ...options,
53 | responseType: 'arraybuffer'
54 | })
55 | return res.data
56 | } catch (err) {
57 | return err
58 | }
59 | }
60 | exports.webp2mp4File=async(path) =>{
61 | return new Promise((resolve, reject) => {
62 | const form = new BodyForm()
63 | form.append('new-image-url', '')
64 | form.append('new-image', fs.createReadStream(path))
65 | axios({
66 | method: 'post',
67 | url: 'https://s6.ezgif.com/webp-to-mp4',
68 | data: form,
69 | headers: {
70 | 'Content-Type': `multipart/form-data; boundary=${form._boundary}`
71 | }
72 | }).then(({ data }) => {
73 | const bodyFormThen = new BodyForm()
74 | const $ = cheerio.load(data)
75 | const file = $('input[name="file"]').attr('value')
76 | bodyFormThen.append('file', file)
77 | bodyFormThen.append('convert', "Convert WebP to MP4!")
78 | axios({
79 | method: 'post',
80 | url: 'https://ezgif.com/webp-to-mp4/' + file,
81 | data: bodyFormThen,
82 | headers: {
83 | 'Content-Type': `multipart/form-data; boundary=${bodyFormThen._boundary}`
84 | }
85 | }).then(({ data }) => {
86 | const $ = cheerio.load(data)
87 | const result = 'https:' + $('div#output > p.outfile > video > source').attr('src')
88 | resolve({
89 | status: true,
90 | message: "Created By Eternity",
91 | result: result
92 | })
93 | }).catch(reject)
94 | }).catch(reject)
95 | })
96 | }
97 |
98 | exports.fetchUrl = async (url, options) => {
99 | try {
100 | options ? options : {}
101 | const res = await axios({
102 | method: 'GET',
103 | url: url,
104 | headers: {
105 | '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'
106 | },
107 | ...options
108 | })
109 | return res.data
110 | } catch (err) {
111 | return err
112 | }
113 | }
114 |
115 | exports.WAVersion = async () => {
116 | let get = await exports.fetchUrl("https://web.whatsapp.com/check-update?version=1&platform=web")
117 | let version = [get.currentVersion.replace(/[.]/g, ", ")]
118 | return version
119 | }
120 |
121 | exports.getRandom = (ext) => {
122 | return `${Math.floor(Math.random() * 10000)}${ext}`
123 | }
124 |
125 | exports.isUrl = (url) => {
126 | 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'))
127 | }
128 |
129 | exports.isNumber = (number) => {
130 | const int = parseInt(number)
131 | return typeof int === 'number' && !isNaN(int)
132 | }
133 | exports.TelegraPh= (Path) =>{
134 | return new Promise (async (resolve, reject) => {
135 | if (!fs.existsSync(Path)) return reject(new Error("File not Found"))
136 | try {
137 | const form = new BodyForm();
138 | form.append("file", fs.createReadStream(Path))
139 | const data = await axios({
140 | url: "https://telegra.ph/upload",
141 | method: "POST",
142 | headers: {
143 | ...form.getHeaders()
144 | },
145 | data: form
146 | })
147 | return resolve("https://telegra.ph" + data.data[0].src)
148 | } catch (err) {
149 | return reject(new Error(String(err)))
150 | }
151 | })
152 | }
153 | const sleepy = async (ms) => {
154 | return new Promise(resolve => setTimeout(resolve, ms));
155 | }
156 | exports.buffergif = async (image) => {
157 |
158 | const filename = `${Math.random().toString(36)}`
159 | await fs.writeFileSync(`./XeonMedia/trash/${filename}.gif`, image)
160 | child_process.exec(
161 | `ffmpeg -i ./XeonMedia/trash/${filename}.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" ./XeonMedia/trash/${filename}.mp4`
162 | )
163 | await sleepy(4000)
164 |
165 | var buffer5 = await fs.readFileSync(`./XeonMedia/trash/${filename}.mp4`)
166 | Promise.all([unlink(`./XeonMedia/video/${filename}.mp4`), unlink(`./XeonMedia/gif/${filename}.gif`)])
167 | return buffer5
168 | }
--------------------------------------------------------------------------------
/Gallery/lib/uploader.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios');
2 | const FormData = require('form-data');
3 | const fs = require('fs');
4 | const { fromBuffer } = require('file-type');
5 | const fetch = require('node-fetch');
6 | const cheerio = require('cheerio');
7 |
8 | // Telegraph Upload (images/docs)
9 | function TelegraPh(Path) {
10 | return new Promise(async (resolve, reject) => {
11 | try {
12 | if (!fs.existsSync(Path)) {
13 | return reject(new Error("File not found"));
14 | }
15 |
16 | const form = new FormData();
17 | form.append("file", fs.createReadStream(Path));
18 |
19 | const response = await axios.post(
20 | "https://telegra.ph/upload",
21 | form,
22 | { headers: form.getHeaders() }
23 | );
24 |
25 | if (response.data && response.data[0] && response.data[0].src) {
26 | resolve("https://telegra.ph" + response.data[0].src);
27 | } else {
28 | reject(new Error("Invalid response from Telegraph"));
29 | }
30 | } catch (error) {
31 | reject(new Error(`Telegraph upload failed: ${error.message}`));
32 | }
33 | });
34 | }
35 |
36 | // Ugu.se Upload (any file type)
37 | function UploadFileUgu(input) {
38 | return new Promise(async (resolve, reject) => {
39 | try {
40 | const form = new FormData();
41 | form.append("files[]", fs.createReadStream(input));
42 |
43 | const response = await axios.post(
44 | "https://uguu.se/upload.php",
45 | form,
46 | {
47 | headers: {
48 | "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",
49 | ...form.getHeaders()
50 | }
51 | }
52 | );
53 |
54 | if (response.data && response.data.files && response.data.files[0]) {
55 | resolve(response.data.files[0]);
56 | } else {
57 | reject(new Error("Invalid response from Ugu.se"));
58 | }
59 | } catch (error) {
60 | reject(new Error(`Ugu.se upload failed: ${error.message}`));
61 | }
62 | });
63 | }
64 |
65 | // imgBB Upload (images only) - Using your API key
66 | function uploadToImgBB(filePath, apiKey = 'c8d64eb615da4365b306d4611347baf3') {
67 | return new Promise(async (resolve, reject) => {
68 | try {
69 | if (!fs.existsSync(filePath)) {
70 | return reject(new Error("File not found"));
71 | }
72 |
73 | const form = new FormData();
74 | form.append('image', fs.createReadStream(filePath));
75 |
76 | const response = await axios.post(
77 | 'https://api.imgbb.com/1/upload',
78 | form,
79 | {
80 | params: { key: apiKey },
81 | headers: form.getHeaders()
82 | }
83 | );
84 |
85 | if (response.data && response.data.data && response.data.data.url) {
86 | resolve(response.data.data.url);
87 | } else {
88 | reject(new Error("Invalid response from imgBB"));
89 | }
90 | } catch (error) {
91 | const errorDetails = error.response?.data?.error?.message || error.message;
92 | reject(new Error(`imgBB upload failed: ${errorDetails}`));
93 | }
94 | });
95 | }
96 |
97 | // WebP to MP4 Converter
98 | function webp2mp4File(path) {
99 | return new Promise(async (resolve, reject) => {
100 | try {
101 | // Step 1: Upload to conversion service
102 | const form1 = new FormData();
103 | form1.append('new-image-url', '');
104 | form1.append('new-image', fs.createReadStream(path));
105 |
106 | const response1 = await axios.post(
107 | 'https://s6.ezgif.com/webp-to-mp4',
108 | form1,
109 | { headers: form1.getHeaders() }
110 | );
111 |
112 | // Parse HTML response to get file token
113 | const $1 = cheerio.load(response1.data);
114 | const fileToken = $1('input[name="file"]').attr('value');
115 |
116 | if (!fileToken) {
117 | return reject(new Error("File token not found"));
118 | }
119 |
120 | // Step 2: Process conversion
121 | const form2 = new FormData();
122 | form2.append('file', fileToken);
123 | form2.append('convert', "Convert WebP to MP4!");
124 |
125 | const response2 = await axios.post(
126 | `https://ezgif.com/webp-to-mp4/${fileToken}`,
127 | form2,
128 | { headers: form2.getHeaders() }
129 | );
130 |
131 | // Parse result URL
132 | const $2 = cheerio.load(response2.data);
133 | const videoSrc = $2('div#output > p.outfile > video > source').attr('src');
134 |
135 | if (videoSrc) {
136 | resolve({
137 | status: true,
138 | result: 'https:' + videoSrc
139 | });
140 | } else {
141 | reject(new Error("Converted video not found"));
142 | }
143 | } catch (error) {
144 | reject(new Error(`WebP conversion failed: ${error.message}`));
145 | }
146 | });
147 | }
148 |
149 | // Flonime Upload
150 | async function floNime(mediaBuffer, options = {}) {
151 | try {
152 | // Detect file type
153 | const fileInfo = await fromBuffer(mediaBuffer) || {};
154 | const extension = fileInfo.ext || options.ext || 'bin';
155 |
156 | const form = new FormData();
157 | form.append('file', mediaBuffer, `file.${extension}`);
158 |
159 | const response = await fetch('https://flonime.my.id/upload', {
160 | method: 'POST',
161 | body: form
162 | });
163 |
164 | if (!response.ok) {
165 | throw new Error(`HTTP error! Status: ${response.status}`);
166 | }
167 |
168 | return await response.json();
169 | } catch (error) {
170 | throw new Error(`Flonime upload failed: ${error.message}`);
171 | }
172 | }
173 |
174 | module.exports = {
175 | TelegraPh,
176 | UploadFileUgu,
177 | uploadToImgBB,
178 | webp2mp4File,
179 | floNime
180 | };
--------------------------------------------------------------------------------
/Gallery/lib/exif.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const fs = require('fs')
4 | const { tmpdir } = require("os")
5 | const Crypto = require("crypto")
6 | const ff = require('fluent-ffmpeg')
7 | const webp = require("node-webpmux")
8 | const path = require("path")
9 |
10 |
11 | async function imageToWebp (media) {
12 |
13 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
14 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.jpg`)
15 |
16 | fs.writeFileSync(tmpFileIn, media)
17 |
18 | await new Promise((resolve, reject) => {
19 | ff(tmpFileIn)
20 | .on("error", reject)
21 | .on("end", () => resolve(true))
22 | .addOutputOptions([
23 | "-vcodec",
24 | "libwebp",
25 | "-vf",
26 | "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"
27 | ])
28 | .toFormat("webp")
29 | .save(tmpFileOut)
30 | })
31 |
32 | const buff = fs.readFileSync(tmpFileOut)
33 | fs.unlinkSync(tmpFileOut)
34 | fs.unlinkSync(tmpFileIn)
35 | return buff
36 | }
37 |
38 | async function videoToWebp (media) {
39 |
40 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
41 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.mp4`)
42 |
43 | fs.writeFileSync(tmpFileIn, media)
44 |
45 | await new Promise((resolve, reject) => {
46 | ff(tmpFileIn)
47 | .on("error", reject)
48 | .on("end", () => resolve(true))
49 | .addOutputOptions([
50 | "-vcodec",
51 | "libwebp",
52 | "-vf",
53 | "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",
54 | "-loop",
55 | "0",
56 | "-ss",
57 | "00:00:00",
58 | "-t",
59 | "00:00:05",
60 | "-preset",
61 | "default",
62 | "-an",
63 | "-vsync",
64 | "0"
65 | ])
66 | .toFormat("webp")
67 | .save(tmpFileOut)
68 | })
69 |
70 | const buff = fs.readFileSync(tmpFileOut)
71 | fs.unlinkSync(tmpFileOut)
72 | fs.unlinkSync(tmpFileIn)
73 | return buff
74 | }
75 |
76 | async function writeExifImg (media, metadata) {
77 | let wMedia = await imageToWebp(media)
78 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
79 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
80 | fs.writeFileSync(tmpFileIn, wMedia)
81 |
82 | if (metadata.packname || metadata.author) {
83 | const img = new webp.Image()
84 | 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 : [""] }
85 | 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])
86 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8")
87 | const exif = Buffer.concat([exifAttr, jsonBuff])
88 | exif.writeUIntLE(jsonBuff.length, 14, 4)
89 | await img.load(tmpFileIn)
90 | fs.unlinkSync(tmpFileIn)
91 | img.exif = exif
92 | await img.save(tmpFileOut)
93 | return tmpFileOut
94 | }
95 | }
96 |
97 | async function writeExifVid (media, metadata) {
98 | let wMedia = await videoToWebp(media)
99 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
100 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
101 | fs.writeFileSync(tmpFileIn, wMedia)
102 |
103 | if (metadata.packname || metadata.author) {
104 | const img = new webp.Image()
105 | 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 : [""] }
106 | 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])
107 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8")
108 | const exif = Buffer.concat([exifAttr, jsonBuff])
109 | exif.writeUIntLE(jsonBuff.length, 14, 4)
110 | await img.load(tmpFileIn)
111 | fs.unlinkSync(tmpFileIn)
112 | img.exif = exif
113 | await img.save(tmpFileOut)
114 | return tmpFileOut
115 | }
116 | }
117 |
118 | async function writeExif (media, metadata) {
119 | let wMedia = /webp/.test(media.mimetype) ? media.data : /image/.test(media.mimetype) ? await imageToWebp(media.data) : /video/.test(media.mimetype) ? await videoToWebp(media.data) : ""
120 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
121 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
122 | fs.writeFileSync(tmpFileIn, wMedia)
123 |
124 | if (metadata.packname || metadata.author) {
125 | const img = new webp.Image()
126 | 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 : [""] }
127 | 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])
128 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8")
129 | const exif = Buffer.concat([exifAttr, jsonBuff])
130 | exif.writeUIntLE(jsonBuff.length, 14, 4)
131 | await img.load(tmpFileIn)
132 | fs.unlinkSync(tmpFileIn)
133 | img.exif = exif
134 | await img.save(tmpFileOut)
135 | return tmpFileOut
136 | }
137 | }
138 |
139 | module.exports = { imageToWebp, videoToWebp, writeExifImg, writeExifVid, writeExif }
140 |
--------------------------------------------------------------------------------
/Gallery/lib/scraper.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios')
2 | const cheerio = require('cheerio')
3 |
4 |
5 | function pinterest(querry){
6 | return new Promise(async(resolve,reject) => {
7 | axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
8 | headers: {
9 | "cookie" : "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
10 | }
11 | }).then(({ data }) => {
12 | const $ = cheerio.load(data)
13 | const result = [];
14 | const hasil = [];
15 | $('div > a').get().map(b => {
16 | const link = $(b).find('img').attr('src')
17 | result.push(link)
18 | });
19 | result.forEach(v => {
20 | if(v == undefined) return
21 | hasil.push(v.replace(/236/g,'736'))
22 | })
23 | hasil.shift();
24 | resolve(hasil)
25 | })
26 | })
27 | }
28 |
29 | function wallpaper(title, page = '1') {
30 | return new Promise((resolve, reject) => {
31 | axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
32 | .then(({ data }) => {
33 | let $ = cheerio.load(data)
34 | let hasil = []
35 | $('div.grid-item').each(function (a, b) {
36 | hasil.push({
37 | title: $(b).find('div.info > a > h3').text(),
38 | type: $(b).find('div.info > a:nth-child(2)').text(),
39 | source: 'https://www.besthdwallpaper.com/'+$(b).find('div > a:nth-child(3)').attr('href'),
40 | image: [$(b).find('picture > img').attr('data-src') || $(b).find('picture > img').attr('src'), $(b).find('picture > source:nth-child(1)').attr('srcset'), $(b).find('picture > source:nth-child(2)').attr('srcset')]
41 | })
42 | })
43 | resolve(hasil)
44 | })
45 | })
46 | }
47 |
48 | function wikimedia(title) {
49 | return new Promise((resolve, reject) => {
50 | axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`)
51 | .then((res) => {
52 | let $ = cheerio.load(res.data)
53 | let hasil = []
54 | $('.sdms-search-results__list-wrapper > div > a').each(function (a, b) {
55 | hasil.push({
56 | title: $(b).find('img').attr('alt'),
57 | source: $(b).attr('href'),
58 | image: $(b).find('img').attr('data-src') || $(b).find('img').attr('src')
59 | })
60 | })
61 | resolve(hasil)
62 | })
63 | })
64 | }
65 |
66 | function quotesAnime() {
67 | return new Promise((resolve, reject) => {
68 | const page = Math.floor(Math.random() * 184)
69 | axios.get('https://otakotaku.com/quote/feed/'+page)
70 | .then(({ data }) => {
71 | const $ = cheerio.load(data)
72 | const hasil = []
73 | $('div.kotodama-list').each(function(l, h) {
74 | hasil.push({
75 | link: $(h).find('a').attr('href'),
76 | gambar: $(h).find('img').attr('data-src'),
77 | karakter: $(h).find('div.char-name').text().trim(),
78 | anime: $(h).find('div.anime-title').text().trim(),
79 | episode: $(h).find('div.meta').text(),
80 | up_at: $(h).find('small.meta').text(),
81 | quotes: $(h).find('div.quote').text().trim()
82 | })
83 | })
84 | resolve(hasil)
85 | }).catch(reject)
86 | })
87 | }
88 |
89 | function aiovideodl(link) {
90 | return new Promise((resolve, reject) => {
91 | axios({
92 | url: 'https://aiovideodl.ml/',
93 | method: 'GET',
94 | headers: {
95 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
96 | "cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
97 | }
98 | }).then((src) => {
99 | let a = cheerio.load(src.data)
100 | let token = a('#token').attr('value')
101 | axios({
102 | url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/',
103 | method: 'POST',
104 | headers: {
105 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
106 | "cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
107 | },
108 | data: new URLSearchParams(Object.entries({ 'url': link, 'token': token }))
109 | }).then(({ data }) => {
110 | resolve(data)
111 | })
112 | })
113 | })
114 | }
115 |
116 | function umma(url) {
117 | return new Promise((resolve, reject) => {
118 | axios.get(url)
119 | .then((res) => {
120 | let $ = cheerio.load(res.data)
121 | let image = []
122 | $('#article-content > div').find('img').each(function (a, b) {
123 | image.push($(b).attr('src'))
124 | })
125 | let hasil = {
126 | title: $('#wrap > div.content-container.font-6-16 > h1').text().trim(),
127 | author: {
128 | name: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.user-ame.font-6-16.fw').text().trim(),
129 | profilePic: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.profile-photo > img.photo').attr('src')
130 | },
131 | caption: $('#article-content > div > p').text().trim(),
132 | media: $('#article-content > div > iframe').attr('src') ? [$('#article-content > div > iframe').attr('src')] : image,
133 | type: $('#article-content > div > iframe').attr('src') ? 'video' : 'image',
134 | like: $('#wrap > div.bottom-btns > div > button:nth-child(1) > div.text.font-6-12').text(),
135 | }
136 | resolve(hasil)
137 | })
138 | })
139 | }
140 |
141 | function ringtone(title) {
142 | return new Promise((resolve, reject) => {
143 | axios.get('https://meloboom.com/en/search/'+title)
144 | .then((get) => {
145 | let $ = cheerio.load(get.data)
146 | let hasil = []
147 | $('#__next > main > section > div.jsx-2244708474.container > div > div > div > div:nth-child(4) > div > div > div > ul > li').each(function (a, b) {
148 | hasil.push({ title: $(b).find('h4').text(), source: 'https://meloboom.com/'+$(b).find('a').attr('href'), audio: $(b).find('audio').attr('src') })
149 | })
150 | resolve(hasil)
151 | })
152 | })
153 | }
154 |
155 | function styletext(teks) {
156 | return new Promise((resolve, reject) => {
157 | axios.get('http://qaz.wtf/u/convert.cgi?text='+teks)
158 | .then(({ data }) => {
159 | let $ = cheerio.load(data)
160 | let hasil = []
161 | $('table > tbody > tr').each(function (a, b) {
162 | hasil.push({ name: $(b).find('td:nth-child(1) > span').text(), result: $(b).find('td:nth-child(2)').text().trim() })
163 | })
164 | resolve(hasil)
165 | })
166 | })
167 | }
168 |
169 | module.exports = { pinterest, wallpaper, wikimedia, quotesAnime, aiovideodl, umma, ringtone, styletext }
170 |
--------------------------------------------------------------------------------
/Gallery/lib/ytdl2.js:
--------------------------------------------------------------------------------
1 | const ytdl = require('ytdl-core');
2 | const yts = require('youtube-yts');
3 | const readline = require('readline');
4 | const ffmpeg = require('fluent-ffmpeg');
5 | const NodeID3 = require('node-id3');
6 | const fs = require('fs');
7 | const { fetchBuffer } = require("./myfunc2");
8 | const ytM = require('node-youtube-music');
9 | const { randomBytes } = require('crypto');
10 |
11 | const ytIdRegex = /(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\?(?:\S*?&?v\=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/
12 |
13 | class YT {
14 | constructor() { }
15 |
16 | /**
17 | * Checks if it is yt link
18 | * @param {string|URL} url youtube url
19 | * @returns Returns true if the given YouTube URL.
20 | */
21 | static isYTUrl = (url) => {
22 | return ytIdRegex.test(url)
23 | }
24 |
25 | /**
26 | * VideoID from url
27 | * @param {string|URL} url to get videoID
28 | * @returns
29 | */
30 | static getVideoID = (url) => {
31 | if (!this.isYTUrl(url)) throw new Error('is not YouTube URL')
32 | return ytIdRegex.exec(url)[1]
33 | }
34 |
35 | /**
36 | * @typedef {Object} IMetadata
37 | * @property {string} Title track title
38 | * @property {string} Artist track Artist
39 | * @property {string} Image track thumbnail url
40 | * @property {string} Album track album
41 | * @property {string} Year track release date
42 | */
43 |
44 | /**
45 | * Write Track Tag Metadata
46 | * @param {string} filePath
47 | * @param {IMetadata} Metadata
48 | */
49 | static WriteTags = async (filePath, Metadata) => {
50 | NodeID3.write(
51 | {
52 | title: Metadata.Title,
53 | artist: Metadata.Artist,
54 | originalArtist: Metadata.Artist,
55 | image: {
56 | mime: 'jpeg',
57 | type: {
58 | id: 3,
59 | name: 'front cover',
60 | },
61 | imageBuffer: (await fetchBuffer(Metadata.Image)).buffer,
62 | description: `Cover of ${Metadata.Title}`,
63 | },
64 | album: Metadata.Album,
65 | year: Metadata.Year || ''
66 | },
67 | filePath
68 | );
69 | }
70 |
71 | /**
72 | *
73 | * @param {string} query
74 | * @returns
75 | */
76 | static search = async (query, options = {}) => {
77 | const search = await yts.search({ query, hl: 'id', gl: 'ID', ...options })
78 | return search.videos
79 | }
80 |
81 | /**
82 | * @typedef {Object} TrackSearchResult
83 | * @property {boolean} isYtMusic is from YT Music search?
84 | * @property {string} title music title
85 | * @property {string} artist music artist
86 | * @property {string} id YouTube ID
87 | * @property {string} url YouTube URL
88 | * @property {string} album music album
89 | * @property {Object} duration music duration {seconds, label}
90 | * @property {string} image Cover Art
91 | */
92 |
93 | /**
94 | * search track with details
95 | * @param {string} query
96 | * @returns {Promise}
97 | */
98 | static searchTrack = (query) => {
99 | return new Promise(async (resolve, reject) => {
100 | try {
101 | let ytMusic = await ytM.searchMusics(query);
102 | let result = []
103 | for (let i = 0; i < ytMusic.length; i++) {
104 | result.push({
105 | isYtMusic: true,
106 | title: `${ytMusic[i].title} - ${ytMusic[i].artists.map(x => x.name).join(' ')}`,
107 | artist: ytMusic[i].artists.map(x => x.name).join(' '),
108 | id: ytMusic[i].youtubeId,
109 | url: 'https://youtu.be/' + ytMusic[i].youtubeId,
110 | album: ytMusic[i].album,
111 | duration: {
112 | seconds: ytMusic[i].duration.totalSeconds,
113 | label: ytMusic[i].duration.label
114 | },
115 | image: ytMusic[i].thumbnailUrl.replace('w120-h120', 'w600-h600')
116 | })
117 |
118 | }
119 | resolve(result)
120 | } catch (error) {
121 | reject(error)
122 | }
123 | })
124 | }
125 |
126 | /**
127 | * @typedef {Object} MusicResult
128 | * @property {TrackSearchResult} meta music meta
129 | * @property {string} path file path
130 | */
131 |
132 | /**
133 | * Download music with full tag metadata
134 | * @param {string|TrackSearchResult[]} query title of track want to download
135 | * @returns {Promise} filepath of the result
136 | */
137 | static downloadMusic = async (query) => {
138 | try {
139 | const getTrack = Array.isArray(query) ? query : await this.searchTrack(query);
140 | const search = getTrack[0]//await this.searchTrack(query)
141 | const videoInfo = await ytdl.getInfo('https://www.youtube.com/watch?v=' + search.id, { lang: 'id' });
142 | let stream = ytdl(search.id, { filter: 'audioonly', quality: 140 });
143 | let songPath = `./Gallery/audio/${randomBytes(3).toString('hex')}.mp3`
144 | stream.on('error', (err) => console.log(err))
145 |
146 | const file = await new Promise((resolve) => {
147 | ffmpeg(stream)
148 | .audioFrequency(44100)
149 | .audioChannels(2)
150 | .audioBitrate(128)
151 | .audioCodec('libmp3lame')
152 | .audioQuality(5)
153 | .toFormat('mp3')
154 | .save(songPath)
155 | .on('end', () => resolve(songPath))
156 | });
157 | await this.WriteTags(file, { Title: search.title, Artist: search.artist, Image: search.image, Album: search.album, Year: videoInfo.videoDetails.publishDate.split('-')[0] });
158 | return {
159 | meta: search,
160 | path: file,
161 | size: fs.statSync(songPath).size
162 | }
163 | } catch (error) {
164 | throw new Error(error)
165 | }
166 | }
167 |
168 | /**
169 | * get downloadable video urls
170 | * @param {string|URL} query videoID or YouTube URL
171 | * @param {string} quality
172 | * @returns
173 | */
174 | static mp4 = async (query, quality = 134) => {
175 | try {
176 | if (!query) throw new Error('Video ID or YouTube Url is required')
177 | const videoId = this.isYTUrl(query) ? this.getVideoID(query) : query
178 | const videoInfo = await ytdl.getInfo('https://www.youtube.com/watch?v=' + videoId, { lang: 'id' });
179 | const format = ytdl.chooseFormat(videoInfo.formats, { format: quality, filter: 'videoandaudio' })
180 | return {
181 | title: videoInfo.videoDetails.title,
182 | thumb: videoInfo.videoDetails.thumbnails.slice(-1)[0],
183 | date: videoInfo.videoDetails.publishDate,
184 | duration: videoInfo.videoDetails.lengthSeconds,
185 | channel: videoInfo.videoDetails.ownerChannelName,
186 | quality: format.qualityLabel,
187 | contentLength: format.contentLength,
188 | description:videoInfo.videoDetails.description,
189 | videoUrl: format.url
190 | }
191 | } catch (error) {
192 | throw error
193 | }
194 | }
195 |
196 | /**
197 | * Download YouTube to mp3
198 | * @param {string|URL} url YouTube link want to download to mp3
199 | * @param {IMetadata} metadata track metadata
200 | * @param {boolean} autoWriteTags if set true, it will auto write tags meta following the YouTube info
201 | * @returns
202 | */
203 | static mp3 = async (url, metadata = {}, autoWriteTags = false) => {
204 | try {
205 | if (!url) throw new Error('Video ID or YouTube Url is required')
206 | url = this.isYTUrl(url) ? 'https://www.youtube.com/watch?v=' + this.getVideoID(url) : url
207 | const { videoDetails } = await ytdl.getInfo(url, { lang: 'id' });
208 | let stream = ytdl(url, { filter: 'audioonly', quality: 140 });
209 | let songPath = `./Gallery/audio/${randomBytes(3).toString('hex')}.mp3`
210 |
211 | let starttime;
212 | stream.once('response', () => {
213 | starttime = Date.now();
214 | });
215 | stream.on('progress', (chunkLength, downloaded, total) => {
216 | const percent = downloaded / total;
217 | const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;
218 | const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;
219 | readline.cursorTo(process.stdout, 0);
220 | process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);
221 | process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);
222 | process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);
223 | process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);
224 | readline.moveCursor(process.stdout, 0, -1);
225 | //let txt = `${bgColor(color('[FFMPEG]]', 'black'), '#38ef7d')} ${color(moment().format('DD/MM/YY HH:mm:ss'), '#A1FFCE')} ${gradient.summer('[Converting..]')} ${gradient.cristal(p.targetSize)} kb`
226 | });
227 | stream.on('end', () => process.stdout.write('\n\n'));
228 | stream.on('error', (err) => console.log(err))
229 |
230 | const file = await new Promise((resolve) => {
231 | ffmpeg(stream)
232 | .audioFrequency(44100)
233 | .audioChannels(2)
234 | .audioBitrate(128)
235 | .audioCodec('libmp3lame')
236 | .audioQuality(5)
237 | .toFormat('mp3')
238 | .save(songPath)
239 | .on('end', () => {
240 | resolve(songPath)
241 | })
242 | });
243 | if (Object.keys(metadata).length !== 0) {
244 | await this.WriteTags(file, metadata)
245 | }
246 | if (autoWriteTags) {
247 | await this.WriteTags(file, { Title: videoDetails.title, Album: videoDetails.author.name, Year: videoDetails.publishDate.split('-')[0], Image: videoDetails.thumbnails.slice(-1)[0].url })
248 | }
249 | return {
250 | meta: {
251 | title: videoDetails.title,
252 | channel: videoDetails.author.name,
253 | seconds: videoDetails.lengthSeconds,
254 | image: videoDetails.thumbnails.slice(-1)[0].url
255 | },
256 | path: file,
257 | size: fs.statSync(songPath).size
258 | }
259 | } catch (error) {
260 | throw error
261 | }
262 | }
263 | }
264 |
265 | module.exports = YT;
--------------------------------------------------------------------------------
/Gallery/lib/myfunc.js:
--------------------------------------------------------------------------------
1 |
2 | const {
3 | proto,
4 | delay,
5 | getContentType
6 | } = require('@whiskeysockets/baileys');
7 | const chalk = require('chalk')
8 | const fs = require('fs')
9 | const Crypto = require('crypto')
10 | const axios = require('axios')
11 | const moment = require('moment-timezone')
12 | const {
13 | sizeFormatter
14 | } = require('human-readable')
15 | const util = require('util')
16 | const Jimp = require('jimp')
17 | const {
18 | defaultMaxListeners
19 | } = require('stream')
20 |
21 | const unixTimestampSeconds = (date = new Date()) => Math.floor(date.getTime() / 1000)
22 |
23 | exports.unixTimestampSeconds = unixTimestampSeconds
24 |
25 | exports.generateMessageTag = (epoch) => {
26 | let tag = (0, exports.unixTimestampSeconds)().toString();
27 | if (epoch)
28 | tag += '.--' + epoch; // attach epoch if provided
29 | return tag;
30 | }
31 |
32 | exports.processTime = (timestamp, now) => {
33 | return moment.duration(now - moment(timestamp * 1000)).asSeconds()
34 | }
35 |
36 | exports.getRandom = (ext) => {
37 | return `${Math.floor(Math.random() * 10000)}${ext}`
38 | }
39 |
40 | exports.getBuffer = async (url, options) => {
41 | try {
42 | options ? options : {}
43 | const res = await axios({
44 | method: "get",
45 | url,
46 | headers: {
47 | 'DNT': 1,
48 | 'Upgrade-Insecure-Request': 1
49 | },
50 | ...options,
51 | responseType: 'arraybuffer'
52 | })
53 | return res.data
54 | } catch (err) {
55 | return err
56 | }
57 | }
58 |
59 | exports.getImg = async (url, options) => {
60 | try {
61 | options ? options : {}
62 | const res = await axios({
63 | method: "get",
64 | url,
65 | headers: {
66 | 'DNT': 1,
67 | 'Upgrade-Insecure-Request': 1
68 | },
69 | ...options,
70 | responseType: 'arraybuffer'
71 | })
72 | return res.data
73 | } catch (err) {
74 | return err
75 | }
76 | }
77 |
78 | exports.fetchJson = 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.runtime = function(seconds) {
96 | seconds = Number(seconds);
97 | var d = Math.floor(seconds / (3600 * 24));
98 | var h = Math.floor(seconds % (3600 * 24) / 3600);
99 | var m = Math.floor(seconds % 3600 / 60);
100 | var s = Math.floor(seconds % 60);
101 | var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " days, ") : "";
102 | var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " hours, ") : "";
103 | var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " minutes, ") : "";
104 | var sDisplay = s > 0 ? s + (s == 1 ? " second" : " seconds") : "";
105 | return dDisplay + hDisplay + mDisplay + sDisplay;
106 | }
107 |
108 | exports.clockString = (ms) => {
109 | let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000)
110 | let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60
111 | let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60
112 | return [h, m, s].map(v => v.toString().padStart(2, 0)).join(':')
113 | }
114 |
115 | exports.sleep = async (ms) => {
116 | return new Promise(resolve => setTimeout(resolve, ms));
117 | }
118 |
119 | exports.isUrl = (url) => {
120 | 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'))
121 | }
122 |
123 | exports.getTime = (format, date) => {
124 | if (date) {
125 | return moment(date).locale('id').format(format)
126 | } else {
127 | return moment.tz('Asia/Jakarta').locale('id').format(format)
128 | }
129 | }
130 |
131 | exports.formatDate = (n, locale = 'id') => {
132 | let d = new Date(n)
133 | return d.toLocaleDateString(locale, {
134 | weekday: 'long',
135 | day: 'numeric',
136 | month: 'long',
137 | year: 'numeric',
138 | hour: 'numeric',
139 | minute: 'numeric',
140 | second: 'numeric'
141 | })
142 | }
143 |
144 | exports.tanggal = (numer) => {
145 | myMonths = ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"];
146 | myDays = ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jum’at', 'Sabtu'];
147 | var tgl = new Date(numer);
148 | var day = tgl.getDate()
149 | bulan = tgl.getMonth()
150 | var thisDay = tgl.getDay(),
151 | thisDay = myDays[thisDay];
152 | var yy = tgl.getYear()
153 | var year = (yy < 1000) ? yy + 1900 : yy;
154 | const time = moment.tz('Asia/Kolkata').format('DD/MM HH:mm:ss')
155 | let d = new Date
156 | let locale = 'id'
157 | let gmt = new Date(0).getTime() - new Date('1 January 1970').getTime()
158 | let weton = ['Pahing', 'Pon', 'Wage', 'Kliwon', 'Legi'][Math.floor(((d * 1) + gmt) / 84600000) % 5]
159 |
160 | return `${thisDay}, ${day} - ${myMonths[bulan]} - ${year}`
161 | }
162 | exports.jam = (numer, options = {}) => {
163 | let format = options.format ? options.format : "HH:mm"
164 | let jam = options?.timeZone ? moment(numer).tz(timeZone).format(format) : moment(numer).format(format)
165 |
166 | return `${jam}`
167 | }
168 |
169 | exports.formatp = sizeFormatter({
170 | std: 'JEDEC', //'SI' = default | 'IEC' | 'JEDEC'
171 | decimalPlaces: 2,
172 | keepTrailingZeroes: false,
173 | render: (literal, symbol) => `${literal} ${symbol}B`,
174 | })
175 |
176 | exports.json = (string) => {
177 | return JSON.stringify(string, null, 2)
178 | }
179 |
180 | function format(...args) {
181 | return util.format(...args)
182 | }
183 |
184 | exports.logic = (check, inp, out) => {
185 | if (inp.length !== out.length) throw new Error('Input and Output must have same length')
186 | for (let i in inp)
187 | if (util.isDeepStrictEqual(check, inp[i])) return out[i]
188 | return null
189 | }
190 |
191 | exports.generateProfilePicture = async (buffer) => {
192 | const jimp = await Jimp.read(buffer)
193 | const min = jimp.getWidth()
194 | const max = jimp.getHeight()
195 | const cropped = jimp.crop(0, 0, min, max)
196 | return {
197 | img: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG),
198 | preview: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG)
199 | }
200 | }
201 |
202 | exports.bytesToSize = (bytes, decimals = 2) => {
203 | if (bytes === 0) return '0 Bytes';
204 |
205 | const k = 1024;
206 | const dm = decimals < 0 ? 0 : decimals;
207 | const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
208 |
209 | const i = Math.floor(Math.log(bytes) / Math.log(k));
210 |
211 | return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
212 | }
213 |
214 | exports.getSizeMedia = (path) => {
215 | return new Promise((resolve, reject) => {
216 | if (/http/.test(path)) {
217 | axios.get(path)
218 | .then((res) => {
219 | let length = parseInt(res.headers['content-length'])
220 | let size = exports.bytesToSize(length, 3)
221 | if (!isNaN(length)) resolve(size)
222 | })
223 | } else if (Buffer.isBuffer(path)) {
224 | let length = Buffer.byteLength(path)
225 | let size = exports.bytesToSize(length, 3)
226 | if (!isNaN(length)) resolve(size)
227 | } else {
228 | reject('error gatau apah')
229 | }
230 | })
231 | }
232 |
233 | exports.parseMention = (text = '') => {
234 | return [...text.matchAll(/@([0-9]{5,16}|0)/g)].map(v => v[1] + '@s.whatsapp.net')
235 | }
236 |
237 | exports.getGroupAdmins = (participants) => {
238 | let admins = []
239 | for (let i of participants) {
240 | i.admin === "superadmin" ? admins.push(i.id) : i.admin === "admin" ? admins.push(i.id) : ''
241 | }
242 | return admins || []
243 | }
244 |
245 | /**
246 | * Serialize Message
247 | * @param {WAConnection} conn
248 | * @param {Object} m
249 | * @param {store} store
250 | */
251 | exports.smsg = (XeonBotInc, m, store) => {
252 | if (!m) return m
253 | let M = proto.WebMessageInfo
254 | if (m.key) {
255 | m.id = m.key.id
256 | m.isBaileys = m.id.startsWith('BAE5') && m.id.length === 16
257 | m.chat = m.key.remoteJid
258 | m.fromMe = m.key.fromMe
259 | m.isGroup = m.chat.endsWith('@g.us')
260 | m.sender = XeonBotInc.decodeJid(m.fromMe && XeonBotInc.user.id || m.participant || m.key.participant || m.chat || '')
261 | if (m.isGroup) m.participant = XeonBotInc.decodeJid(m.key.participant) || ''
262 | }
263 | if (m.message) {
264 | m.mtype = getContentType(m.message)
265 | m.msg = (m.mtype == 'viewOnceMessage' ? m.message[m.mtype].message[getContentType(m.message[m.mtype].message)] : m.message[m.mtype])
266 | 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
267 | let quoted = m.quoted = m.msg.contextInfo ? m.msg.contextInfo.quotedMessage : null
268 | m.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
269 | if (m.quoted) {
270 | let type = getContentType(quoted)
271 | m.quoted = m.quoted[type]
272 | if (['productMessage'].includes(type)) {
273 | type = getContentType(m.quoted)
274 | m.quoted = m.quoted[type]
275 | }
276 | if (typeof m.quoted === 'string') m.quoted = {
277 | text: m.quoted
278 | }
279 | m.quoted.mtype = type
280 | m.quoted.id = m.msg.contextInfo.stanzaId
281 | m.quoted.chat = m.msg.contextInfo.remoteJid || m.chat
282 | m.quoted.isBaileys = m.quoted.id ? m.quoted.id.startsWith('BAE5') && m.quoted.id.length === 16 : false
283 | m.quoted.sender = XeonBotInc.decodeJid(m.msg.contextInfo.participant)
284 | m.quoted.fromMe = m.quoted.sender === (XeonBotInc.user && XeonBotInc.user.id)
285 | m.quoted.text = m.quoted.text || m.quoted.caption || m.quoted.conversation || m.quoted.contentText || m.quoted.selectedDisplayText || m.quoted.title || ''
286 | m.quoted.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
287 | m.getQuotedObj = m.getQuotedMessage = async () => {
288 | if (!m.quoted.id) return false
289 | let q = await store.loadMessage(m.chat, m.quoted.id, XeonBotInc)
290 | return exports.smsg(XeonBotInc, q, store)
291 | }
292 | let vM = m.quoted.fakeObj = M.fromObject({
293 | key: {
294 | remoteJid: m.quoted.chat,
295 | fromMe: m.quoted.fromMe,
296 | id: m.quoted.id
297 | },
298 | message: quoted,
299 | ...(m.isGroup ? {
300 | participant: m.quoted.sender
301 | } : {})
302 | })
303 |
304 | /**
305 | *
306 | * @returns
307 | */
308 | m.quoted.delete = () => XeonBotInc.sendMessage(m.quoted.chat, {
309 | delete: vM.key
310 | })
311 |
312 | /**
313 | *
314 | * @param {*} jid
315 | * @param {*} forceForward
316 | * @param {*} options
317 | * @returns
318 | */
319 | m.quoted.copyNForward = (jid, forceForward = false, options = {}) => XeonBotInc.copyNForward(jid, vM, forceForward, options)
320 |
321 | /**
322 | *
323 | * @returns
324 | */
325 | m.quoted.download = () => XeonBotInc.downloadMediaMessage(m.quoted)
326 | }
327 | }
328 | if (m.msg.url) m.download = () => XeonBotInc.downloadMediaMessage(m.msg)
329 | m.text = m.msg.text || m.msg.caption || m.message.conversation || m.msg.contentText || m.msg.selectedDisplayText || m.msg.title || ''
330 | /**
331 | * Reply to this message
332 | * @param {String|Object} text
333 | * @param {String|false} chatId
334 | * @param {Object} options
335 | */
336 | m.reply = (text, chatId = m.chat, options = {}) => Buffer.isBuffer(text) ? XeonBotInc.sendMedia(chatId, text, 'file', '', m, {
337 | ...options
338 | }) : XeonBotInc.sendText(chatId, text, m, {
339 | ...options
340 | })
341 | /**
342 | * Copy this message
343 | */
344 | m.copy = () => exports.smsg(XeonBotInc, M.fromObject(M.toObject(m)))
345 |
346 | /**
347 | *
348 | * @param {*} jid
349 | * @param {*} forceForward
350 | * @param {*} options
351 | * @returns
352 | */
353 | m.copyNForward = (jid = m.chat, forceForward = false, options = {}) => XeonBotInc.copyNForward(jid, m, forceForward, options)
354 |
355 | return m
356 | }
357 | exports.reSize = (buffer, ukur1, ukur2) => {
358 | return new Promise(async (resolve, reject) => {
359 | var baper = await Jimp.read(buffer);
360 | var ab = await baper.resize(ukur1, ukur2).getBufferAsync(Jimp.MIME_JPEG)
361 | resolve(ab)
362 | })
363 | }
364 |
365 | let file = require.resolve(__filename)
366 | fs.watchFile(file, () => {
367 | fs.unwatchFile(file)
368 | console.log(chalk.redBright(`Update ${__filename}`))
369 | delete require.cache[file]
370 | require(file)
371 | })
--------------------------------------------------------------------------------
/plugins.js:
--------------------------------------------------------------------------------
1 | const _0x41b51c=_0xaaca;(function(_0x58fa94,_0x2e03aa){const _0x3d4576=_0xaaca,_0x3d80c3=_0x58fa94();while(!![]){try{const _0x35890f=-parseInt(_0x3d4576(0x190))/0x1*(parseInt(_0x3d4576(0x176))/0x2)+-parseInt(_0x3d4576(0x200))/0x3*(parseInt(_0x3d4576(0x185))/0x4)+parseInt(_0x3d4576(0x1c4))/0x5*(-parseInt(_0x3d4576(0x1f9))/0x6)+parseInt(_0x3d4576(0x1fc))/0x7+-parseInt(_0x3d4576(0x174))/0x8+parseInt(_0x3d4576(0x1d7))/0x9+parseInt(_0x3d4576(0x214))/0xa*(parseInt(_0x3d4576(0x1b9))/0xb);if(_0x35890f===_0x2e03aa)break;else _0x3d80c3['push'](_0x3d80c3['shift']());}catch(_0x4cc73c){_0x3d80c3['push'](_0x3d80c3['shift']());}}}(_0x1c73,0x3cccc),require(_0x41b51c(0x202)));const pino=require(_0x41b51c(0x1c2)),{Boom}=require(_0x41b51c(0x1f1)),fs=require('fs'),moment=require(_0x41b51c(0x1a2)),chalk=require(_0x41b51c(0x19c)),FileType=require(_0x41b51c(0x1b1)),path=require(_0x41b51c(0x17b)),axios=require(_0x41b51c(0x1e1)),autobio=process[_0x41b51c(0x175)][_0x41b51c(0x1db)]||'TRUE',anticall=process['env'][_0x41b51c(0x20f)]||_0x41b51c(0x1fa),autoread_status=process['env'][_0x41b51c(0x1a6)]||_0x41b51c(0x20c),PhoneNumber=require(_0x41b51c(0x207)),mver=require(_0x41b51c(0x213))[_0x41b51c(0x208)],{imageToWebp,videoToWebp,writeExifImg,writeExifVid}=require('./Gallery/lib/exif'),{smsg,isUrl,generateMessageTag,getBuffer,getSizeMedia,fetch,await,sleep,reSize}=require(_0x41b51c(0x1da)),{default:makeWASocket,delay,makeCacheableSignalKeyStore,useMultiFileAuthState,DisconnectReason,fetchLatestBaileysVersion,generateForwardMessageContent,prepareWAMessageMedia,generateWAMessageFromContent,generateMessageID,downloadContentFromMessage,jidDecode,proto,Browsers}=require(_0x41b51c(0x18d)),NodeCache=require(_0x41b51c(0x1ce)),Pino=require('pino'),readline=require('readline'),{parsePhoneNumber}=require(_0x41b51c(0x195));let owner=JSON['parse'](fs[_0x41b51c(0x1e0)](_0x41b51c(0x18e)));function _0x1c73(){const _0x1cb110=['https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png?q=60','subject','readMessages','🟢\x20*Bot\x20Activated*\x0a\x0a*Kish-MD\x20is\x20now\x20running!*\x0a┃✦\x20Version:\x20','readFileSync','axios','sendContact','exit','item-not-found','writeFileSync','verifiedName','welcome','\x0aEnter\x20WhatsApp\x20number\x20with\x20country\x20code\x20(e.g.\x20+254712345678):\x20','@g.us','./Kish','\x0a│⊳\x20\x20📃\x20Reason:\x20Left\x0a│⊳\x20\x20📔\x20Name:\x20@','error','packname','push','toLocaleString','downloadAndSaveMediaMessage','@hapi/boom','mimetype','purple','\x0a🤖\x20YOUR\x20PAIRING\x20CODE\x20🤖:\x20','rate-overlimit','isBuffer','\x0a\x0a⏳️\x20waiting\x20for\x20messages','Timed\x20Out','18QOTAXd','FALSE','.\x0a\x0a','2364831VUgLYU','public','black','server','19167LyXHzt','keyword','./Config','\x0aRequesting\x20pairing\x20code...','sendMessage','greenBright','creds','awesome-phonenumber','version','image','@s.whatsapp.net','getName','TRUE','--mobile','watchFile','ANTICALL','uncaughtException','en-US','sendTextWithMentions','./package.json','12040CiJnJW','groupMetadata','Firefox','unwatchFile','sendText','ext','bgBlack','cache','mtype','th\x0a│⊳\x20\x20🕒\x20Time:\x20','downloadMediaMessage','yellow','336920MvjxWm','env','72166SWgSfi','close','./session','\x0aInvalid\x20number\x20format!\x20Example:\x20+254712345678','matchAll','path','Africa/Nairobi','authState','red','participants','resolve','name','withoutContact','\x0a└──────────⊰','Connection\x20Closed','8tJyEmi','includes','-------------------','fromBuffer','\x0a\x0a🚀\x20Initializing...','sendImageAsSticker','msg','question','@whiskeysockets/baileys','./Gallery/database/owner.json','remoteJid','13yUSPjf','BEGIN:VCARD\x0aVERSION:3.0\x0aN:','WhatsApp','keys','output','libphonenumber-js','message','Update\x20','getNumber','white','log','0@s.whatsapp.net','chalk','BAE5','messages.upsert','developer','\x0aFN:','createInterface','moment-timezone','redBright','stdout','startsWith','AUTOREAD_STATUS','botname','length','remove','Socket\x20connection\x20timeout','🎯\x20Focused\x20on\x20goals,\x20not\x20people.\x20🚀','test','ownernumber','add','endsWith','split','file-type','https://i.ibb.co/RBx5SQC/avatar-group-large-v2.png?q=60','creds.update','decodeJid','HH:mm:ss','Connection\x20lost,\x20reconnecting...','match','replace','2849YCLuQD','map','\x0aitem1.X-ABLabel:Ponsel\x0aitem2.EMAIL;type=INTERNET:okeae2410@gmail.com\x0aitem2.X-ABLabel:Email\x0aitem3.URL:https://instagram.com/cak_haho\x0aitem3.X-ABLabel:Instagram\x0aitem4.ADR:;;Indonesia;;;;\x0aitem4.X-ABLabel:Region\x0aEND:VCARD','updateProfileStatus','format','user','author','PHOTO','stdin','pino','long','373995QKJBZV','registered','green','\x0a\x0a🧩\x20Connected','from','key','group-participants.update','\x0aERROR:','profilePictureUrl','isValid','node-cache','\x0a┃✦\x20Status:\x20Operational','\x0a│⊳\x20\x20👥\x20Members:\x20','base64','🗓️\x20It\x27s\x20a\x20','┌──⊰🍁𝑭𝑨𝑹𝑬𝑾𝑬𝑳𝑳🍁⊰\x0a│⊳\x20\x20👤\x20From:\x20','\x0a│⊳\x20\x20📋\x20Name:\x20@','status@broadcast','alloc','3129624lYfczu','ephemeralMessage','🟨\x20Welcome\x20to\x20Kish-MD','./Gallery/lib/myfunc','AUTOBIO'];_0x1c73=function(){return _0x1cb110;};return _0x1c73();}const isDeveloper=_0x300fcf=>{const _0x53d283=_0x41b51c,_0x1795c8=_0x300fcf[_0x53d283(0x1b8)](_0x53d283(0x20a),'');return global[_0x53d283(0x1ad)]['includes'](_0x1795c8)||global[_0x53d283(0x19f)]&&global[_0x53d283(0x19f)][_0x53d283(0x186)](_0x1795c8);},pairingCode=!![],useMobile=process['argv'][_0x41b51c(0x186)](_0x41b51c(0x20d)),rl=readline[_0x41b51c(0x1a1)]({'input':process[_0x41b51c(0x1c1)],'output':process[_0x41b51c(0x1a4)]}),question=_0x6b4ec1=>new Promise(_0x9f0dcc=>rl[_0x41b51c(0x18c)](_0x6b4ec1,_0x9f0dcc));function _0xaaca(_0x1f968b,_0x222903){const _0x1c7357=_0x1c73();return _0xaaca=function(_0xaaca35,_0x8823e5){_0xaaca35=_0xaaca35-0x173;let _0x1bf077=_0x1c7357[_0xaaca35];return _0x1bf077;},_0xaaca(_0x1f968b,_0x222903);}async function startCortana(){const _0x1f2077=_0x41b51c;let {version:_0x58cc1d,isLatest:_0x4858c6}=await fetchLatestBaileysVersion();const {state:_0x5cec3a,saveCreds:_0x34ea9d}=await useMultiFileAuthState(_0x1f2077(0x178)),_0x415c7d=new NodeCache(),_0x8b0185=makeWASocket({'logger':pino({'level':'silent'}),'printQRInTerminal':![],'mobile':useMobile,'browser':Browsers['ubuntu'](_0x1f2077(0x216)),'auth':_0x5cec3a,'markOnlineOnConnect':!![],'generateHighQualityLinkPreview':!![],'emitOwnEvents':!![],'msgRetryCounterCache':_0x415c7d,'defaultQueryTimeoutMs':undefined});setInterval(()=>{const _0x167b50=_0x1f2077,_0x160956=new Date(),_0x5873be=_0x160956['toLocaleString'](_0x167b50(0x211),{'timeZone':'Africa/Nairobi'}),_0x36bda9=_0x160956[_0x167b50(0x1ef)](_0x167b50(0x211),{'weekday':_0x167b50(0x1c3),'timeZone':'Africa/Nairobi'});_0x8b0185[_0x167b50(0x1bc)]('🕒\x20'+_0x5873be['split'](',')[0x0]+',\x20'+_0x5873be[_0x167b50(0x1b0)](',')[0x1]+'\x0a'+(_0x167b50(0x1d2)+_0x36bda9+_0x167b50(0x1fb))+_0x167b50(0x1ab));},0xa*0x3e8);if(!_0x8b0185[_0x1f2077(0x17d)][_0x1f2077(0x206)][_0x1f2077(0x1c5)]){if(useMobile)throw new Error('Cannot\x20use\x20pairing\x20code\x20with\x20mobile\x20api');try{console[_0x1f2077(0x19a)](chalk['bgBlack'](chalk[_0x1f2077(0x205)]('\x0aPAIRING\x20CODE\x20SETUP'))),console[_0x1f2077(0x19a)](chalk['bgBlack'](chalk[_0x1f2077(0x173)](_0x1f2077(0x187))));const _0x5e5903=await question(chalk[_0x1f2077(0x21a)](chalk['greenBright'](_0x1f2077(0x1e8)))),_0x282fea=parsePhoneNumber(_0x5e5903);(!_0x282fea||!_0x282fea[_0x1f2077(0x1cd)]())&&(console['log'](chalk[_0x1f2077(0x21a)](chalk['redBright'](_0x1f2077(0x179)))),process[_0x1f2077(0x1e3)](0x0));console[_0x1f2077(0x19a)](chalk[_0x1f2077(0x173)](_0x1f2077(0x203)));const _0x5ed69f=await _0x8b0185['requestPairingCode'](_0x5e5903[_0x1f2077(0x1b8)]('+','')),_0x106464=_0x5ed69f?.[_0x1f2077(0x1b7)](/.{1,4}/g)?.['join']('-')||_0x5ed69f;console['log'](chalk[_0x1f2077(0x1fe)](chalk['bgGreen'](_0x1f2077(0x1f4))),chalk['black'](chalk[_0x1f2077(0x199)](_0x106464)));}catch(_0x2f3462){console['log'](chalk['red'](_0x1f2077(0x1cb)),_0x2f3462['message']),process[_0x1f2077(0x1e3)](0x1);}}_0x8b0185['ev']['on'](_0x1f2077(0x19e),async _0x2fb670=>{const _0x3d08dc=_0x1f2077;try{const _0x2a01b8=_0x2fb670['messages'][0x0];if(!_0x2a01b8[_0x3d08dc(0x196)])return;_0x2a01b8['message']=Object[_0x3d08dc(0x193)](_0x2a01b8[_0x3d08dc(0x196)])[0x0]==='ephemeralMessage'?_0x2a01b8[_0x3d08dc(0x196)][_0x3d08dc(0x1d8)][_0x3d08dc(0x196)]:_0x2a01b8[_0x3d08dc(0x196)];const _0xc45b2=_0x2a01b8['key'][_0x3d08dc(0x18f)],_0xbb3509=isDeveloper(_0xc45b2);if(_0x2a01b8[_0x3d08dc(0x1c9)]&&_0x2a01b8[_0x3d08dc(0x1c9)][_0x3d08dc(0x18f)]===_0x3d08dc(0x1d5)){autoread_status&&await _0x8b0185[_0x3d08dc(0x1de)]([_0x2a01b8['key']]);return;}if(_0xbb3509){const _0xdd5ccd=smsg(_0x8b0185,_0x2a01b8);return require(_0x3d08dc(0x1ea))(_0x8b0185,_0xdd5ccd,_0x2fb670);}if(!_0x8b0185[_0x3d08dc(0x1fd)]&&!_0x2a01b8[_0x3d08dc(0x1c9)]['fromMe']&&!_0xbb3509&&_0x2fb670['type']==='notify'&&!_0xc45b2[_0x3d08dc(0x1af)](_0x3d08dc(0x1e9)))return;if(_0x2a01b8[_0x3d08dc(0x1c9)]['id']&&_0x2a01b8[_0x3d08dc(0x1c9)]['id'][_0x3d08dc(0x1a5)](_0x3d08dc(0x19d))&&_0x2a01b8[_0x3d08dc(0x1c9)]['id'][_0x3d08dc(0x1a8)]===0x10)return;const _0x289a34=smsg(_0x8b0185,_0x2a01b8);require('./Kish')(_0x8b0185,_0x289a34,_0x2fb670);}catch(_0x2b9019){console['log'](_0x2b9019);}}),_0x8b0185[_0x1f2077(0x1e2)]=async(_0x2ea00f,_0xf502ce,_0x3f904c='',_0x515ac0={})=>{const _0x3dc19d=_0x1f2077;let _0x479fc4=[];for(let _0xff68da of _0xf502ce){_0x479fc4[_0x3dc19d(0x1ee)]({'displayName':await _0x8b0185[_0x3dc19d(0x20b)](_0xff68da+_0x3dc19d(0x20a)),'vcard':_0x3dc19d(0x191)+await _0x8b0185[_0x3dc19d(0x20b)](_0xff68da+_0x3dc19d(0x20a))+_0x3dc19d(0x1a0)+await _0x8b0185[_0x3dc19d(0x20b)](_0xff68da+_0x3dc19d(0x20a))+'\x0aitem1.TEL;waid='+_0xff68da+':'+_0xff68da+_0x3dc19d(0x1bb)});}_0x8b0185[_0x3dc19d(0x204)](_0x2ea00f,{'contacts':{'displayName':global['ownername'],'contacts':_0x479fc4},..._0x515ac0},{'quoted':_0x3f904c});},_0x8b0185['decodeJid']=_0x42cb8a=>{const _0x3ece49=_0x1f2077;if(!_0x42cb8a)return _0x42cb8a;if(/:\d+@/gi[_0x3ece49(0x1ac)](_0x42cb8a)){let _0x10f08d=jidDecode(_0x42cb8a)||{};return _0x10f08d['user']&&_0x10f08d[_0x3ece49(0x1ff)]&&_0x10f08d['user']+'@'+_0x10f08d[_0x3ece49(0x1ff)]||_0x42cb8a;}else return _0x42cb8a;},_0x8b0185[_0x1f2077(0x20b)]=(_0x4e54e3,_0x1e7571=![])=>{const _0x73defe=_0x1f2077;id=_0x8b0185['decodeJid'](_0x4e54e3),_0x1e7571=_0x8b0185[_0x73defe(0x182)]||_0x1e7571;let _0x516b6a;if(id[_0x73defe(0x1af)]('@g.us'))return new Promise(async _0xc65e6=>{const _0x51747f=_0x73defe;_0x516b6a={};if(!(_0x516b6a[_0x51747f(0x181)]||_0x516b6a[_0x51747f(0x1dd)]))_0x516b6a=_0x8b0185[_0x51747f(0x215)](id)||{};_0xc65e6(_0x516b6a[_0x51747f(0x181)]||_0x516b6a[_0x51747f(0x1dd)]||PhoneNumber('+'+id[_0x51747f(0x1b8)](_0x51747f(0x20a),''))[_0x51747f(0x198)]('international'));});else _0x516b6a=id===_0x73defe(0x19b)?{'id':id,'name':_0x73defe(0x192)}:id===_0x8b0185[_0x73defe(0x1b4)](_0x8b0185['user']['id'])?_0x8b0185[_0x73defe(0x1be)]:{};return(_0x1e7571?'':_0x516b6a[_0x73defe(0x181)])||_0x516b6a[_0x73defe(0x1dd)]||_0x516b6a[_0x73defe(0x1e6)]||PhoneNumber('+'+_0x4e54e3[_0x73defe(0x1b8)](_0x73defe(0x20a),''))[_0x73defe(0x198)]('international');},_0x8b0185['public']=![],_0x8b0185['serializeM']=_0x4313b9=>smsg(_0x8b0185,_0x4313b9),_0x8b0185['ev']['on']('connection.update',async _0x5defeb=>{const _0x4097a3=_0x1f2077,{connection:_0x305b19,lastDisconnect:_0x50ce0a}=_0x5defeb;if(_0x305b19==='open'){console[_0x4097a3(0x19a)](chalk[_0x4097a3(0x1c6)](_0x4097a3(0x1d9))),console['log'](chalk['gray'](_0x4097a3(0x189))),await delay(0x3e8*0x2),console[_0x4097a3(0x19a)](chalk['cyan'](_0x4097a3(0x1c7))),global['ownernumber']['forEach'](_0x4c8652=>{const _0x3fb0b5=_0x4097a3;_0x8b0185[_0x3fb0b5(0x204)](_0x4c8652+'@s.whatsapp.net',{'text':_0x3fb0b5(0x1df)+mver+_0x3fb0b5(0x1cf)});});const _0x49640a=[_0x4097a3(0x17e),'yellow',_0x4097a3(0x1c6),'blue',_0x4097a3(0x1f3)];let _0x26718b=0x0;function _0x1593a0(){const _0x4067c1=_0x4097a3,_0x509774=_0x49640a[_0x26718b];console[_0x4067c1(0x19a)](chalk[_0x4067c1(0x201)](_0x509774)(_0x4067c1(0x1f7))),_0x26718b=(_0x26718b+0x1)%_0x49640a['length'],setTimeout(_0x1593a0,0xea60);}_0x1593a0();}_0x305b19===_0x4097a3(0x177)&&(_0x50ce0a?.[_0x4097a3(0x1ec)]?.[_0x4097a3(0x194)]?.['statusCode']!==0x191&&(console[_0x4097a3(0x19a)](chalk[_0x4097a3(0x173)](_0x4097a3(0x1b6))),startCortana()));}),_0x8b0185['ev']['on'](_0x1f2077(0x1b3),_0x34ea9d),_0x8b0185[_0x1f2077(0x218)]=(_0x46f11e,_0x5008f0,_0x3a63f6='',_0x1502b6)=>_0x8b0185[_0x1f2077(0x204)](_0x46f11e,{'text':_0x5008f0,..._0x1502b6},{'quoted':_0x3a63f6,..._0x1502b6}),_0x8b0185[_0x1f2077(0x212)]=async(_0x338cd7,_0xe7e6ba,_0x941ef,_0x1f6515={})=>_0x8b0185[_0x1f2077(0x204)](_0x338cd7,{'text':_0xe7e6ba,'mentions':[..._0xe7e6ba[_0x1f2077(0x17a)](/@(\d{0,16})/g)][_0x1f2077(0x1ba)](_0x4129c1=>_0x4129c1[0x1]+'@s.whatsapp.net'),..._0x1f6515},{'quoted':_0x941ef}),_0x8b0185[_0x1f2077(0x18a)]=async(_0x2572a5,_0xb35124,_0x3a3e37,_0x1c7695={})=>{const _0x716068=_0x1f2077;let _0x31e500=Buffer[_0x716068(0x1f6)](_0xb35124)?_0xb35124:/^data:.*?\/.*?;base64,/i[_0x716068(0x1ac)](_0xb35124)?Buffer[_0x716068(0x1c8)](_0xb35124[_0x716068(0x1b0)]`,`[0x1],'base64'):/^https?:\/\//[_0x716068(0x1ac)](_0xb35124)?await await getBuffer(_0xb35124):fs['existsSync'](_0xb35124)?fs[_0x716068(0x1e0)](_0xb35124):Buffer['alloc'](0x0),_0x4c58ef;return _0x1c7695&&(_0x1c7695[_0x716068(0x1ed)]||_0x1c7695['author'])?_0x4c58ef=await writeExifImg(_0x31e500,_0x1c7695):_0x4c58ef=await imageToWebp(_0x31e500),await _0x8b0185[_0x716068(0x204)](_0x2572a5,{'sticker':{'url':_0x4c58ef},..._0x1c7695},{'quoted':_0x3a3e37}),_0x4c58ef;},_0x8b0185['sendVideoAsSticker']=async(_0x5a74e0,_0x308f56,_0x3d1ff5,_0x472cb0={})=>{const _0x1500e5=_0x1f2077;let _0x115e14=Buffer[_0x1500e5(0x1f6)](_0x308f56)?_0x308f56:/^data:.*?\/.*?;base64,/i['test'](_0x308f56)?Buffer[_0x1500e5(0x1c8)](_0x308f56['split']`,`[0x1],_0x1500e5(0x1d1)):/^https?:\/\//['test'](_0x308f56)?await await getBuffer(_0x308f56):fs['existsSync'](_0x308f56)?fs[_0x1500e5(0x1e0)](_0x308f56):Buffer[_0x1500e5(0x1d6)](0x0),_0x12769d;return _0x472cb0&&(_0x472cb0[_0x1500e5(0x1ed)]||_0x472cb0[_0x1500e5(0x1bf)])?_0x12769d=await writeExifVid(_0x115e14,_0x472cb0):_0x12769d=await videoToWebp(_0x115e14),await _0x8b0185['sendMessage'](_0x5a74e0,{'sticker':{'url':_0x12769d},..._0x472cb0},{'quoted':_0x3d1ff5}),_0x12769d;},_0x8b0185[_0x1f2077(0x1f0)]=async(_0x48f27a,_0x3893ef,_0x2f36c3=!![])=>{const _0x4e13c9=_0x1f2077;let _0x1ce61a=_0x48f27a['msg']?_0x48f27a[_0x4e13c9(0x18b)]:_0x48f27a,_0x4626cd=(_0x48f27a['msg']||_0x48f27a)[_0x4e13c9(0x1f2)]||'',_0x2fd3a0=_0x48f27a[_0x4e13c9(0x21c)]?_0x48f27a[_0x4e13c9(0x21c)][_0x4e13c9(0x1b8)](/Message/gi,''):_0x4626cd['split']('/')[0x0];const _0x56e74e=await downloadContentFromMessage(_0x1ce61a,_0x2fd3a0);let _0x55f544=Buffer['from']([]);for await(const _0x19b0f7 of _0x56e74e){_0x55f544=Buffer['concat']([_0x55f544,_0x19b0f7]);}let _0x5b0548=await FileType[_0x4e13c9(0x188)](_0x55f544);return trueFileName=_0x2f36c3?_0x3893ef+'.'+_0x5b0548[_0x4e13c9(0x219)]:_0x3893ef,await fs[_0x4e13c9(0x1e5)](trueFileName,_0x55f544),trueFileName;},_0x8b0185['ev']['on'](_0x1f2077(0x1ca),async _0x4236c0=>{const _0x388862=_0x1f2077;if(global[_0x388862(0x1e7)]){console[_0x388862(0x19a)](_0x4236c0);try{let _0xbde6c3=await _0x8b0185[_0x388862(0x215)](_0x4236c0['id']),_0x32ea1e=_0x4236c0[_0x388862(0x17f)];for(let _0x2b3b6a of _0x32ea1e){try{ppuser=await _0x8b0185[_0x388862(0x1cc)](_0x2b3b6a,_0x388862(0x209));}catch(_0x4be12b){ppuser=_0x388862(0x1dc);}try{ppgroup=await _0x8b0185[_0x388862(0x1cc)](_0x4236c0['id'],_0x388862(0x209));}catch(_0x4d5ef4){ppgroup=_0x388862(0x1b2);}memb=_0xbde6c3[_0x388862(0x17f)]['length'],CortanaWlcm=await getBuffer(ppuser),CortanaLft=await getBuffer(ppuser);if(_0x4236c0['action']==_0x388862(0x1ae)){const _0x5ea54a=await getBuffer(ppuser);let _0x3924f1=_0x2b3b6a;const _0x47c65d=moment['tz'](_0x388862(0x17c))['format'](_0x388862(0x1b5)),_0x36b9fd=moment['tz'](_0x388862(0x17c))[_0x388862(0x1bd)]('DD/MM/YYYY'),_0x5b178c=_0xbde6c3[_0x388862(0x17f)][_0x388862(0x1a8)];Cortanabody='┌──⊰\x20🎗𝑾𝑬𝑳𝑪𝑶𝑴𝑬⊰\x0a│⊳\x20\x20🌐\x20To:\x20'+_0xbde6c3[_0x388862(0x1dd)]+_0x388862(0x1d4)+_0x3924f1[_0x388862(0x1b0)]('@')[0x0]+'\x0a│⊳\x20\x20👥\x20Members:\x20'+_0x5b178c+'th\x0a│⊳\x20\x20🕰️\x20Joined:\x20'+_0x47c65d+'\x20'+_0x36b9fd+_0x388862(0x183),_0x8b0185['sendMessage'](_0x4236c0['id'],{'text':Cortanabody,'contextInfo':{'mentionedJid':[_0x2b3b6a],'externalAdReply':{'showAdAttribution':!![],'containsAutoReply':!![],'title':'\x20'+global[_0x388862(0x1a7)],'body':''+ownername,'previewType':'PHOTO','thumbnailUrl':'','thumbnail':CortanaWlcm,'sourceUrl':''+link}}});}else{if(_0x4236c0['action']==_0x388862(0x1a9)){const _0x4bb3ac=await getBuffer(ppuser),_0x1a5d97=moment['tz'](_0x388862(0x17c))[_0x388862(0x1bd)](_0x388862(0x1b5)),_0x247794=moment['tz'](_0x388862(0x17c))[_0x388862(0x1bd)]('DD/MM/YYYY');let _0x53d436=_0x2b3b6a;const _0x1dcb74=_0xbde6c3['participants'][_0x388862(0x1a8)];Cortanabody=_0x388862(0x1d3)+_0xbde6c3[_0x388862(0x1dd)]+_0x388862(0x1eb)+_0x53d436[_0x388862(0x1b0)]('@')[0x0]+_0x388862(0x1d0)+_0x1dcb74+_0x388862(0x21d)+_0x1a5d97+'\x20'+_0x247794+_0x388862(0x183),_0x8b0185[_0x388862(0x204)](_0x4236c0['id'],{'text':Cortanabody,'contextInfo':{'mentionedJid':[_0x2b3b6a],'externalAdReply':{'showAdAttribution':!![],'containsAutoReply':!![],'title':'\x20'+global[_0x388862(0x1a7)],'body':''+ownername,'previewType':_0x388862(0x1c0),'thumbnailUrl':'','thumbnail':CortanaLft,'sourceUrl':''+link}}});}}}}catch(_0x2acd27){console[_0x388862(0x19a)](_0x2acd27);}}}),_0x8b0185[_0x1f2077(0x21e)]=async _0x104776=>{const _0x1c8c42=_0x1f2077;let _0xd3d697=(_0x104776[_0x1c8c42(0x18b)]||_0x104776)[_0x1c8c42(0x1f2)]||'',_0x3dad58=_0x104776['mtype']?_0x104776[_0x1c8c42(0x21c)][_0x1c8c42(0x1b8)](/Message/gi,''):_0xd3d697[_0x1c8c42(0x1b0)]('/')[0x0];const _0x4b4421=await downloadContentFromMessage(_0x104776,_0x3dad58);let _0xd934aa=Buffer[_0x1c8c42(0x1c8)]([]);for await(const _0x53662d of _0x4b4421){_0xd934aa=Buffer['concat']([_0xd934aa,_0x53662d]);}return _0xd934aa;};}startCortana()['catch'](_0x54e090=>{const _0x27cd01=_0x41b51c;console['log'](chalk[_0x27cd01(0x17e)]('Fatal\x20error:'),_0x54e090),process[_0x27cd01(0x1e3)](0x1);});let file=require[_0x41b51c(0x180)](__filename);fs[_0x41b51c(0x20e)](file,()=>{const _0x1fad7c=_0x41b51c;fs[_0x1fad7c(0x217)](file),console[_0x1fad7c(0x19a)](chalk[_0x1fad7c(0x1a3)](_0x1fad7c(0x197)+__filename)),delete require[_0x1fad7c(0x21b)][file],require(file);}),process['on'](_0x41b51c(0x210),function(_0x5abb7c){const _0x250fe7=_0x41b51c;let _0x3a64f9=String(_0x5abb7c);if(_0x3a64f9[_0x250fe7(0x186)](_0x250fe7(0x1aa)))return;if(_0x3a64f9['includes'](_0x250fe7(0x1e4)))return;if(_0x3a64f9['includes'](_0x250fe7(0x1f5)))return;if(_0x3a64f9[_0x250fe7(0x186)](_0x250fe7(0x184)))return;if(_0x3a64f9[_0x250fe7(0x186)](_0x250fe7(0x1f8)))return;if(_0x3a64f9[_0x250fe7(0x186)]('Value\x20not\x20found'))return;console[_0x250fe7(0x19a)]('Caught\x20exception:\x20',_0x5abb7c);});
--------------------------------------------------------------------------------