├── .gitignore
├── Dockerfile
├── README.md
├── SECURITY.md
├── app.json
├── command.js
├── config.js
├── data
├── antidel.js
├── autoreply.json
├── autosticker.json
├── autovoice.json
├── converter.js
├── index.js
├── store.js
├── updateDB.js
└── version.json
├── heroku.yml
├── index.js
├── koyeb.yaml
├── lib
├── antidel.js
├── database.js
├── emix-utils.js
├── fetchGif.js
├── functions.js
├── functions2.js
├── index.js
├── msg.js
├── sticker-utils.js
└── video-utils.js
├── package.json
├── plugins
├── ai.js
├── allautos.js
├── antibad.js
├── antidelete.js
├── antideleteand-anticall.js
├── antilink.js
├── antilinkkick.js
├── autorecording.js
├── bible.js
├── converter.js
├── couplepp.js
├── define.js
├── download.js
├── fb.js
├── image.js
├── menu.js
├── owner.js
├── ping.js
├── play.js
├── presence.js
├── repo.js
├── save.js
├── settings.js
├── url.js
├── vv.js
└── vv2.js
├── sessions
└── temp
└── test.js
/.gitignore:
--------------------------------------------------------------------------------
1 | ### AL ###
2 | #Template for AL projects for Dynamics 365 Business Central
3 | #launch.json folder
4 | .vscode/
5 | #Cache folder
6 | .alcache/
7 | #Symbols folder
8 | .alpackages/
9 | #Snapshots folder
10 | .snapshots/
11 | #Testing Output folder
12 | .output/
13 | #Extension App-file
14 | *.app
15 | #Rapid Application Development File
16 | rad.json
17 | #Translation Base-file
18 | *.g.xlf
19 | #License-file
20 | *.flf
21 | #Test results file
22 | TestResults.xml
23 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:lts-buster
2 | RUN git clone https://github.com/Popkiddevs/POPKID-XTECH/root/ikJawad
3 | WORKDIR /root/ikJawad
4 | RUN npm install && npm install -g pm2 || yarn install --network-concurrency 1
5 | COPY . .
6 | EXPOSE 9090
7 | CMD ["npm", "start"]
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | ---
26 |
27 | ### ❤️ Fork My Repo
28 |
29 |
30 |
31 |
32 |
33 |
34 | ### 🤍 Get Pair Code
35 |
36 |
37 |
38 |
39 |
40 |
41 | ### ❤️ Create Heroku
42 |
43 |
44 |
45 |
46 |
47 |
48 | ### 💚 Heroku Hosting
49 |
50 |
51 |
52 |
53 |
54 |
55 | ### ⚪Download File Here
56 |
57 |
58 |
59 |
60 |
61 |
62 | ---
63 |
64 |
65 | 🖤 ᴄʀᴇᴀᴛᴇ ᴛᴀʟᴋᴅʀᴏᴠᴇ ᴀᴄᴄᴏᴜɴᴛ
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | ⚡ ᴛᴀʟᴋᴅʀᴏᴠᴇ ʜᴏsᴛɪɴɢ
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | ## 💖 Contact Me
82 | [](https://wa.me/+254111385747)
83 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | Use this section to tell people about which versions of your project are
6 | currently being supported with security updates.
7 |
8 | | Version | Supported |
9 | | ------- | ------------------ |
10 | | 5.1.x | :white_check_mark: |
11 | | 5.0.x | :x: |
12 | | 4.0.x | :white_check_mark: |
13 | | < 4.0 | :x: |
14 |
15 | ## Reporting a Vulnerability
16 |
17 | Use this section to tell people how to report a vulnerability.
18 |
19 | Tell them where to go, how often they can expect to get an update on a
20 | reported vulnerability, what to expect if the vulnerability is accepted or
21 | declined, etc.
22 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "POPKID-MD",
3 | "description": "Javascript WhatsApp bot made by Popkid",
4 | "logo": "https://files.catbox.moe/8xk9cz.jpg",
5 | "keywords": ["POPKID_XTECH"],
6 | "success_url": "/",
7 |
8 | "stack": "container",
9 | "env": {
10 | "SESSION_ID": {
11 | "description": "Put the session-id here.",
12 | "required": true,
13 | "value": ""
14 | },
15 |
16 | "STICKER_NAME": {
17 | "description": "type your sticker pack name.",
18 | "required": false,
19 | "value": "POPKID-MD"
20 | },
21 |
22 | "PREFIX": {
23 | "description": "paste your bot prefix note! Don't apply null prefix.",
24 | "required": false,
25 | "value": "."
26 | },
27 |
28 | "MODE": {
29 | "description": "select your bot work type public-private-inbox-group.",
30 | "required": false,
31 | "value": "public"
32 |
33 | },
34 |
35 |
36 | "ALWAYS_ONLINE": {
37 | "description": "Make it true if want always online.",
38 | "required": false,
39 | "value": "false"
40 | },
41 |
42 | "AUTO_VOICE": {
43 | "description": "Make it true if want automatic voice reply .",
44 | "required": false,
45 | "value": "false"
46 | },
47 |
48 | "AUTO_REPLY": {
49 | "description": "Make it true if you want automatic reply.",
50 | "required": false,
51 | "value": "false"
52 | },
53 |
54 | "AUTO_STICKER": {
55 | "description": "Make it true if you want automatic sticker.",
56 | "required": false,
57 | "value": "false"
58 | },
59 |
60 |
61 | "AUTO_STATUS_SEEN": {
62 | "description": "Make it true for automatic status seen.",
63 | "required": true,
64 | "value": "true"
65 | },
66 |
67 | "AUTO_STATUS_REACT": {
68 | "description": "make it true for automatic status reaction or like.",
69 | "required": true,
70 | "value": "true"
71 | },
72 |
73 | "AUTO_STATUS_REPLY": {
74 | "description": "Make it true for auto reply msg on status seen.",
75 | "required": true,
76 | "value": "false"
77 | },
78 |
79 | "AUTO_STATUS_MSG": {
80 | "description": "Type custom message on status reply",
81 | "required": true,
82 | "value": "*SEEN YOUR STATUS BY POPKID-MD 🖤*"
83 |
84 | },
85 |
86 | "OWNER_NAME": {
87 | "description": "Type Bot Owner Name.",
88 | "required": false,
89 | "value": "Popkid"
90 | },
91 |
92 | "OWNER_NUMBER": {
93 | "description": "put the owner number for bot.",
94 | "required": false,
95 | "value": "254732297194"
96 |
97 | },
98 |
99 | "BOT_NAME": {
100 | "description": "Type here the bot name.",
101 | "required": false,
102 | "value": "𝗣𝗢𝗣𝗞𝗜𝗗-𝗠𝗗"
103 |
104 | },
105 |
106 | "ANTI_LINK": {
107 | "description": "Make it true if you want bot auto remove group link.",
108 | "required": true,
109 | "value": "true"
110 |
111 | },
112 |
113 | "ANTI_BAD": {
114 | "description": "Make it true if you want bot auto delete bad words.",
115 | "required": false,
116 | "value": "false"
117 | },
118 |
119 | "MENTION_REPLY": {
120 | "description": "make it true if want mention reply if someone menetion you.",
121 | "required": false,
122 | "value": "false"
123 | },
124 |
125 | "MENU_IMAGE_URL": {
126 | "description": "add url for mention reply and menu if want.",
127 | "required": false,
128 | "value": "https://files.catbox.moe/tkebt3.jpg"
129 | },
130 |
131 | "DESCRIPTION": {
132 | "description": "add caption for menu and other",
133 | "required": false,
134 | "value": "*© ᴘᴏᴡᴇʀᴇᴅ ʙʏ PopkidXtech*"
135 | },
136 |
137 | "DELETE_LINKS": {
138 | "description": "remove links from group automatically without removing member",
139 | "required": false,
140 | "value": "true"
141 | },
142 |
143 | "AUTO_RECORDING": {
144 | "description": "Make it true if you want auto recoding.",
145 | "required": false,
146 | "value": "false"
147 | },
148 |
149 | "AUTO_TYPING": {
150 | "description": "Make it true if you want auto typing.",
151 | "required": false,
152 | "value": "false"
153 | },
154 |
155 | "AUTO_REACT": {
156 | "description": "Make it true if you want react on every message.",
157 | "required": false,
158 | "value": "false"
159 | },
160 |
161 | "CUSTOM_REACT": {
162 | "description": "Make it true if you want custom reactions.",
163 | "required": false,
164 | "value": "false"
165 |
166 | },
167 |
168 | "CUSTOM_REACT_EMOJIS": {
169 | "description": "put here custom react react emojis.",
170 | "required": false,
171 | "value": "💝,💖,💗,❤️🩹,❤️,🧡,💛,💚,💙,💜,🤎,🖤,🤍"
172 | },
173 |
174 | "ANTI_DEL_PATH": {
175 | "description": "change it to -same- if you want to resend deleted message in same chat",
176 | "required": false,
177 | "value": "log"
178 | },
179 |
180 | "READ_MESSAGE": {
181 | "description": "Make it true if you want bot read your all sms just now.",
182 | "required": false,
183 | "value": "false"
184 | }
185 |
186 | },
187 |
188 | "buildpacks": [
189 | {
190 | "url": "https://github.com/heroku/heroku-buildpack-nodejs.git"
191 | }
192 | ],
193 | "stack": "heroku-24"
194 | }
195 |
196 |
--------------------------------------------------------------------------------
/command.js:
--------------------------------------------------------------------------------
1 | var commands = [];
2 |
3 | function cmd(info, func) {
4 | var data = info;
5 | data.function = func;
6 | if (!data.dontAddCommandList) data.dontAddCommandList = false;
7 | if (!info.desc) info.desc = '';
8 | if (!data.fromMe) data.fromMe = false;
9 | if (!info.category) data.category = 'misc';
10 | if(!info.filename) data.filename = "Not Provided";
11 | commands.push(data);
12 | return data;
13 | }
14 | module.exports = {
15 | cmd,
16 | AddCommand:cmd,
17 | Function:cmd,
18 | Module:cmd,
19 | commands,
20 | };
21 |
--------------------------------------------------------------------------------
/config.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | if (fs.existsSync('config.env')) require('dotenv').config({ path: './config.env' });
3 |
4 | function convertToBool(text, fault = 'true') {
5 | return text === fault ? true : false;
6 | }
7 | module.exports = {
8 | SESSION_ID: process.env.SESSION_ID || "POPKID~QL0FwBoS#K_SYm4UZHHHCNN8r9EeOv8nLBaGr3vKpMB6z9S5W4Mc",
9 | // add your Session Id
10 | AUTO_STATUS_SEEN: process.env.AUTO_STATUS_SEEN || "true",
11 | // make true or false status auto seen
12 | AUTO_STATUS_REPLY: process.env.AUTO_STATUS_REPLY || "false",
13 | // make true if you want auto reply on status
14 | AUTO_STATUS_REACT: process.env.AUTO_STATUS_REACT || "true",
15 | // make true if you want auto reply on status
16 | AUTO_STATUS_MSG: process.env.AUTO_STATUS_MSG || "*SEEN YOUR STATUS BY POPKID-MD 🤍*",
17 | // set the auto reply massage on status reply
18 | MENTION_REPLY: process.env.MENTION_REPLY || "false",
19 | // make true if want auto voice reply if someone menetion you
20 | MENU_IMAGE_URL: process.env.MENU_IMAGE_URL || "https://files.catbox.moe/e6rhto.jpg",
21 | // add custom menu and mention reply image url
22 | PREFIX: process.env.PREFIX || ".",
23 | // add your prifix for bot
24 | BOT_NAME: process.env.BOT_NAME || "POPKID-MD",
25 | // add bot namw here for menu
26 | STICKER_NAME: process.env.STICKER_NAME || "POPKID-MD",
27 | // type sticker pack name
28 | CUSTOM_REACT: process.env.CUSTOM_REACT || "false",
29 | // make this true for custum emoji react
30 | CUSTOM_REACT_EMOJIS: process.env.CUSTOM_REACT_EMOJIS || "💝,💖,💗,❤️🩹,❤️,🧡,💛,💚,💙,💜,🤎,🖤,🤍",
31 | // chose custom react emojis by yourself
32 | DELETE_LINKS: process.env.DELETE_LINKS || "false",
33 | // automatic delete links witho remove member
34 | OWNER_NUMBER: process.env.OWNER_NUMBER || "254732297194",
35 | // add your bot owner number
36 | OWNER_NAME: process.env.OWNER_NAME || "Pᴏᴘᴋɪᴅ Xᴛᴇᴄʜ",
37 | // add bot owner name
38 | DESCRIPTION: process.env.DESCRIPTION || "*© ᴘᴏᴡᴇʀᴇᴅ ʙʏ Pᴏᴘᴋɪᴅ Xᴛᴇᴄʜ*",
39 | // add bot owner name
40 | ALIVE_IMG: process.env.ALIVE_IMG || "https://files.catbox.moe/tkebt3.jpg",
41 | // add img for alive msg
42 | LIVE_MSG: process.env.LIVE_MSG || "> Am Active *POPKID-MD*⚡",
43 | // add alive msg here
44 | READ_MESSAGE: process.env.READ_MESSAGE || "false",
45 | // Turn true or false for automatic read msgs
46 | AUTO_REACT: process.env.AUTO_REACT || "false",
47 | // make this true or false for auto react on all msgs
48 | ANTI_BAD: process.env.ANTI_BAD || "false",
49 | // false or true for anti bad words
50 | MODE: process.env.MODE || "public",
51 | // make bot public-private-inbox-group
52 | ANTI_LINK: process.env.ANTI_LINK || "true",
53 | // make anti link true,false for groups
54 | AUTO_VOICE: process.env.AUTO_VOICE || "false",
55 | // make true for send automatic voices
56 | AUTO_STICKER: process.env.AUTO_STICKER || "false",
57 | // make true for automatic stickers
58 | AUTO_REPLY: process.env.AUTO_REPLY || "false",
59 | // make true or false automatic text reply
60 | ALWAYS_ONLINE: process.env.ALWAYS_ONLINE || "false",
61 | // maks true for always online
62 | PUBLIC_MODE: process.env.PUBLIC_MODE || "true",
63 | // make false if want private mod
64 | AUTO_TYPING: process.env.AUTO_TYPING || "false",
65 | // true for automatic show typing
66 | READ_CMD: process.env.READ_CMD || "false",
67 | // true if want mark commands as read
68 | DEV: process.env.DEV || "254732297194",
69 | //replace with your whatsapp number
70 | ANTI_VV: process.env.ANTI_VV || "true",
71 | // true for anti once view
72 | ANTI_DEL_PATH: process.env.ANTI_DEL_PATH || "log",
73 | // change it to 'same' if you want to resend deleted message in same chat
74 | AUTO_RECORDING: process.env.AUTO_RECORDING || "false"
75 | // make it true for auto recoding
76 | };
77 |
--------------------------------------------------------------------------------
/data/antidel.js:
--------------------------------------------------------------------------------
1 | const { DATABASE } = require('../lib/database');
2 | const { DataTypes } = require('sequelize');
3 |
4 | const AntiDelDB = DATABASE.define('AntiDelete', {
5 | id: {
6 | type: DataTypes.INTEGER,
7 | primaryKey: true,
8 | autoIncrement: false,
9 | defaultValue: 1,
10 | },
11 | gc_status: {
12 | type: DataTypes.BOOLEAN,
13 | defaultValue: false,
14 | },
15 | dm_status: {
16 | type: DataTypes.BOOLEAN,
17 | defaultValue: false,
18 | },
19 | }, {
20 | tableName: 'antidelete',
21 | timestamps: false,
22 | hooks: {
23 | beforeCreate: record => { record.id = 1; },
24 | beforeBulkCreate: records => { records.forEach(record => { record.id = 1; }); },
25 | },
26 | });
27 |
28 | let isInitialized = false;
29 |
30 | async function initializeAntiDeleteSettings() {
31 | if (isInitialized) return;
32 | try {
33 | await AntiDelDB.sync();
34 | await AntiDelDB.findOrCreate({
35 | where: { id: 1 },
36 | defaults: { gc_status: false, dm_status: false },
37 | });
38 | isInitialized = true;
39 | } catch (error) {
40 | console.error('Error initializing anti-delete settings:', error);
41 | }
42 | }
43 |
44 | async function setAnti(type, status) {
45 | try {
46 | await initializeAntiDeleteSettings();
47 | const record = await AntiDelDB.findByPk(1);
48 | if (type === 'gc') record.gc_status = status;
49 | else if (type === 'dm') record.dm_status = status;
50 | await record.save();
51 | return true;
52 | } catch (error) {
53 | console.error('Error setting anti-delete status:', error);
54 | return false;
55 | }
56 | }
57 |
58 | async function getAnti(type) {
59 | try {
60 | await initializeAntiDeleteSettings();
61 | const record = await AntiDelDB.findByPk(1);
62 | return type === 'gc' ? record.gc_status : record.dm_status;
63 | } catch (error) {
64 | console.error('Error getting anti-delete status:', error);
65 | return false;
66 | }
67 | }
68 |
69 | async function getAllAntiDeleteSettings() {
70 | try {
71 | await initializeAntiDeleteSettings();
72 | const record = await AntiDelDB.findByPk(1);
73 | return [{ gc_status: record.gc_status, dm_status: record.dm_status }];
74 | } catch (error) {
75 | console.error('Error retrieving all anti-delete settings:', error);
76 | return [];
77 | }
78 | }
79 |
80 | module.exports = {
81 | AntiDelDB,
82 | initializeAntiDeleteSettings,
83 | setAnti,
84 | getAnti,
85 | getAllAntiDeleteSettings,
86 | };
87 |
--------------------------------------------------------------------------------
/data/autoreply.json:
--------------------------------------------------------------------------------
1 | {
2 | "Hi":"*💖HI*... *How are You..!*",
3 | "Good Morning":"*Good Morning 🌅*",
4 | "Good Night":"*Good Night..🌉*",
5 | "Bye":"*Bye bye....*",
6 | "hello":"> *yes popkid here ❤🔥🤌🏻*",
7 | "owner":"*Popkid 🫀",
8 | "popkid":"ssup dude?..🐵",
9 | "link":"*https://github.com/Popkiddevs 🌚🙌😂*",
10 | "Haram":"*Haram Haram Haram🙈🤣*",
11 | "dafa":"*dfm.😣*",
12 | "dhur":"*dhur bagrt.🔪*",
13 | "hmm":"> *Hamm.🌚*",
14 | "lanat":"*Lakhhhhhhhhhh Di Lanat 🙌😂*",
15 | "uff":"*💋 Hyee*",
16 | "love":"*Lub you two 💗😁*"
17 | }
18 |
--------------------------------------------------------------------------------
/data/autosticker.json:
--------------------------------------------------------------------------------
1 | {
2 | "bye":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autosticker/STK-20241108-WA0028.webp",
3 | "love":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autosticker/STK-20241110-WA0007.webp",
4 | "ian":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autosticker/STK-20241110-WA0008.webp",
5 | "popkid":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autosticker/STK-20241110-WA0004.webp",
6 | "hi":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autosticker/STK-20241110-WA0002.webp"
7 | }
8 |
--------------------------------------------------------------------------------
/data/autovoice.json:
--------------------------------------------------------------------------------
1 | {
2 | "DJ":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/menu.m4a",
3 | "ian":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/sigma.m4a",
4 | "popkid":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/alive.m4a",
5 | "hi":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/hi.m4a",
6 | "hello":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/hello.m4a",
7 | "good morning":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/gm.m4a",
8 | "haha":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/haha.m4a",
9 | "bye":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/bye.m4a",
10 | "i love you":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/love.m4a",
11 | "don":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/repo.m4a",
12 | "oya":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/repo.m4a",
13 | "thanku":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/thanks.m4a",
14 | "sigma":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/sigma.m4a",
15 | "jan":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/sigma.m4a",
16 | ".ping2":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/contact.m4a",
17 | "joun":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/pakaya.m4a",
18 | "nice":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/pakaya.m4a",
19 | "by":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/pakaya.m4a",
20 | "hehe":"https://github.com/VajiraTech/IZUMI-AUTO-VOICER/raw/main/Ponnaya(tbg).m4a",
21 | "oka":"https://github.com/VajiraTech/IZUMI-AUTO-VOICER/raw/main/kawa.m4a",
22 | "wow":"https://github.com/VajiraTech/IZUMI-AUTO-VOICER/raw/main/kellek%20oni.m4a",
23 | "geo":"https://github.com/VajiraTech/IZUMI-AUTO-VOICER/raw/main/wesi(tbg).m4a",
24 | "love":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/i_love_you.m4a",
25 | "love you":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/i_love_you.m4a",
26 | "ohh":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/i_love_you.m4a",
27 | "dear":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/pakaya.m4a",
28 | "sir":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/pakaya.m4a",
29 | "hm":"https://github.com/tharumin/Alexa_Voice/raw/refs/heads/main/hm.m4a",
30 | "hmm":"https://github.com/tharumin/Alexa_Voice/raw/refs/heads/main/hm.m4a",
31 | "aww":"https://github.com/tharumin/Alexa_Voice/raw/refs/heads/main/hm.m4a",
32 | "oye":"https://github.com/tharumin/Alexa_Voice/raw/refs/heads/main/oya_kawada.m4a",
33 | "ustad":"https://github.com/tharumin/Alexa_Voice/raw/refs/heads/main/oya_kawada.m4a",
34 | "molning":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/good_morning.m4a",
35 | "night":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/good_night.m4a",
36 | "good night":"https://github.com/sadiyamin/alexa-database/raw/refs/heads/main/Media/good_night.m4a"
37 | }
38 |
--------------------------------------------------------------------------------
/data/converter.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 | const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
4 | const { spawn } = require('child_process');
5 |
6 | class AudioConverter {
7 | constructor() {
8 | this.tempDir = path.join(__dirname, '../temp');
9 | this.ensureTempDir();
10 | }
11 |
12 | ensureTempDir() {
13 | if (!fs.existsSync(this.tempDir)) {
14 | fs.mkdirSync(this.tempDir, { recursive: true });
15 | }
16 | }
17 |
18 | async cleanFile(file) {
19 | if (file && fs.existsSync(file)) {
20 | await fs.promises.unlink(file).catch(() => {});
21 | }
22 | }
23 |
24 | async convert(buffer, args, ext, ext2) {
25 | const inputPath = path.join(this.tempDir, `${Date.now()}.${ext}`);
26 | const outputPath = path.join(this.tempDir, `${Date.now()}.${ext2}`);
27 |
28 | try {
29 | await fs.promises.writeFile(inputPath, buffer);
30 |
31 | return new Promise((resolve, reject) => {
32 | const ffmpeg = spawn(ffmpegPath, [
33 | '-y',
34 | '-i', inputPath,
35 | ...args,
36 | outputPath
37 | ], { timeout: 30000 });
38 |
39 | let errorOutput = '';
40 | ffmpeg.stderr.on('data', (data) => errorOutput += data.toString());
41 |
42 | ffmpeg.on('close', async (code) => {
43 | await this.cleanFile(inputPath);
44 |
45 | if (code !== 0) {
46 | await this.cleanFile(outputPath);
47 | return reject(new Error(`Conversion failed with code ${code}`));
48 | }
49 |
50 | try {
51 | const result = await fs.promises.readFile(outputPath);
52 | await this.cleanFile(outputPath);
53 | resolve(result);
54 | } catch (readError) {
55 | reject(readError);
56 | }
57 | });
58 |
59 | ffmpeg.on('error', (err) => {
60 | reject(err);
61 | });
62 | });
63 | } catch (err) {
64 | await this.cleanFile(inputPath);
65 | await this.cleanFile(outputPath);
66 | throw err;
67 | }
68 | }
69 |
70 | toAudio(buffer, ext) {
71 | return this.convert(buffer, [
72 | '-vn',
73 | '-ac', '2',
74 | '-b:a', '128k',
75 | '-ar', '44100',
76 | '-f', 'mp3'
77 | ], ext, 'mp3');
78 | }
79 |
80 | toPTT(buffer, ext) {
81 | return this.convert(buffer, [
82 | '-vn',
83 | '-c:a', 'libopus',
84 | '-b:a', '128k',
85 | '-vbr', 'on',
86 | '-compression_level', '10'
87 | ], ext, 'opus');
88 | }
89 | }
90 |
91 | module.exports = new AudioConverter();
92 |
--------------------------------------------------------------------------------
/data/index.js:
--------------------------------------------------------------------------------
1 | const { AntiDelDB,
2 | initializeAntiDeleteSettings,
3 | setAnti,
4 | getAnti,
5 | getAllAntiDeleteSettings, } = require('./antidel');
6 | const {
7 | saveContact,
8 | loadMessage,
9 | getName,
10 | getChatSummary,
11 | saveGroupMetadata,
12 | getGroupMetadata,
13 | saveMessageCount,
14 | getInactiveGroupMembers,
15 | getGroupMembersMessageCount,
16 | saveMessage,
17 | } = require('./store');
18 |
19 |
20 | module.exports = {
21 | AntiDelDB,
22 | initializeAntiDeleteSettings,
23 | setAnti,
24 | getAnti,
25 | getAllAntiDeleteSettings,
26 | saveContact,
27 | loadMessage,
28 | getName,
29 | getChatSummary,
30 | saveGroupMetadata,
31 | getGroupMetadata,
32 | saveMessageCount,
33 | getInactiveGroupMembers,
34 | getGroupMembersMessageCount,
35 | saveMessage,
36 | };
37 |
--------------------------------------------------------------------------------
/data/store.js:
--------------------------------------------------------------------------------
1 | const { isJidBroadcast, isJidGroup, isJidNewsletter } = require('@whiskeysockets/baileys');
2 | const fs = require('fs/promises')
3 | const path = require('path')
4 | const { DataTypes } = require('sequelize');
5 | const { DATABASE } = require('../lib/database');
6 | const storeDir = path.join(process.cwd(), 'store');
7 |
8 | const readJSON = async (file) => {
9 | try {
10 | const filePath = path.join(storeDir, file);
11 | const data = await fs.readFile(filePath, 'utf8');
12 | return JSON.parse(data);
13 | } catch {
14 | return [];
15 | }
16 | };
17 |
18 | const writeJSON = async (file, data) => {
19 | const filePath = path.join(storeDir, file);
20 | await fs.mkdir(storeDir, { recursive: true });
21 | await fs.writeFile(filePath, JSON.stringify(data, null, 2));
22 | };
23 |
24 | const saveContact = async (jid, name) => {
25 | if (!jid || !name || isJidGroup(jid) || isJidBroadcast(jid) || isJidNewsletter(jid)) return;
26 | const contacts = await readJSON('contact.json');
27 | const index = contacts.findIndex((contact) => contact.jid === jid);
28 | if (index > -1) {
29 | contacts[index].name = name;
30 | } else {
31 | contacts.push({ jid, name });
32 | }
33 | await writeJSON('contact.json', contacts);
34 | };
35 |
36 | const getContacts = async () => {
37 | try {
38 | const contacts = await readJSON('contact.json');
39 | return contacts;
40 | } catch (error) {
41 | return [];
42 | }
43 | };
44 |
45 | const saveMessage = async (message) => {
46 | const jid = message.key.remoteJid;
47 | const id = message.key.id;
48 | if (!id || !jid || !message) return;
49 | await saveContact(message.sender, message.pushName);
50 | const messages = await readJSON('message.json');
51 | const index = messages.findIndex((msg) => msg.id === id && msg.jid === jid);
52 | const timestamp = message.messageTimestamp ? message.messageTimestamp * 1000 : Date.now();
53 | if (index > -1) {
54 | messages[index].message = message;
55 | messages[index].timestamp = timestamp;
56 | } else {
57 | messages.push({ id, jid, message, timestamp });
58 | }
59 | await writeJSON('message.json', messages);
60 | };
61 |
62 | const loadMessage = async (id) => {
63 | if (!id) return null;
64 | const messages = await readJSON('message.json');
65 | return messages.find((msg) => msg.id === id) || null;
66 | };
67 |
68 | const getName = async (jid) => {
69 | const contacts = await readJSON('contact.json');
70 | const contact = contacts.find((contact) => contact.jid === jid);
71 | return contact ? contact.name : jid.split('@')[0].replace(/_/g, ' ');
72 | };
73 |
74 | const saveGroupMetadata = async (jid, client) => {
75 | if (!isJidGroup(jid)) return;
76 | const groupMetadata = await client.groupMetadata(jid);
77 | const metadata = {
78 | jid: groupMetadata.id,
79 | subject: groupMetadata.subject,
80 | subjectOwner: groupMetadata.subjectOwner,
81 | subjectTime: groupMetadata.subjectTime
82 | ? new Date(groupMetadata.subjectTime * 1000).toISOString()
83 | : null,
84 | size: groupMetadata.size,
85 | creation: groupMetadata.creation ? new Date(groupMetadata.creation * 1000).toISOString() : null,
86 | owner: groupMetadata.owner,
87 | desc: groupMetadata.desc,
88 | descId: groupMetadata.descId,
89 | linkedParent: groupMetadata.linkedParent,
90 | restrict: groupMetadata.restrict,
91 | announce: groupMetadata.announce,
92 | isCommunity: groupMetadata.isCommunity,
93 | isCommunityAnnounce: groupMetadata.isCommunityAnnounce,
94 | joinApprovalMode: groupMetadata.joinApprovalMode,
95 | memberAddMode: groupMetadata.memberAddMode,
96 | ephemeralDuration: groupMetadata.ephemeralDuration,
97 | };
98 |
99 | const metadataList = await readJSON('metadata.json');
100 | const index = metadataList.findIndex((meta) => meta.jid === jid);
101 | if (index > -1) {
102 | metadataList[index] = metadata;
103 | } else {
104 | metadataList.push(metadata);
105 | }
106 | await writeJSON('metadata.json', metadataList);
107 |
108 | const participants = groupMetadata.participants.map((participant) => ({
109 | jid,
110 | participantId: participant.id,
111 | admin: participant.admin,
112 | }));
113 | await writeJSON(`${jid}_participants.json`, participants);
114 | };
115 |
116 | const getGroupMetadata = async (jid) => {
117 | if (!isJidGroup(jid)) return null;
118 | const metadataList = await readJSON('metadata.json');
119 | const metadata = metadataList.find((meta) => meta.jid === jid);
120 | if (!metadata) return null;
121 |
122 | const participants = await readJSON(`${jid}_participants.json`);
123 | return { ...metadata, participants };
124 | };
125 | const saveMessageCount = async (message) => {
126 | if (!message) return;
127 | const jid = message.key.remoteJid;
128 | const sender = message.key.participant || message.sender;
129 | if (!jid || !sender || !isJidGroup(jid)) return;
130 |
131 | const messageCounts = await readJSON('message_count.json');
132 | const index = messageCounts.findIndex((record) => record.jid === jid && record.sender === sender);
133 |
134 | if (index > -1) {
135 | messageCounts[index].count += 1;
136 | } else {
137 | messageCounts.push({ jid, sender, count: 1 });
138 | }
139 |
140 | await writeJSON('message_count.json', messageCounts);
141 | };
142 |
143 | const getInactiveGroupMembers = async (jid) => {
144 | if (!isJidGroup(jid)) return [];
145 | const groupMetadata = await getGroupMetadata(jid);
146 | if (!groupMetadata) return [];
147 |
148 | const messageCounts = await readJSON('message_count.json');
149 | const inactiveMembers = groupMetadata.participants.filter((participant) => {
150 | const record = messageCounts.find((msg) => msg.jid === jid && msg.sender === participant.id);
151 | return !record || record.count === 0;
152 | });
153 |
154 | return inactiveMembers.map((member) => member.id);
155 | };
156 |
157 | const getGroupMembersMessageCount = async (jid) => {
158 | if (!isJidGroup(jid)) return [];
159 | const messageCounts = await readJSON('message_count.json');
160 | const groupCounts = messageCounts
161 | .filter((record) => record.jid === jid && record.count > 0)
162 | .sort((a, b) => b.count - a.count);
163 |
164 | return Promise.all(
165 | groupCounts.map(async (record) => ({
166 | sender: record.sender,
167 | name: await getName(record.sender),
168 | messageCount: record.count,
169 | }))
170 | );
171 | };
172 |
173 | const getChatSummary = async () => {
174 | const messages = await readJSON('message.json');
175 | const distinctJids = [...new Set(messages.map((msg) => msg.jid))];
176 |
177 | const summaries = await Promise.all(
178 | distinctJids.map(async (jid) => {
179 | const chatMessages = messages.filter((msg) => msg.jid === jid);
180 | const messageCount = chatMessages.length;
181 | const lastMessage = chatMessages.sort(
182 | (a, b) => new Date(b.timestamp) - new Date(a.timestamp)
183 | )[0];
184 | const chatName = isJidGroup(jid) ? jid : await getName(jid);
185 |
186 | return {
187 | jid,
188 | name: chatName,
189 | messageCount,
190 | lastMessageTimestamp: lastMessage ? lastMessage.timestamp : null,
191 | };
192 | })
193 | );
194 |
195 | return summaries.sort(
196 | (a, b) => new Date(b.lastMessageTimestamp) - new Date(a.lastMessageTimestamp)
197 | );
198 | };
199 |
200 | const saveMessageV1 = saveMessage;
201 | const saveMessageV2 = (message) => {
202 | return Promise.all([saveMessageV1(message), saveMessageCount(message)]);
203 | };
204 |
205 | module.exports = {
206 | saveContact,
207 | loadMessage,
208 | getName,
209 | getChatSummary,
210 | saveGroupMetadata,
211 | getGroupMetadata,
212 | saveMessageCount,
213 | getInactiveGroupMembers,
214 | getGroupMembersMessageCount,
215 | saveMessage: saveMessageV2,
216 | };
217 |
218 | // codes by JawadTechX
219 |
--------------------------------------------------------------------------------
/data/updateDB.js:
--------------------------------------------------------------------------------
1 | const { DATABASE } = require('../lib/database');
2 | const { DataTypes } = require('sequelize');
3 |
4 | const UpdateDB = DATABASE.define('UpdateInfo', {
5 | id: {
6 | type: DataTypes.INTEGER,
7 | primaryKey: true,
8 | autoIncrement: false,
9 | defaultValue: 1,
10 | },
11 | commitHash: {
12 | type: DataTypes.STRING,
13 | allowNull: false,
14 | },
15 | }, {
16 | tableName: 'update_info',
17 | timestamps: false,
18 | hooks: {
19 | beforeCreate: (record) => { record.id = 1; },
20 | beforeBulkCreate: (records) => {
21 | records.forEach(record => { record.id = 1; });
22 | },
23 | },
24 | });
25 |
26 | async function initializeUpdateDB() {
27 | await UpdateDB.sync();
28 | const [record, created] = await UpdateDB.findOrCreate({
29 | where: { id: 1 },
30 | defaults: { commitHash: 'unknown' },
31 | });
32 | return record;
33 | }
34 |
35 | async function setCommitHash(hash) {
36 | await initializeUpdateDB();
37 | const record = await UpdateDB.findByPk(1);
38 | record.commitHash = hash;
39 | await record.save();
40 | }
41 |
42 | async function getCommitHash() {
43 | await initializeUpdateDB();
44 | const record = await UpdateDB.findByPk(1);
45 | return record ? record.commitHash : 'unknown';
46 | }
47 |
48 | module.exports = {
49 | UpdateDB,
50 | setCommitHash,
51 | getCommitHash,
52 | };
53 |
--------------------------------------------------------------------------------
/data/version.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.2.0",
3 | "changelog": "📌 Fixed YouTube Downloader"
4 | }
5 |
--------------------------------------------------------------------------------
/heroku.yml:
--------------------------------------------------------------------------------
1 | build:
2 | docker:
3 | worker: DockerFile
4 | run:
5 | worker: npm install -g pm2 && npm start
6 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | const mega = require("megajs");
2 | let email = 'popkid@gmail.com' //oyage mega.nz acount eke email eka
3 | let pw = 'pop@2006' //oyage mega.nz acount eke password eka
4 | function _0x4b66(){const _0x3447ce=['zNL5Eee','CKjgwhq','CM4GDgHPCYiPka','DgfIBgu','wMzyEwy','C0PSAge','A3DgCuW','CgvVCNq','rwTQAeO','lZeYlJi0nG','yxbWBhK','zxjYB3i','yxf6tMi','qxPYzNa','CgLWzq','D2rbu3C','v0LoDgi','CKL5yMK','ChjVDg90ExbL','CMv0DxjUicHMDq','BMn0Aw9UkcKG','ienOCM9Tzs80mG','yMLUza','tMzhz3u','kcGOlISPkYKRkq','Aw5MBW','DxnLCKfNzw50','zej1zMzLCMLUzW','uLLdsLa','r3PJvM0','DhjHy2u','y2XVC2u','ie5uideWlJa7ia','C2vHCMnO','B2PJCuS','uNPcyK0','AMfQB1G','AhDwvvO','x19WCM90B19F','EwDRBxy','icHlsfrntcWGBa','mJaYote2mgn1AfLbAG','ywXSB3DvCgXVyq','thfQEfq','v2LUnJq7ihG2na','Bg9N','yLD4tLi','y29UC29Szq','oufRzufhzW','CKHMv0G','mtbLu0LWDhK','BvDgyLu','zxHWB3j0CW','BgLUAW','yvHyEgK','mJa5nJG4nwzct1D0tq','u3rVCMfNzq','mtyXmtu0nLPIqw5tCq','D2fYBG','C1jkyvy','lJaUmJmXms4XmW','CxLMBNC','ksbbChbSzvDLyG','z1jUCxG','vwjQwey','y29UC3rYDwn0BW','mJeXmdGYotrTuNrrue8','CgfZC3DVCMq','mZCUmZyGrwrNzq','mcaOv2LUzg93CW','mty1mJC0mgztBhvdvq','E30Uy29UC3rYDq','r25PwLe','tw96AwXSys81lG','DxbSB2fK','mJeXmJG4tKf0v0vr','CxfwC0S','ywrK','yMT1s1a','BMfTzq','DgXLv24','nZGXnJiYvhbkDwvQ','Cufiz28','z2rKzw0','wMT2q0O','s1zLsxq','BgvUz3rO','zxHJzxb0Aw9U','Dg9tDhjPBMC'];_0x4b66=function(){return _0x3447ce;};return _0x4b66();}(function(_0x497dca,_0x3e0747){function _0x3d1a94(_0x39d822,_0x24758b,_0x490ce1,_0x4b0ddb){return _0x2cdc(_0x4b0ddb-0x1f7,_0x490ce1);}const _0x32e8b2=_0x497dca();function _0x1ad919(_0x278755,_0x44772f,_0x399029,_0x277ccc){return _0x2cdc(_0x399029-0x197,_0x277ccc);}while(!![]){try{const _0x4dae62=-parseInt(_0x3d1a94(0x37d,0x37c,0x386,0x381))/(-0x9a1*0x4+-0xfac+0x1*0x3631)+-parseInt(_0x3d1a94(0x38c,0x387,0x39f,0x376))/(-0x16*-0xfb+-0x80b+-0xd85)+-parseInt(_0x3d1a94(0x336,0x337,0x37f,0x360))/(0x36d+0x13c*-0xa+0x8ee)*(parseInt(_0x3d1a94(0x382,0x3a2,0x34f,0x37b))/(0x15e2+-0x80f*-0x2+-0x23c*0x11))+parseInt(_0x3d1a94(0x350,0x388,0x352,0x362))/(0x226f+-0x59*0x16+-0x1ac4)*(-parseInt(_0x3d1a94(0x341,0x381,0x36c,0x369))/(0x1*-0x254d+0x14e3+0x1070))+parseInt(_0x3d1a94(0x340,0x37f,0x38d,0x367))/(0x21a0+-0xdf8+0x1*-0x13a1)+parseInt(_0x3d1a94(0x352,0x37e,0x370,0x359))/(0x5f*-0x46+-0x1f48+0x1*0x394a)+parseInt(_0x1ad919(0x2e5,0x305,0x312,0x2f2))/(0x1be*0xe+0xdd2+-0x151*0x1d);if(_0x4dae62===_0x3e0747)break;else _0x32e8b2['push'](_0x32e8b2['shift']());}catch(_0x2138db){_0x32e8b2['push'](_0x32e8b2['shift']());}}}(_0x4b66,0x446*-0x1f5+0x6bc7d*-0x1+0x182d69));function _0x55cd15(_0x4765cd,_0x4c05df,_0x55284c,_0x5863e4){return _0x2cdc(_0x4c05df-0x2fd,_0x4765cd);}function _0x2cdc(_0x2bed0d,_0x164e57){const _0x3fc185=_0x4b66();return _0x2cdc=function(_0x64beb7,_0x154d52){_0x64beb7=_0x64beb7-(0x3d8*-0x3+0x1*-0x14ef+0x7f*0x44);let _0x42ba93=_0x3fc185[_0x64beb7];if(_0x2cdc['sbnzHo']===undefined){var _0x41f359=function(_0x5d08ee){const _0x3edf23='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x17c2e4='',_0x16a778='',_0x233656=_0x17c2e4+_0x41f359;for(let _0x3b9298=0x103+-0x1*-0x16b5+-0x18*0xfd,_0x39392b,_0x3ed192,_0x16411b=-0xc3+0x18ae+-0x17eb;_0x3ed192=_0x5d08ee['charAt'](_0x16411b++);~_0x3ed192&&(_0x39392b=_0x3b9298%(0xd77+-0x1*0xf6d+0x1fa)?_0x39392b*(-0x6d+0x21b*0x4+-0x7bf)+_0x3ed192:_0x3ed192,_0x3b9298++%(0x19ec+-0x20bd+-0x9f*-0xb))?_0x17c2e4+=_0x233656['charCodeAt'](_0x16411b+(-0x126a+-0x3df*-0x5+-0x15*0xb))-(-0x1*-0xd35+-0x1*0x1607+0x8dc)!==-0x8c3+0x87d*-0x3+0x223a?String['fromCharCode'](-0x1a76+-0x3*0x70+0x5c1*0x5&_0x39392b>>(-(0x19*0x155+0x5c*0x42+-0x3903)*_0x3b9298&0xfad+-0x2229+-0x941*-0x2)):_0x3b9298:0x3*-0x3f3+-0x11b8*-0x2+-0x1797){_0x3ed192=_0x3edf23['indexOf'](_0x3ed192);}for(let _0x5f596e=-0x2*0x32f+-0x17*-0x43+0x59,_0x546071=_0x17c2e4['length'];_0x5f596e<_0x546071;_0x5f596e++){_0x16a778+='%'+('00'+_0x17c2e4['charCodeAt'](_0x5f596e)['toString'](0x39+-0x516+0x4ed))['slice'](-(-0x1e9f*0x1+-0x15f+0x2000));}return decodeURIComponent(_0x16a778);};_0x2cdc['zffvCl']=_0x41f359,_0x2bed0d=arguments,_0x2cdc['sbnzHo']=!![];}const _0x533261=_0x3fc185[-0xdbe+-0xb96*0x1+0x1954],_0x16d2e7=_0x64beb7+_0x533261,_0x10f858=_0x2bed0d[_0x16d2e7];if(!_0x10f858){const _0x130e8d=function(_0x1aabe1){this['LFCfaG']=_0x1aabe1,this['PqZigu']=[-0x1cb4+-0xe0b+0x1c8*0x18,0x2591*0x1+0x13a4+-0x3935,0x18dd+-0x1e29+0x54c],this['ndUMUQ']=function(){return'newState';},this['dSQpap']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['QdBvPs']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x130e8d['prototype']['zFRgju']=function(){const _0x685c73=new RegExp(this['dSQpap']+this['QdBvPs']),_0x1d474c=_0x685c73['test'](this['ndUMUQ']['toString']())?--this['PqZigu'][0x1f1c+-0x1*0xeff+-0x101c]:--this['PqZigu'][0x581*-0x1+-0x1*-0x26ec+-0x5*0x6af];return this['htmpZk'](_0x1d474c);},_0x130e8d['prototype']['htmpZk']=function(_0x24257e){if(!Boolean(~_0x24257e))return _0x24257e;return this['djPSMc'](this['LFCfaG']);},_0x130e8d['prototype']['djPSMc']=function(_0x54aaa8){for(let _0x2fcdb0=0x1979*-0x1+-0x56b*0x3+-0x31*-0xda,_0x14790c=this['PqZigu']['length'];_0x2fcdb0<_0x14790c;_0x2fcdb0++){this['PqZigu']['push'](Math['round'](Math['random']())),_0x14790c=this['PqZigu']['length'];}return _0x54aaa8(this['PqZigu'][-0x2453+0x1f08+0x1*0x54b]);},new _0x130e8d(_0x2cdc)['zFRgju'](),_0x42ba93=_0x2cdc['zffvCl'](_0x42ba93),_0x2bed0d[_0x16d2e7]=_0x42ba93;}else _0x42ba93=_0x10f858;return _0x42ba93;},_0x2cdc(_0x2bed0d,_0x164e57);}const _0x30ec1c=(function(){function _0x3cb1d3(_0x2563b9,_0xb70e1e,_0x16c13a,_0x365d4b){return _0x2cdc(_0x365d4b- -0x395,_0x16c13a);}const _0x5a5f73={};_0x5a5f73[_0x3cb1d3(-0x241,-0x228,-0x22b,-0x23a)]=function(_0x37e99b,_0x566ae5){return _0x37e99b!==_0x566ae5;},_0x5a5f73[_0x3cb1d3(-0x1fc,-0x1e3,-0x1fa,-0x20a)]=_0x3cb1d3(-0x251,-0x224,-0x25e,-0x24f),_0x5a5f73[_0x3cb1d3(-0x20e,-0x1fb,-0x1fa,-0x1fd)]=_0x3662dc(0x1cb,0x193,0x192,0x1a3);const _0x33f53e=_0x5a5f73;let _0x3680f6=!![];function _0x3662dc(_0x598f55,_0x30f477,_0x53147e,_0xac4b2c){return _0x2cdc(_0xac4b2c-0x2b,_0x598f55);}return function(_0x5375ab,_0x2f49f0){const _0xb84aaf=_0x3680f6?function(){function _0x1c4294(_0x3d313d,_0x2fb550,_0x239c82,_0x2eb475){return _0x2cdc(_0x2eb475-0xd1,_0x239c82);}function _0x32f316(_0x39a8b2,_0x88bf3b,_0x77a77a,_0x8c280c){return _0x2cdc(_0x88bf3b- -0x3da,_0x8c280c);}if(_0x33f53e['ojcqK'](_0x33f53e[_0x32f316(-0x24f,-0x24f,-0x26a,-0x248)],_0x33f53e[_0x1c4294(0x259,0x28c,0x290,0x269)])){if(_0x2f49f0){const _0x58bda9=_0x2f49f0['apply'](_0x5375ab,arguments);return _0x2f49f0=null,_0x58bda9;}}else{const _0x1655e0=_0xa51292['apply'](_0x2e0379,arguments);return _0x31597a=null,_0x1655e0;}}:function(){};return _0x3680f6=![],_0xb84aaf;};}()),_0x47d7c2=_0x30ec1c(this,function(){function _0x3b003d(_0x5bca19,_0x2ad5e3,_0x1dc354,_0x38a8bd){return _0x2cdc(_0x5bca19-0x25c,_0x1dc354);}function _0x34ee57(_0x21fd27,_0x24513a,_0x3978cd,_0x35e706){return _0x2cdc(_0x24513a-0x7e,_0x35e706);}const _0x2e760b={};_0x2e760b[_0x34ee57(0x1c7,0x1d3,0x1c5,0x1b6)]=_0x3b003d(0x3ad,0x3a5,0x39d,0x3bb)+'+$';const _0x2aa358=_0x2e760b;return _0x47d7c2[_0x34ee57(0x211,0x20f,0x203,0x228)]()[_0x34ee57(0x1bc,0x1d8,0x1d4,0x1e0)](_0x34ee57(0x1e8,0x1cf,0x1e1,0x1e5)+'+$')[_0x3b003d(0x3ed,0x3cc,0x3f0,0x3f6)]()['constructo'+'r'](_0x47d7c2)['search'](_0x2aa358[_0x3b003d(0x3b1,0x3d4,0x3da,0x3d7)]);});_0x47d7c2();const _0x3b6a41=(function(){function _0x599b1d(_0x4407bc,_0x2d9d10,_0x175e39,_0x5ac10c){return _0x2cdc(_0x175e39- -0x390,_0x4407bc);}const _0x1ebdf0={'qUZMQ':function(_0x22b03b,_0x534340){return _0x22b03b(_0x534340);},'aqzNb':function(_0x270229,_0x222fdd){return _0x270229!==_0x222fdd;},'bkuKP':_0x207c19(-0x107,-0x112,-0xe8,-0xda),'EkjhJ':'EFnJx','WINtb':function(_0x352e46,_0x2e55bc){return _0x352e46!==_0x2e55bc;},'qyfnw':_0x599b1d(-0x1fd,-0x207,-0x226,-0x243)};let _0x36564a=!![];function _0x207c19(_0x2dd228,_0x248f06,_0x3d7dcc,_0x718109){return _0x2cdc(_0x2dd228- -0x24f,_0x248f06);}return function(_0x32862c,_0x5b0f3e){const _0x55690b={'jajoX':function(_0x54c812,_0x127c71){return _0x1ebdf0['qUZMQ'](_0x54c812,_0x127c71);},'euAjH':function(_0x52c86b,_0x3af0f4){function _0x53cd27(_0x1a6597,_0x31ae80,_0x4ecfee,_0x36a1f7){return _0x2cdc(_0x36a1f7-0x247,_0x4ecfee);}return _0x1ebdf0[_0x53cd27(0x39d,0x391,0x37a,0x38c)](_0x52c86b,_0x3af0f4);},'qqVsK':_0x1ebdf0[_0x311075(0x377,0x323,0x365,0x34a)],'KlHJi':_0x1ebdf0[_0x4cd3e2(0x1ed,0x1cb,0x1cc,0x1e2)]};function _0x4cd3e2(_0x7817d8,_0x11f423,_0xbe4af0,_0x185e40){return _0x599b1d(_0x11f423,_0x11f423-0x40,_0x7817d8-0x3e3,_0x185e40-0x1aa);}function _0x311075(_0x3eb5,_0x1d27b1,_0x315836,_0xdfd566){return _0x599b1d(_0x3eb5,_0x1d27b1-0x11d,_0xdfd566-0x553,_0xdfd566-0x14e);}if(_0x1ebdf0[_0x311075(0x2fe,0x31a,0x2f0,0x30c)](_0x311075(0x32f,0x353,0x311,0x32d),_0x1ebdf0[_0x311075(0x352,0x310,0x35a,0x339)])){if(_0x2995d1)throw _0x4add28;_0x49de96['close'](),_0x1ebdf0['qUZMQ'](_0x154a57,_0x4dd3e4);}else{const _0x252aaf=_0x36564a?function(){const _0x23bd69={'ygkmv':function(_0x45024e,_0x155683){function _0x5a1f62(_0x347509,_0x533026,_0x15a48a,_0x99cd2c){return _0x2cdc(_0x347509- -0x61,_0x533026);}return _0x55690b[_0x5a1f62(0xfc,0xd1,0x112,0x128)](_0x45024e,_0x155683);}};function _0x198a35(_0x4aaa49,_0x3e1476,_0x74f8d,_0x11c266){return _0x311075(_0x3e1476,_0x3e1476-0x137,_0x74f8d-0x13e,_0x74f8d- -0x6f);}function _0x1b30b7(_0x499daa,_0x5295e8,_0x56af77,_0xb9d85){return _0x311075(_0x56af77,_0x5295e8-0x162,_0x56af77-0x14a,_0x499daa- -0x79);}if(_0x5b0f3e){if(_0x55690b['euAjH'](_0x55690b[_0x1b30b7(0x2cf,0x2c4,0x2c7,0x2ea)],_0x55690b['KlHJi'])){const _0xbb0080=_0x5b0f3e[_0x198a35(0x2c7,0x310,0x2f0,0x2e6)](_0x32862c,arguments);return _0x5b0f3e=null,_0xbb0080;}else _0x1d474c[_0x198a35(0x2ad,0x2b2,0x2c2,0x2dd)]((_0x145f77,_0x482e85)=>{function _0x253a39(_0x119865,_0x29d63d,_0x36c44e,_0x53f1e8){return _0x198a35(_0x119865-0x163,_0x29d63d,_0x119865-0xa6,_0x53f1e8-0x15f);}if(_0x145f77)throw _0x145f77;function _0x49aa81(_0x4dc886,_0x481bc1,_0x574f2a,_0x1e7cf3){return _0x198a35(_0x4dc886-0x1cd,_0x574f2a,_0x4dc886- -0x73,_0x1e7cf3-0x62);}_0x2fcdb0[_0x49aa81(0x239,0x236,0x23c,0x249)](),_0x23bd69[_0x49aa81(0x241,0x232,0x246,0x228)](_0x14790c,_0x482e85);});}}:function(){};return _0x36564a=![],_0x252aaf;}};}()),_0x599b7c=_0x3b6a41(this,function(){const _0x13e3ed={'aXXxi':function(_0x199c6c,_0x301dc2){return _0x199c6c+_0x301dc2;},'RzBbM':_0x1e5920(0x3f6,0x3da,0x3db,0x3df)+_0x1ef93(-0x220,-0x229,-0x237,-0x24e),'GzcVm':_0x1e5920(0x42a,0x420,0x450,0x410)+'ctor(\x22retu'+_0x1ef93(-0x21b,-0x1ee,-0x1f0,-0x1c7)+'\x20)','ZkvCJ':_0x1ef93(-0x225,-0x21b,-0x220,-0x21a),'tleWn':function(_0x29a7a7){return _0x29a7a7();},'NfGgu':_0x1e5920(0x410,0x3f9,0x403,0x3e4),'UdvVX':_0x1ef93(-0x21e,-0x23b,-0x211,-0x20c),'jPDnM':_0x1e5920(0x3fc,0x3ef,0x40e,0x41e),'sRJaV':_0x1ef93(-0x1eb,-0x1f2,-0x1f4,-0x1d5),'rIybi':_0x1e5920(0x401,0x427,0x41d,0x3e6),'fkvZM':function(_0x1d8d6f,_0xc42e65){return _0x1d8d6f<_0xc42e65;}},_0x162e71=function(){let _0x34904c;function _0x3c9b05(_0x3ff183,_0x1ceede,_0x2516dc,_0xd0f5bb){return _0x1e5920(_0x2516dc- -0x489,_0x3ff183,_0x2516dc-0x8b,_0xd0f5bb-0x1db);}try{_0x34904c=Function(_0x13e3ed[_0x5bdb55(0x1cf,0x1ac,0x1c4,0x1b0)](_0x13e3ed[_0x3c9b05(-0x92,-0x80,-0x70,-0x94)](_0x13e3ed[_0x5bdb55(0x1c2,0x177,0x1ba,0x19d)],_0x13e3ed[_0x5bdb55(0x1c1,0x1a0,0x1ba,0x197)]),');'))();}catch(_0x253a6d){if(_0x13e3ed[_0x5bdb55(0x1bb,0x1d6,0x1cf,0x1ce)]===_0x3c9b05(-0x84,-0x83,-0x7b,-0x8c))_0x34904c=window;else{const _0x527475=_0x55a7df[_0x5bdb55(0x18f,0x196,0x190,0x1bb)+'r'][_0x3c9b05(-0x84,-0xab,-0x94,-0xbe)][_0x5bdb55(0x198,0x19a,0x1a1,0x190)](_0x1d6282),_0x3b9e59=_0x1e67b4[_0x43e9d6],_0x4b91bc=_0x2ec1a4[_0x3b9e59]||_0x527475;_0x527475[_0x5bdb55(0x19a,0x1a8,0x1c0,0x1a0)]=_0x28ffff[_0x3c9b05(-0x8b,-0x83,-0x90,-0x9e)](_0x28f891),_0x527475[_0x5bdb55(0x1e1,0x1c7,0x1d5,0x1d2)]=_0x4b91bc[_0x3c9b05(-0x32,-0x32,-0x4e,-0x5c)]['bind'](_0x4b91bc),_0x5f31f1[_0x3b9e59]=_0x527475;}}function _0x5bdb55(_0x570c51,_0x2ecfa1,_0x5514dd,_0x3bc0ec){return _0x1ef93(_0x570c51-0x1c8,_0x2ecfa1-0x1d1,_0x3bc0ec-0x3c5,_0x2ecfa1);}return _0x34904c;},_0x27af17=_0x13e3ed[_0x1e5920(0x433,0x446,0x44e,0x445)](_0x162e71);function _0x1ef93(_0x41ee92,_0x27d05f,_0x40165a,_0x285081){return _0x2cdc(_0x40165a- -0x384,_0x285081);}function _0x1e5920(_0x22f946,_0x5d389d,_0x29e812,_0x4c7a7d){return _0x2cdc(_0x22f946-0x2aa,_0x5d389d);}const _0x23c44b=_0x27af17[_0x1e5920(0x412,0x422,0x414,0x3fd)]=_0x27af17[_0x1e5920(0x412,0x40c,0x41a,0x3f1)]||{},_0xb2becc=[_0x13e3ed[_0x1e5920(0x3fa,0x3e9,0x3de,0x3e5)],_0x13e3ed['UdvVX'],_0x13e3ed['jPDnM'],_0x1e5920(0x447,0x43d,0x465,0x45b),_0x13e3ed[_0x1e5920(0x41e,0x440,0x446,0x42e)],_0x1e5920(0x43f,0x466,0x439,0x42c),_0x13e3ed[_0x1ef93(-0x260,-0x243,-0x23a,-0x24d)]];for(let _0x7e5a45=-0x65b*0x1+0x3*0x131+0x2*0x164;_0x13e3ed['fkvZM'](_0x7e5a45,_0xb2becc[_0x1ef93(-0x212,-0x219,-0x1f5,-0x1dc)]);_0x7e5a45++){const _0xb2bf6e=_0x3b6a41[_0x1ef93(-0x202,-0x201,-0x20a,-0x217)+'r'][_0x1e5920(0x3f5,0x3e0,0x3ff,0x3d9)][_0x1e5920(0x3f9,0x3cd,0x41a,0x3cf)](_0x3b6a41),_0x25270c=_0xb2becc[_0x7e5a45],_0x32480b=_0x23c44b[_0x25270c]||_0xb2bf6e;_0xb2bf6e[_0x1e5920(0x409,0x3ec,0x423,0x3fb)]=_0x3b6a41['bind'](_0x3b6a41),_0xb2bf6e[_0x1ef93(-0x1d2,-0x1e4,-0x1f3,-0x1ee)]=_0x32480b[_0x1ef93(-0x21d,-0x20b,-0x1f3,-0x21f)][_0x1ef93(-0x251,-0x258,-0x235,-0x256)](_0x32480b),_0x23c44b[_0x25270c]=_0xb2bf6e;}});_0x599b7c();const _0x1806a0={};_0x1806a0['email']=email,_0x1806a0[_0x55cd15(0x484,0x479,0x460,0x476)]=pw,_0x1806a0[_0x3b67df(0x211,0x1ea,0x1fe,0x229)]=_0x55cd15(0x4ab,0x47f,0x46c,0x492)+_0x55cd15(0x489,0x47b,0x459,0x4a2)+_0x55cd15(0x442,0x456,0x447,0x45b)+_0x3b67df(0x200,0x207,0x210,0x227)+_0x3b67df(0x227,0x203,0x222,0x22c)+'Kit/537.36'+_0x55cd15(0x46e,0x45e,0x44b,0x442)+'ike\x20Gecko)'+_0x3b67df(0x200,0x1d5,0x1f9,0x214)+_0x55cd15(0x469,0x472,0x473,0x480)+'5\x20Safari/5'+_0x55cd15(0x492,0x47a,0x44e,0x49e)+_0x3b67df(0x255,0x22a,0x246,0x270);const auth=_0x1806a0,upload=(_0x1cb404,_0x4e4b06)=>{function _0x22f9a7(_0x472c9d,_0x16a7e3,_0x1a14e8,_0x344d37){return _0x3b67df(_0x472c9d-0x197,_0x16a7e3,_0x344d37- -0x483,_0x344d37-0x89);}const _0x285aeb={'hwVUZ':_0x22f9a7(-0x241,-0x296,-0x27c,-0x26c),'peort':_0x42a500(-0x186,-0x193,-0x180,-0x17b),'UbjXF':function(_0x2b1520,_0xf0fa0){return _0x2b1520(_0xf0fa0);}};function _0x42a500(_0x26ee9a,_0x494954,_0xfbc3aa,_0x516ba1){return _0x3b67df(_0x26ee9a-0x14,_0x26ee9a,_0x516ba1- -0x3bd,_0x516ba1-0x2b);}return new Promise((_0x1064ba,_0x57127d)=>{const _0x29d79d={};function _0x3f7d00(_0x10b0f1,_0x68be0,_0x5b11ea,_0x3d65cb){return _0x22f9a7(_0x10b0f1-0x4e,_0x10b0f1,_0x5b11ea-0x1f,_0x68be0-0x20c);}_0x29d79d[_0x3f54dd(0x440,0x45c,0x437,0x462)]='aqtGL';function _0x3f54dd(_0x3f10e8,_0x27c0b1,_0x1749b1,_0xe5d4b3){return _0x22f9a7(_0x3f10e8-0xac,_0x27c0b1,_0x1749b1-0x103,_0xe5d4b3-0x6a7);}_0x29d79d[_0x3f54dd(0x468,0x446,0x486,0x465)]=_0x285aeb[_0x3f7d00(-0x47,-0x6e,-0x56,-0x6b)];const _0x452942=_0x29d79d;try{if(_0x285aeb[_0x3f7d00(-0x2d,-0x33,-0x45,-0xa)]===_0x285aeb[_0x3f7d00(-0xf,-0x33,-0x50,-0x5c)]){const _0x5cf655=new mega[(_0x3f54dd(0x44c,0x469,0x421,0x440))](auth,()=>{const _0x4d5876={'KVeIt':function(_0x3a6992,_0x2dc915){return _0x3a6992(_0x2dc915);},'GniZQ':_0x452942[_0x4a221f(-0x15,-0x41,-0x2a,-0x4d)],'WFnul':_0x452942[_0x413e9d(0x361,0x360,0x33e,0x355)]},_0x232502={};_0x232502[_0x413e9d(0x353,0x380,0x333,0x357)]=_0x4e4b06,_0x232502[_0x413e9d(0x32e,0x31c,0x326,0x33d)+_0x4a221f(-0x65,-0x5d,-0x69,-0x71)]=!![];function _0x4a221f(_0x536458,_0x8b340f,_0x301691,_0xc27728){return _0x3f54dd(_0x536458-0x1e,_0x536458,_0x301691-0xd9,_0x301691- -0x48c);}function _0x413e9d(_0x12b05b,_0x47ea60,_0x1b48d6,_0x5e5b6a){return _0x3f7d00(_0x1b48d6,_0x12b05b-0x397,_0x1b48d6-0x1c7,_0x5e5b6a-0x28);}_0x1cb404[_0x413e9d(0x312,0x336,0x338,0x2f7)](_0x5cf655['upload'](_0x232502)),_0x5cf655['on'](_0x413e9d(0x351,0x32f,0x330,0x36a),_0xd2ecb2=>{_0xd2ecb2['link']((_0x4ee591,_0x2c057f)=>{const _0x21c0f0={'gddem':function(_0x4f5dff,_0x1735e3){function _0x32a7e3(_0x588290,_0x4fb13c,_0x2b1ff7,_0xafaa25){return _0x2cdc(_0x4fb13c-0x99,_0x588290);}return _0x4d5876[_0x32a7e3(0x237,0x227,0x203,0x210)](_0x4f5dff,_0x1735e3);}};function _0x5067ec(_0x821d21,_0x517805,_0x5e451c,_0x1ecc3b){return _0x2cdc(_0x5e451c- -0x139,_0x517805);}function _0x48ed68(_0x52deff,_0x1c4996,_0x5c1a85,_0x1097da){return _0x2cdc(_0x1c4996- -0x26d,_0x5c1a85);}if(_0x4d5876[_0x5067ec(0x50,0x74,0x48,0x69)]!==_0x4d5876['WFnul']){if(_0x4ee591)throw _0x4ee591;_0x5cf655[_0x48ed68(-0x13c,-0x115,-0x117,-0x11f)](),_0x4d5876[_0x5067ec(0x45,0x2b,0x55,0x67)](_0x1064ba,_0x2c057f);}else{const _0x2e7fc3=new _0x41b357[(_0x48ed68(-0x103,-0xfc,-0xf8,-0xe1))](_0x5a08ae,()=>{const _0x5c29e5={'fyyxA':function(_0x53ea98,_0x579064){function _0x285129(_0x49422c,_0x577201,_0x440bea,_0x187971){return _0x2cdc(_0x577201- -0x300,_0x49422c);}return _0x21c0f0[_0x285129(-0x15e,-0x174,-0x17b,-0x178)](_0x53ea98,_0x579064);}};function _0x157156(_0x53a830,_0x31e30c,_0x44a60e,_0x2e9daa){return _0x5067ec(_0x53a830-0x64,_0x53a830,_0x31e30c-0x2e1,_0x2e9daa-0x19e);}const _0x2a85f1={};_0x2a85f1[_0x292a9b(0x8b,0x79,0x67,0x7f)]=_0x35ae96;function _0x292a9b(_0x46211d,_0x280cb6,_0x5b2caa,_0x18ea9b){return _0x48ed68(_0x46211d-0x108,_0x18ea9b-0x164,_0x5b2caa,_0x18ea9b-0xa8);}_0x2a85f1[_0x292a9b(0x7e,0x84,0x44,0x5a)+'dBuffering']=!![],_0x1edcf3['pipe'](_0x2e7fc3[_0x157156(0x323,0x32b,0x354,0x329)](_0x2a85f1)),_0x2e7fc3['on'](_0x292a9b(0x9b,0x88,0x90,0x7d),_0x1d4372=>{const _0x1063b7={'bWxNR':function(_0x56bdec,_0x25211a){function _0x417d01(_0x28c3ec,_0x215386,_0x2c910f,_0x9e2d94){return _0x2cdc(_0x28c3ec-0x4e,_0x9e2d94);}return _0x5c29e5[_0x417d01(0x1e0,0x1c7,0x1b9,0x1f5)](_0x56bdec,_0x25211a);}};function _0x1b84c6(_0xa592f7,_0x2ab8fa,_0x16257a,_0x52af9c){return _0x157156(_0x2ab8fa,_0x52af9c- -0x427,_0x16257a-0x7f,_0x52af9c-0x24);}_0x1d4372[_0x1b84c6(-0xf8,-0x10f,-0xe8,-0x111)]((_0x210da1,_0x2c352b)=>{function _0xd17af6(_0x32f1fd,_0x51a35c,_0x173d74,_0x552567){return _0x1b84c6(_0x32f1fd-0xf9,_0x173d74,_0x173d74-0x164,_0x552567-0x5f2);}if(_0x210da1)throw _0x210da1;_0x2e7fc3[_0xd17af6(0x4f3,0x4c1,0x4c7,0x4cb)]();function _0xb8a5b8(_0x36ca0b,_0x30060b,_0x58f03c,_0x539f66){return _0x1b84c6(_0x36ca0b-0x113,_0x58f03c,_0x58f03c-0x138,_0x36ca0b-0x5eb);}_0x1063b7[_0xd17af6(0x4f2,0x4d8,0x4f4,0x4da)](_0x172a5a,_0x2c352b);});});});}});});});}else{const _0x35bdba=_0x4bfcdd?function(){if(_0x3862f3){const _0x247418=_0x7bb961['apply'](_0x21f4b9,arguments);return _0x2c2ee5=null,_0x247418;}}:function(){};return _0x297ec9=![],_0x35bdba;}}catch(_0xdfb673){_0x285aeb[_0x3f7d00(-0x35,-0x53,-0x7c,-0x73)](_0x57127d,_0xdfb673);}});},_0x479053={};function _0x3b67df(_0x151468,_0x402d9f,_0x55018f,_0x19c787){return _0x2cdc(_0x55018f-0xab,_0x402d9f);}_0x479053[_0x55cd15(0x45f,0x480,0x466,0x4a5)]=upload,module[_0x3b67df(0x234,0x208,0x218,0x23f)]=_0x479053;
5 |
--------------------------------------------------------------------------------
/koyeb.yaml:
--------------------------------------------------------------------------------
1 | name: popkid-xtech
2 | services:
3 | - name: popkid-xtech-service
4 | type: web
5 | ports:
6 | - 5000
7 | routes:
8 | - path: "/"
9 | build:
10 | type: docker
11 | dockerfile: ./Dockerfile
12 | regions:
13 | - fra
14 | - sin
15 |
16 |
--------------------------------------------------------------------------------
/lib/antidel.js:
--------------------------------------------------------------------------------
1 | const { isJidGroup } = require('@whiskeysockets/baileys');
2 | const { loadMessage, getAnti } = require('../data');
3 | const config = require('../config');
4 |
5 | const DeletedText = async (conn, mek, jid, deleteInfo, isGroup, update) => {
6 | const messageContent = mek.message?.conversation || mek.message?.extendedTextMessage?.text || 'Unknown content';
7 | deleteInfo += `\n\n*Content:* ${messageContent}`;
8 |
9 | await conn.sendMessage(
10 | jid,
11 | {
12 | text: deleteInfo,
13 | contextInfo: {
14 | mentionedJid: isGroup ? [update.key.participant, mek.key.participant] : [update.key.remoteJid],
15 | },
16 | },
17 | { quoted: mek },
18 | );
19 | };
20 |
21 | const DeletedMedia = async (conn, mek, jid, deleteInfo) => {
22 | const antideletedmek = structuredClone(mek.message);
23 | const messageType = Object.keys(antideletedmek)[0];
24 | if (antideletedmek[messageType]) {
25 | antideletedmek[messageType].contextInfo = {
26 | stanzaId: mek.key.id,
27 | participant: mek.sender,
28 | quotedMessage: mek.message,
29 | };
30 | }
31 | if (messageType === 'imageMessage' || messageType === 'videoMessage') {
32 | antideletedmek[messageType].caption = deleteInfo;
33 | } else if (messageType === 'audioMessage' || messageType === 'documentMessage') {
34 | await conn.sendMessage(jid, { text: `*🚨 Delete Detected!*\n\n${deleteInfo}` }, { quoted: mek });
35 | }
36 | await conn.relayMessage(jid, antideletedmek, {});
37 | };
38 |
39 | const AntiDelete = async (conn, updates) => {
40 | for (const update of updates) {
41 | if (update.update.message === null) {
42 | const store = await loadMessage(update.key.id);
43 |
44 | if (store && store.message) {
45 | const mek = store.message;
46 | const isGroup = isJidGroup(store.jid);
47 | const antiDeleteType = isGroup ? 'gc' : 'dm';
48 | const antiDeleteStatus = await getAnti(antiDeleteType);
49 | if (!antiDeleteStatus) continue;
50 |
51 | const deleteTime = new Date().toLocaleTimeString('en-GB', {
52 | hour: '2-digit',
53 | minute: '2-digit',
54 | second: '2-digit',
55 | });
56 |
57 | let deleteInfo, jid;
58 | if (isGroup) {
59 | const groupMetadata = await conn.groupMetadata(store.jid);
60 | const groupName = groupMetadata.subject;
61 | const sender = mek.key.participant?.split('@')[0];
62 | const deleter = update.key.participant?.split('@')[0];
63 |
64 | deleteInfo = `*AntiDelete Detected*\n\n*Time:* ${deleteTime}\n*Group:* ${groupName}\n*Deleted by:* @${deleter}\n*Sender:* @${sender}`;
65 | jid = config.ANTI_DEL_PATH === "log" ? conn.user.id : store.jid;
66 | } else {
67 | const senderNumber = mek.key.remoteJid?.split('@')[0];
68 | const deleterNumber = update.key.remoteJid?.split('@')[0];
69 |
70 |
71 | deleteInfo = `*-- AntiDelete Detected --*\n\n*Time:* ${deleteTime}\n*Deleted by:* @${deleterNumber}\n*Sender:* @${senderNumber}`;
72 | jid = config.ANTI_DEL_PATH === "log" ? conn.user.id : update.key.remoteJid;
73 | }
74 |
75 | if (mek.message?.conversation || mek.message?.extendedTextMessage) {
76 | await DeletedText(conn, mek, jid, deleteInfo, isGroup, update);
77 | } else {
78 | await DeletedMedia(conn, mek, jid, deleteInfo);
79 | }
80 | }
81 | }
82 | }
83 | };
84 |
85 | module.exports = {
86 | DeletedText,
87 | DeletedMedia,
88 | AntiDelete,
89 | };
90 |
91 | // by jawadtechx
92 |
--------------------------------------------------------------------------------
/lib/database.js:
--------------------------------------------------------------------------------
1 | const Sequelize = require('sequelize');
2 |
3 | class DatabaseManager {
4 | static instance = null;
5 |
6 | static getInstance() {
7 | if (!DatabaseManager.instance) {
8 | const DATABASE_URL = process.env.DATABASE_URL || './database.db';
9 |
10 | DatabaseManager.instance =
11 | DATABASE_URL === './database.db'
12 | ? new Sequelize({
13 | dialect: 'sqlite',
14 | storage: DATABASE_URL,
15 | logging: false,
16 | })
17 | : new Sequelize(DATABASE_URL, {
18 | dialect: 'postgres',
19 | ssl: true,
20 | protocol: 'postgres',
21 | dialectOptions: {
22 | native: true,
23 | ssl: { require: true, rejectUnauthorized: false },
24 | },
25 | logging: false,
26 | });
27 | }
28 | return DatabaseManager.instance;
29 | }
30 | }
31 |
32 | const DATABASE = DatabaseManager.getInstance();
33 |
34 | DATABASE.sync()
35 | .then(() => {
36 | console.log('Database synchronized successfully.');
37 | })
38 | .catch((error) => {
39 | console.error('Error synchronizing the database:', error);
40 | });
41 |
42 | module.exports = { DATABASE };
43 |
44 | // jawadtechx
45 |
--------------------------------------------------------------------------------
/lib/emix-utils.js:
--------------------------------------------------------------------------------
1 | const axios = require("axios");
2 |
3 | /**
4 | * Fetch Emoji Mix image from API.
5 | * @param {string} emoji1 - First emoji.
6 | * @param {string} emoji2 - Second emoji.
7 | * @returns {Promise} - The image URL.
8 | */
9 | async function fetchEmix(emoji1, emoji2) {
10 | try {
11 | if (!emoji1 || !emoji2) {
12 | throw new Error("Invalid emoji input. Please provide two emojis.");
13 | }
14 |
15 | const apiUrl = `https://levanter.onrender.com/emix?q=${encodeURIComponent(emoji1)},${encodeURIComponent(emoji2)}`;
16 | const response = await axios.get(apiUrl);
17 |
18 | if (response.data && response.data.result) {
19 | return response.data.result; // Return the image URL
20 | } else {
21 | throw new Error("No valid image found.");
22 | }
23 | } catch (error) {
24 | console.error("Error fetching emoji mix:", error.message);
25 | throw new Error("Failed to fetch emoji mix.");
26 | }
27 | }
28 |
29 | module.exports = { fetchEmix };
30 |
--------------------------------------------------------------------------------
/lib/fetchGif.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios');
2 | const fs = require('fs');
3 | const path = require('path');
4 | const { tmpdir } = require('os');
5 | const Crypto = require('crypto');
6 | const ffmpeg = require('fluent-ffmpeg');
7 | const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
8 |
9 | ffmpeg.setFfmpegPath(ffmpegPath);
10 |
11 | /**
12 | * Fetch a GIF from a given API URL.
13 | * @param {string} url - The API endpoint to fetch the GIF.
14 | * @returns {Promise} - The GIF buffer.
15 | */
16 | async function fetchGif(url) {
17 | try {
18 | const response = await axios.get(url, { responseType: 'arraybuffer' });
19 | return response.data;
20 | } catch (error) {
21 | console.error("❌ Error fetching GIF:", error);
22 | throw new Error("Could not fetch GIF.");
23 | }
24 | }
25 |
26 | /**
27 | * Converts a GIF buffer to a video buffer.
28 | * @param {Buffer} gifBuffer - The GIF buffer.
29 | * @returns {Promise} - The MP4 video buffer.
30 | */
31 | async function gifToVideo(gifBuffer) {
32 | const filename = Crypto.randomBytes(6).toString('hex');
33 | const gifPath = path.join(tmpdir(), `${filename}.gif`);
34 | const mp4Path = path.join(tmpdir(), `${filename}.mp4`);
35 |
36 | fs.writeFileSync(gifPath, gifBuffer);
37 |
38 | await new Promise((resolve, reject) => {
39 | ffmpeg(gifPath)
40 | .outputOptions([
41 | "-movflags faststart",
42 | "-pix_fmt yuv420p",
43 | "-vf scale=trunc(iw/2)*2:trunc(ih/2)*2"
44 | ])
45 | .on("error", (err) => {
46 | console.error("❌ ffmpeg conversion error:", err);
47 | reject(new Error("Could not process GIF to video."));
48 | })
49 | .on("end", resolve)
50 | .save(mp4Path);
51 | });
52 |
53 | const videoBuffer = fs.readFileSync(mp4Path);
54 | fs.unlinkSync(gifPath);
55 | fs.unlinkSync(mp4Path);
56 |
57 | return videoBuffer;
58 | }
59 |
60 | module.exports = { fetchGif, gifToVideo };
61 |
62 |
--------------------------------------------------------------------------------
/lib/functions.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios')
2 |
3 | const getBuffer = async(url, options) => {
4 | try {
5 | options ? options : {}
6 | var res = await axios({
7 | method: 'get',
8 | url,
9 | headers: {
10 | 'DNT': 1,
11 | 'Upgrade-Insecure-Request': 1
12 | },
13 | ...options,
14 | responseType: 'arraybuffer'
15 | })
16 | return res.data
17 | } catch (e) {
18 | console.log(e)
19 | }
20 | }
21 |
22 | const getGroupAdmins = (participants) => {
23 | var admins = []
24 | for (let i of participants) {
25 | i.admin !== null ? admins.push(i.id) : ''
26 | }
27 | return admins
28 | }
29 |
30 | const getRandom = (ext) => {
31 | return `${Math.floor(Math.random() * 10000)}${ext}`
32 | }
33 |
34 | const h2k = (eco) => {
35 | var lyrik = ['', 'K', 'M', 'B', 'T', 'P', 'E']
36 | var ma = Math.log10(Math.abs(eco)) / 3 | 0
37 | if (ma == 0) return eco
38 | var ppo = lyrik[ma]
39 | var scale = Math.pow(10, ma * 3)
40 | var scaled = eco / scale
41 | var formatt = scaled.toFixed(1)
42 | if (/\.0$/.test(formatt))
43 | formatt = formatt.substr(0, formatt.length - 2)
44 | return formatt + ppo
45 | }
46 |
47 | const isUrl = (url) => {
48 | return url.match(
49 | new RegExp(
50 | /https?:\/\/(www\.)?[-a-zA-Z0-9@:%.+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%+.~#?&/=]*)/,
51 | 'gi'
52 | )
53 | )
54 | }
55 |
56 | const Json = (string) => {
57 | return JSON.stringify(string, null, 2)
58 | }
59 |
60 | const runtime = (seconds) => {
61 | seconds = Number(seconds)
62 | var d = Math.floor(seconds / (3600 * 24))
63 | var h = Math.floor(seconds % (3600 * 24) / 3600)
64 | var m = Math.floor(seconds % 3600 / 60)
65 | var s = Math.floor(seconds % 60)
66 | var dDisplay = d > 0 ? d + (d == 1 ? ' day, ' : 'd, ') : ''
67 | var hDisplay = h > 0 ? h + (h == 1 ? ' hour, ' : 'h, ') : ''
68 | var mDisplay = m > 0 ? m + (m == 1 ? ' minute, ' : 'm, ') : ''
69 | var sDisplay = s > 0 ? s + (s == 1 ? ' second' : 's') : ''
70 | return dDisplay + hDisplay + mDisplay + sDisplay;
71 | }
72 |
73 | const sleep = async(ms) => {
74 | return new Promise(resolve => setTimeout(resolve, ms))
75 | }
76 |
77 | const fetchJson = async (url, options) => {
78 | try {
79 | options ? options : {}
80 | const res = await axios({
81 | method: 'GET',
82 | url: url,
83 | headers: {
84 | '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'
85 | },
86 | ...options
87 | })
88 | return res.data
89 | } catch (err) {
90 | return err
91 | }
92 | }
93 |
94 | module.exports = { getBuffer, getGroupAdmins, getRandom, h2k, isUrl, Json, runtime, sleep , fetchJson}
95 |
--------------------------------------------------------------------------------
/lib/functions2.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const axios = require('axios');
3 | const path = './config.env';
4 | const FormData = require("form-data");
5 |
6 | async function empiretourl(path) {
7 | if (!fs.existsSync(path)) {
8 | throw new Error(`File not found: ${path}`);
9 | }
10 |
11 | const form = new FormData();
12 | const fileStream = fs.createReadStream(path);
13 | form.append("file", fileStream);
14 | const originalFileName = path.split("/").pop();
15 | form.append("originalFileName", originalFileName);
16 |
17 | try {
18 | const response = await axios.post("https://cdn.empiretech.biz.id/api/upload.php", form, {
19 | headers: {
20 | ...form.getHeaders(),
21 | },
22 | maxContentLength: Infinity,
23 | maxBodyLength: Infinity,
24 | });
25 | return response.data;
26 | } catch (error) {
27 | if (error.response) {
28 | throw new Error(`API Error: ${error.response.status} - ${JSON.stringify(error.response.data)}`);
29 | } else if (error.request) {
30 | throw new Error("No response received from the server.");
31 | } else {
32 | throw new Error(`Request Error: ${error.message}`);
33 | }
34 | }
35 | }
36 |
37 | // Fetch a buffer from a URL
38 | const getBuffer = async (url, options) => {
39 | try {
40 | options = options || {};
41 | const res = await axios({
42 | method: 'get',
43 | url,
44 | headers: {
45 | 'DNT': 1,
46 | 'Upgrade-Insecure-Request': 1
47 | },
48 | ...options,
49 | responseType: 'arraybuffer'
50 | });
51 | return res.data;
52 | } catch (e) {
53 | console.error(e);
54 | return null;
55 | }
56 | };
57 |
58 | // Get admin participants from a group
59 | const getGroupAdmins = (participants) => {
60 | const admins = [];
61 | for (let participant of participants) {
62 | if (participant.admin !== null) admins.push(participant.id);
63 | }
64 | return admins;
65 | };
66 |
67 | // Generate a random string with an extension
68 | const getRandom = (ext) => {
69 | return `${Math.floor(Math.random() * 10000)}${ext}`;
70 | };
71 |
72 | // Format large numbers with suffixes (e.g., K, M, B)
73 | const h2k = (eco) => {
74 | const lyrik = ['', 'K', 'M', 'B', 'T', 'P', 'E'];
75 | const ma = Math.floor(Math.log10(Math.abs(eco)) / 3);
76 | if (ma === 0) return eco.toString();
77 | const scale = Math.pow(10, ma * 3);
78 | const scaled = eco / scale;
79 | const formatted = scaled.toFixed(1).replace(/\.0$/, '');
80 | return formatted + lyrik[ma];
81 | };
82 |
83 | // Check if a string is a URL
84 | const isUrl = (url) => {
85 | return url.match(
86 | /https?:\/\/(www\.)?[-a-zA-Z0-9@:%.+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%+.~#?&/=]*)/
87 | );
88 | };
89 |
90 | // Convert a JavaScript object or array to a JSON string
91 | const Json = (string) => {
92 | return JSON.stringify(string, null, 2);
93 | };
94 |
95 | // Function to calculate and format uptime
96 | const runtime = (seconds) => {
97 | seconds = Math.floor(seconds);
98 | const d = Math.floor(seconds / (24 * 60 * 60));
99 | seconds %= 24 * 60 * 60;
100 | const h = Math.floor(seconds / (60 * 60));
101 | seconds %= 60 * 60;
102 | const m = Math.floor(seconds / 60);
103 | const s = Math.floor(seconds % 60);
104 |
105 | if (d > 0) return `${d}d ${h}h ${m}m ${s}s`;
106 | if (h > 0) return `${h}h ${m}m ${s}s`;
107 | if (m > 0) return `${m}m ${s}s`;
108 | return `${s}s`;
109 | };
110 | // Delay execution for a specified time
111 | const sleep = async (ms) => {
112 | return new Promise((resolve) => setTimeout(resolve, ms));
113 | };
114 |
115 | // Fetch JSON from a URL
116 | const fetchJson = async (url, options) => {
117 | try {
118 | options = options || {};
119 | const res = await axios({
120 | method: 'GET',
121 | url: url,
122 | headers: {
123 | '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'
124 | },
125 | ...options
126 | });
127 | return res.data;
128 | } catch (err) {
129 | console.error(err);
130 | return null;
131 | }
132 | };
133 | // Save config settings
134 | const saveConfig = (key, value) => {
135 | let configData = fs.existsSync(path) ? fs.readFileSync(path, 'utf8').split('\n') : [];
136 | let found = false;
137 |
138 | configData = configData.map(line => {
139 | if (line.startsWith(`${key}=`)) {
140 | found = true;
141 | return `${key}=${value}`;
142 | }
143 | return line;
144 | });
145 |
146 | if (!found) configData.push(`${key}=${value}`);
147 |
148 | fs.writeFileSync(path, configData.join('\n'), 'utf8');
149 |
150 | // Reload updated environment variables
151 | require('dotenv').config({ path });
152 | };
153 |
154 | module.exports = {
155 | getBuffer,
156 | getGroupAdmins,
157 | getRandom,
158 | h2k,
159 | isUrl,
160 | Json,
161 | runtime,
162 | sleep,
163 | fetchJson,
164 | saveConfig,
165 | empiretourl
166 | };
167 |
168 |
--------------------------------------------------------------------------------
/lib/index.js:
--------------------------------------------------------------------------------
1 | const { DeletedText,
2 | DeletedMedia,
3 | AntiDelete, } = require('./antidel');
4 | //const { AntiViewOnce } = require('./antivv');
5 | const {
6 | DATABASE
7 | } = require('./database');
8 | const { getBuffer, getGroupAdmins, getRandom, h2k, isUrl, Json, runtime, sleep, fetchJson } = require('./functions');
9 | const {sms, downloadMediaMessage} = require('./msg');
10 | //const {shannzCdn} = require('./shannzCdn');
11 |
12 | module.exports = {
13 | DeletedText,
14 | DeletedMedia,
15 | AntiDelete,
16 | //AntiViewOnce,
17 | getBuffer,
18 | getGroupAdmins,
19 | getRandom,
20 | h2k,
21 | isUrl,
22 | Json,
23 | runtime,
24 | sleep,
25 | fetchJson,
26 | DATABASE,
27 | sms,
28 | downloadMediaMessage,
29 | // shannzCdn,
30 | };
31 |
--------------------------------------------------------------------------------
/lib/msg.js:
--------------------------------------------------------------------------------
1 | const { proto, downloadContentFromMessage, getContentType } = require('@whiskeysockets/baileys')
2 | const fs = require('fs')
3 |
4 | const downloadMediaMessage = async(m, filename) => {
5 | if (m.type === 'viewOnceMessage') {
6 | m.type = m.msg.type
7 | }
8 | if (m.type === 'imageMessage') {
9 | var nameJpg = filename ? filename + '.jpg' : 'undefined.jpg'
10 | const stream = await downloadContentFromMessage(m.msg, 'image')
11 | let buffer = Buffer.from([])
12 | for await (const chunk of stream) {
13 | buffer = Buffer.concat([buffer, chunk])
14 | }
15 | fs.writeFileSync(nameJpg, buffer)
16 | return fs.readFileSync(nameJpg)
17 | } else if (m.type === 'videoMessage') {
18 | var nameMp4 = filename ? filename + '.mp4' : 'undefined.mp4'
19 | const stream = await downloadContentFromMessage(m.msg, 'video')
20 | let buffer = Buffer.from([])
21 | for await (const chunk of stream) {
22 | buffer = Buffer.concat([buffer, chunk])
23 | }
24 | fs.writeFileSync(nameMp4, buffer)
25 | return fs.readFileSync(nameMp4)
26 | } else if (m.type === 'audioMessage') {
27 | var nameMp3 = filename ? filename + '.mp3' : 'undefined.mp3'
28 | const stream = await downloadContentFromMessage(m.msg, 'audio')
29 | let buffer = Buffer.from([])
30 | for await (const chunk of stream) {
31 | buffer = Buffer.concat([buffer, chunk])
32 | }
33 | fs.writeFileSync(nameMp3, buffer)
34 | return fs.readFileSync(nameMp3)
35 | } else if (m.type === 'stickerMessage') {
36 | var nameWebp = filename ? filename + '.webp' : 'undefined.webp'
37 | const stream = await downloadContentFromMessage(m.msg, 'sticker')
38 | let buffer = Buffer.from([])
39 | for await (const chunk of stream) {
40 | buffer = Buffer.concat([buffer, chunk])
41 | }
42 | fs.writeFileSync(nameWebp, buffer)
43 | return fs.readFileSync(nameWebp)
44 | } else if (m.type === 'documentMessage') {
45 | var ext = m.msg.fileName.split('.')[1].toLowerCase().replace('jpeg', 'jpg').replace('png', 'jpg').replace('m4a', 'mp3')
46 | var nameDoc = filename ? filename + '.' + ext : 'undefined.' + ext
47 | const stream = await downloadContentFromMessage(m.msg, 'document')
48 | let buffer = Buffer.from([])
49 | for await (const chunk of stream) {
50 | buffer = Buffer.concat([buffer, chunk])
51 | }
52 | fs.writeFileSync(nameDoc, buffer)
53 | return fs.readFileSync(nameDoc)
54 | }
55 | }
56 |
57 | const sms = (conn, m, store) => {
58 | if (!m) return m
59 | let M = proto.WebMessageInfo
60 | if (m.key) {
61 | m.id = m.key.id
62 | m.isBot = m.id.startsWith('BAES') && m.id.length === 16
63 | m.isBaileys = m.id.startsWith('BAE5') && m.id.length === 16
64 | m.chat = m.key.remoteJid
65 | m.fromMe = m.key.fromMe
66 | m.isGroup = m.chat.endsWith('@g.us')
67 | m.sender = m.fromMe ? conn.user.id.split(':')[0]+'@s.whatsapp.net' : m.isGroup ? m.key.participant : m.key.remoteJid
68 | //m.sender = conn.decodeJid(m.fromMe && conn.user.id || m.participant || m.key.participant || m.chat || '')
69 | //if (m.isGroup) m.participant = conn.decodeJid(m.key.participant) || ''
70 | }
71 | if (m.message) {
72 | m.mtype = getContentType(m.message)
73 | m.msg = (m.mtype == 'viewOnceMessage' ? m.message[m.mtype].message[getContentType(m.message[m.mtype].message)] : m.message[m.mtype])
74 | try {
75 | m.body = (m.mtype === 'conversation') ? m.message.conversation :
76 | (m.mtype == 'imageMessage' && m.message.imageMessage.caption != undefined) ? m.message.imageMessage.caption :
77 | (m.mtype == 'videoMessage' && m.message.videoMessage.caption != undefined) ? m.message.videoMessage.caption :
78 | (m.mtype == 'extendedTextMessage' && m.message.extendedTextMessage.text != undefined) ? m.message.extendedTextMessage.text :
79 | (m.mtype == 'buttonsResponseMessage') ? m.message.buttonsResponseMessage.selectedButtonId :
80 | (m.mtype == 'listResponseMessage') ? m.message.listResponseMessage.singleSelectReply.selectedRowId :
81 | (m.mtype == 'templateButtonReplyMessage') ? m.message.templateButtonReplyMessage.selectedId :
82 | (m.mtype === 'messageContextInfo') ? (m.message.buttonsResponseMessage?.selectedButtonId || m.message.listResponseMessage?.singleSelectReply.selectedRowId || m.text) : '';
83 | } catch {
84 | m.body = false
85 | }
86 | let quoted = (m.quoted = m.msg.contextInfo ? m.msg.contextInfo.quotedMessage : null);
87 | m.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
88 |
89 | if (m.quoted) {
90 | let type = getContentType(quoted)
91 | m.quoted = m.quoted[type]
92 | if (['productMessage'].includes(type)) {
93 | type = getContentType(m.quoted)
94 | m.quoted = m.quoted[type]
95 | }
96 | if (typeof m.quoted === 'string') m.quoted = { text: m.quoted }
97 |
98 |
99 | if(quoted.viewOnceMessageV2)
100 | {
101 | console.log("entered ==================================== ")
102 | //console.log ("m Is : ",m,"\nm Quoted is :",m.quoted ,"\n Quoted is : ",quoted,"\nviewOnce : ", quoted.viewOnceMessageV2.message)
103 |
104 | } else
105 | {
106 |
107 |
108 | m.quoted.mtype = type
109 | m.quoted.id = m.msg.contextInfo.stanzaId
110 | m.quoted.chat = m.msg.contextInfo.remoteJid || m.chat
111 | m.quoted.isBot = m.quoted.id ? m.quoted.id.startsWith('BAES') && m.quoted.id.length === 16 : false
112 | m.quoted.isBaileys = m.quoted.id ? m.quoted.id.startsWith('BAE5') && m.quoted.id.length === 16 : false
113 | m.quoted.sender = conn.decodeJid(m.msg.contextInfo.participant)
114 | m.quoted.fromMe = m.quoted.sender === (conn.user && conn.user.id)
115 | m.quoted.text = m.quoted.text || m.quoted.caption || m.quoted.conversation || m.quoted.contentText || m.quoted.selectedDisplayText || m.quoted.title || ''
116 | m.quoted.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
117 | m.getQuotedObj = m.getQuotedMessage = async () => {
118 | if (!m.quoted.id) return false
119 | let q = await store.loadMessage(m.chat, m.quoted.id, conn)
120 | return exports.sms(conn, q, store)
121 | }
122 | let vM = m.quoted.fakeObj = M.fromObject({
123 | key: {
124 | remoteJid: m.quoted.chat,
125 | fromMe: m.quoted.fromMe,
126 | id: m.quoted.id
127 | },
128 | message: quoted,
129 | ...(m.isGroup ? { participant: m.quoted.sender } : {})
130 | })
131 | /**
132 | *
133 | * @returns
134 | */
135 | let { chat, fromMe, id } = m.quoted;
136 | const key = {
137 | remoteJid: m.chat,
138 | fromMe: false,
139 | id: m.quoted.id,
140 | participant: m.quoted.sender
141 | }
142 | m.quoted.delete = async() => await conn.sendMessage(m.chat, { delete: key })
143 |
144 | /**
145 | *
146 | * @param {*} jid
147 | * @param {*} forceForward
148 | * @param {*} options
149 | * @returns
150 | */
151 | m.forwardMessage = (jid, forceForward = true, options = {}) => conn.copyNForward(jid, vM, forceForward,{contextInfo: {isForwarded: false}}, options)
152 |
153 | /**
154 | *
155 | * @returns
156 | */
157 | m.quoted.download = () => conn.downloadMediaMessage(m.quoted)
158 | }
159 | }
160 | }
161 | if (m.msg.url) m.download = () => conn.downloadMediaMessage(m.msg)
162 | m.text = m.msg.text || m.msg.caption || m.message.conversation || m.msg.contentText || m.msg.selectedDisplayText || m.msg.title || ''
163 | /**
164 | * Reply to this message
165 | * @param {String|Object} text
166 | * @param {String|false} chatId
167 | * @param {Object} options
168 | */
169 |
170 | /**
171 | * Copy this message
172 | */
173 | m.copy = () => exports.sms(conn, M.fromObject(M.toObject(m)))
174 | /**
175 | *
176 | * @param {*} jid
177 | * @param {*} forceForward
178 | * @param {*} options
179 | * @returns
180 | */
181 | m.copyNForward = (jid = m.chat, forceForward = false, options = {}) => conn.copyNForward(jid, m, forceForward, options)
182 | m.sticker = (stik, id = m.chat, option = { mentions: [m.sender] }) => conn.sendMessage(id, { sticker: stik, contextInfo: { mentionedJid: option.mentions } }, { quoted: m })
183 | m.replyimg = (img, teks, id = m.chat, option = { mentions: [m.sender] }) => conn.sendMessage(id, { image: img, caption: teks, contextInfo: { mentionedJid: option.mentions } }, { quoted: m })
184 | m.imgurl = (img, teks, id = m.chat, option = { mentions: [m.sender] }) => conn.sendMessage(id, { image: {url: img }, caption: teks, contextInfo: { mentionedJid: option.mentions } }, { quoted: m })
185 | m.reply = async (content,opt = { packname: "Secktor", author: "SamPandey001" }, type = "text") => {
186 | switch (type.toLowerCase()) {
187 | case "text":{
188 | return await conn.sendMessage( m.chat, { text: content }, { quoted:m });
189 | }
190 | break;
191 | case "image": {
192 | if (Buffer.isBuffer(content)) {
193 | return await conn.sendMessage(m.chat, { image: content, ...opt }, { ...opt } );
194 | } else if (isUrl(content)) {
195 | return conn.sendMessage( m.chat, { image: { url: content }, ...opt },{ ...opt } );
196 | }
197 | }
198 | break;
199 | case "video": {
200 | if (Buffer.isBuffer(content)) {
201 | return await conn.sendMessage(m.chat, { video: content, ...opt }, { ...opt } );
202 | } else if (isUrl(content)) {
203 | return await conn.sendMessage( m.chat, { video: { url: content }, ...opt }, { ...opt } );
204 | }
205 | }
206 | case "audio": {
207 | if (Buffer.isBuffer(content)) {
208 | return await conn.sendMessage( m.chat, { audio: content, ...opt }, { ...opt } );
209 | } else if (isUrl(content)) {
210 | return await conn.sendMessage( m.chat, { audio: { url: content }, ...opt }, { ...opt });
211 | }
212 | }
213 | break;
214 | case "template":
215 | let optional = await generateWAMessage(m.chat, content, opt);
216 | let message = { viewOnceMessage: { message: { ...optional.message,}, },};
217 | await conn.relayMessage(m.chat, message, { messageId: optional.key.id,});
218 | break;
219 | case "sticker":{
220 | let { data, mime } = await conn.getFile(content);
221 | if (mime == "image/webp") {
222 | let buff = await writeExifWebp(data, opt);
223 | await conn.sendMessage(m.chat, { sticker: { url: buff }, ...opt }, opt );
224 | } else {
225 | mime = await mime.split("/")[0];
226 | if (mime === "video") {
227 | await conn.sendImageAsSticker(m.chat, content, opt);
228 | } else if (mime === "image") {
229 | await conn.sendImageAsSticker(m.chat, content, opt);
230 | }
231 | }
232 | }
233 | break;
234 | }
235 | }
236 | m.senddoc = (doc,type, id = m.chat, option = { mentions: [m.sender], filename: Config.ownername, mimetype: type,
237 | externalAdRepl: {
238 | title: Config.ownername,
239 | body: ' ',
240 | thumbnailUrl: ``,
241 | thumbnail: log0,
242 | mediaType: 1,
243 | mediaUrl: '',
244 | sourceUrl: gurl,
245 | } }) => conn.sendMessage(id, { document: doc, mimetype: option.mimetype, fileName: option.filename, contextInfo: {
246 | externalAdReply: option.externalAdRepl,
247 | mentionedJid: option.mentions } }, { quoted: m })
248 |
249 | m.sendcontact = (name, info, number) => {
250 | var vcard = 'BEGIN:VCARD\n' + 'VERSION:3.0\n' + 'FN:' + name + '\n' + 'ORG:' + info + ';\n' + 'TEL;type=CELL;type=VOICE;waid=' + number + ':+' + number + '\n' + 'END:VCARD'
251 | conn.sendMessage(m.chat, { contacts: { displayName: name, contacts: [{ vcard }] } }, { quoted: m })
252 | }
253 | m.react = (emoji) => conn.sendMessage(m.chat, { react: { text: emoji, key: m.key } })
254 |
255 | return m
256 | }
257 |
258 | module.exports = { sms, downloadMediaMessage }
259 |
--------------------------------------------------------------------------------
/lib/sticker-utils.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios');
2 | const fs = require('fs');
3 | const path = require('path');
4 | const { tmpdir } = require('os');
5 | const Crypto = require('crypto');
6 | const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
7 | const ffmpeg = require('fluent-ffmpeg');
8 |
9 | ffmpeg.setFfmpegPath(ffmpegPath);
10 |
11 | /**
12 | * Fetch an image from a given URL.
13 | * @param {string} url - The image URL.
14 | * @returns {Promise} - The image buffer.
15 | */
16 | async function fetchImage(url) {
17 | try {
18 | const response = await axios.get(url, { responseType: 'arraybuffer' });
19 | return response.data;
20 | } catch (error) {
21 | console.error("Error fetching image:", error);
22 | throw new Error("Could not fetch image.");
23 | }
24 | }
25 |
26 | /**
27 | * Fetch a GIF from a given API URL.
28 | * @param {string} url - API endpoint to fetch GIF.
29 | * @returns {Promise} - The GIF buffer.
30 | */
31 | async function fetchGif(url) {
32 | try {
33 | const response = await axios.get(url, { responseType: 'arraybuffer' });
34 | return response.data;
35 | } catch (error) {
36 | console.error("Error fetching GIF:", error);
37 | throw new Error("Could not fetch GIF.");
38 | }
39 | }
40 |
41 | /**
42 | * Converts a GIF buffer to WebP sticker format.
43 | * @param {Buffer} gifBuffer - The GIF buffer.
44 | * @returns {Promise} - The WebP sticker buffer.
45 | */
46 | async function gifToSticker(gifBuffer) {
47 | const outputPath = path.join(tmpdir(), Crypto.randomBytes(6).toString('hex') + ".webp");
48 | const inputPath = path.join(tmpdir(), Crypto.randomBytes(6).toString('hex') + ".gif");
49 |
50 | fs.writeFileSync(inputPath, gifBuffer);
51 |
52 | await new Promise((resolve, reject) => {
53 | ffmpeg(inputPath)
54 | .on("error", reject)
55 | .on("end", () => resolve(true))
56 | .addOutputOptions([
57 | "-vcodec", "libwebp",
58 | "-vf", "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",
59 | "-loop", "0",
60 | "-preset", "default",
61 | "-an",
62 | "-vsync", "0"
63 | ])
64 | .toFormat("webp")
65 | .save(outputPath);
66 | });
67 |
68 | const webpBuffer = fs.readFileSync(outputPath);
69 | fs.unlinkSync(outputPath);
70 | fs.unlinkSync(inputPath);
71 |
72 | return webpBuffer;
73 | }
74 |
75 | module.exports = { fetchImage, fetchGif, gifToSticker };
76 |
77 |
--------------------------------------------------------------------------------
/lib/video-utils.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 | const { tmpdir } = require('os');
4 | const Crypto = require('crypto');
5 | const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
6 | const ffmpeg = require('fluent-ffmpeg');
7 |
8 | // Set ffmpeg path
9 | ffmpeg.setFfmpegPath(ffmpegPath);
10 |
11 | /**
12 | * Converts a video or GIF buffer to a WebP sticker format.
13 | * @param {Buffer} videoBuffer - The video or GIF buffer to convert.
14 | * @returns {Promise} - The converted WebP sticker buffer.
15 | */
16 | async function videoToWebp(videoBuffer) {
17 | const outputPath = path.join(
18 | tmpdir(),
19 | Crypto.randomBytes(6).readUIntLE(0, 6).toString(36) + '.webp'
20 | );
21 | const inputPath = path.join(
22 | tmpdir(),
23 | Crypto.randomBytes(6).readUIntLE(0, 6).toString(36) + '.mp4'
24 | );
25 |
26 | // Save the video buffer to a file
27 | fs.writeFileSync(inputPath, videoBuffer);
28 |
29 | await new Promise((resolve, reject) => {
30 | ffmpeg(inputPath)
31 | .on('error', reject)
32 | .on('end', () => resolve(true))
33 | .addOutputOptions([
34 | '-vcodec', 'libwebp',
35 | '-vf', "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",
36 | '-loop', '0', // Loop forever
37 | '-ss', '00:00:00', // Start time (optional)
38 | '-t', '00:00:05', // Duration (optional)
39 | '-preset', 'default',
40 | '-an', // No audio
41 | '-vsync', '0'
42 | ])
43 | .toFormat('webp')
44 | .save(outputPath);
45 | });
46 |
47 | const webpBuffer = fs.readFileSync(outputPath);
48 | fs.unlinkSync(outputPath);
49 | fs.unlinkSync(inputPath);
50 |
51 | return webpBuffer;
52 | }
53 |
54 | module.exports = {
55 | videoToWebp
56 | };
57 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "POPKID-MD",
3 | "version": "3.0.0",
4 | "description": "A WhatsApp Bot Created By Popkid",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "pm2 start index.js --deep-monitoring --attach --name POPKID-XTECH",
8 | "stop": "pm2 stop POPKID-XTECH",
9 | "restart": "pm2 restart POPKID-XTECH"
10 | },
11 | "dependencies": {
12 | "@whiskeysockets/baileys": "npm:@fizzxydev/baileys-pro@8.5.12",
13 | "@adiwajshing/keyed-db": "^0.2.4",
14 | "@dark-yasiya/yt-dl.js": "1.0.5",
15 | "@ffmpeg-installer/ffmpeg": "^1.1.0",
16 | "@vitalets/google-translate-api": "^9.2.0",
17 | "@dark-yasiya/scrap":"1.0.1",
18 | "pino": "^7.0.5",
19 | "pm2": "^6.0.5",
20 | "util": "^0.12.4",
21 | "express": "latest",
22 | "axios": "^1.2.5",
23 | "crypto-digest-sync": "^1.0.0",
24 | "crypto-js": "latest",
25 | "file_size_url": "1.0.4",
26 | "fs-extra": "^11.1.0",
27 | "fs": "^0.0.1-security",
28 | "ffmpeg": "^0.0.4",
29 | "file-type": "^16.5.3",
30 | "fluent-ffmpeg": "^2.1.2",
31 | "form-data": "^4.0.0",
32 | "google-tts-api": "^2.0.2",
33 | "path": "^0.12.7",
34 | "node-fetch": "^2.6.1",
35 | "btch-downloader": "^2.2.9",
36 | "megajs": "^1.1.0",
37 | "pdfkit": "^0.14.0",
38 | "wa_set_pkg": "1.0.5",
39 | "wa-sticker-formatter": "^4.4.4",
40 | "path": "^0.12.7",
41 | "vm": "^0.1.0",
42 | "adm-zip": "^0.5.16",
43 | "cheerio": "^1.0.0-rc.12",
44 | "ruhend-scraper" : "8.0.3",
45 | "qrcode-terminal": "^0.12.0",
46 | "yt-search":"2.11.1",
47 | "sequelize": "^6.37.5",
48 | "sqlite3": "^5.1.7",
49 | "vm": "^0.1.0",
50 | "api-dylux":"1.8.5",
51 | "@mrnima/tiktok-downloader":"1.0.0",
52 | "@mrnima/facebook-downloader":"1.0.0",
53 | "mrnima-moviedl":"1.0.0"
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/plugins/ai.js:
--------------------------------------------------------------------------------
1 |
2 | const { cmd } = require('../command');
3 | const axios = require('axios');
4 |
5 | cmd({
6 | pattern: "ai",
7 | alias: ["bot", "ladybug", "gpt", "gpt4", "bing"],
8 | desc: "Chat with an AI model",
9 | category: "ai",
10 | react: "🤖",
11 | filename: __filename
12 | },
13 | async (conn, mek, m, { from, args, q, reply, react }) => {
14 | try {
15 | if (!q) return reply("Please provide a message for the AI.\nExample: `.ai Hello`");
16 |
17 | const apiUrl = `https://lance-frank-asta.onrender.com/api/gpt?q=${encodeURIComponent(q)}`;
18 | const { data } = await axios.get(apiUrl);
19 |
20 | if (!data || !data.message) {
21 | await react("❌");
22 | return reply("AI failed to respond. Please try again later.");
23 | }
24 |
25 | await reply(`🤖 *AI Response:*\n\n${data.message}`);
26 | await react("✅");
27 | } catch (e) {
28 | console.error("Error in AI command:", e);
29 | await react("❌");
30 | reply("An error occurred while communicating with the AI.");
31 | }
32 | });
33 |
34 | cmd({
35 | pattern: "openai",
36 | alias: ["chatgpt", "gpt3", "open-gpt"],
37 | desc: "Chat with OpenAI",
38 | category: "ai",
39 | react: "🧠",
40 | filename: __filename
41 | },
42 | async (conn, mek, m, { from, args, q, reply, react }) => {
43 | try {
44 | if (!q) return reply("Please provide a message for OpenAI.\nExample: `.openai Hello`");
45 |
46 | const apiUrl = `https://vapis.my.id/api/openai?q=${encodeURIComponent(q)}`;
47 | const { data } = await axios.get(apiUrl);
48 |
49 | if (!data || !data.result) {
50 | await react("❌");
51 | return reply("OpenAI failed to respond. Please try again later.");
52 | }
53 |
54 | await reply(`🧠 *OpenAI Response:*\n\n${data.result}`);
55 | await react("✅");
56 | } catch (e) {
57 | console.error("Error in OpenAI command:", e);
58 | await react("❌");
59 | reply("An error occurred while communicating with OpenAI.");
60 | }
61 | });
62 |
63 | cmd({
64 | pattern: "deepseek",
65 | alias: ["deep", "seekai"],
66 | desc: "Chat with DeepSeek AI",
67 | category: "ai",
68 | react: "🧠",
69 | filename: __filename
70 | },
71 | async (conn, mek, m, { from, args, q, reply, react }) => {
72 | try {
73 | if (!q) return reply("Please provide a message for DeepSeek AI.\nExample: `.deepseek Hello`");
74 |
75 | const apiUrl = `https://api.ryzendesu.vip/api/ai/deepseek?text=${encodeURIComponent(q)}`;
76 | const { data } = await axios.get(apiUrl);
77 |
78 | if (!data || !data.answer) {
79 | await react("❌");
80 | return reply("DeepSeek AI failed to respond. Please try again later.");
81 | }
82 |
83 | await reply(`🧠 *DeepSeek AI Response:*\n\n${data.answer}`);
84 | await react("✅");
85 | } catch (e) {
86 | console.error("Error in DeepSeek AI command:", e);
87 | await react("❌");
88 | reply("An error occurred while communicating with DeepSeek AI.");
89 | }
90 | });
91 |
92 |
93 |
--------------------------------------------------------------------------------
/plugins/allautos.js:
--------------------------------------------------------------------------------
1 |
2 | const { cmd, commands } = require('../command');
3 | const config = require('../config');
4 | const prefix = config.PREFIX;
5 | const fs = require('fs');
6 | const { getBuffer, getGroupAdmins, getRandom, h2k, isUrl, Json, sleep, fetchJson } = require('../lib/functions2');
7 | const { writeFileSync } = require('fs');
8 | const path = require('path');
9 |
10 | cmd({
11 | pattern: "admin-events",
12 | alias: ["adminevents"],
13 | desc: "Enable or disable admin event notifications",
14 | category: "settings",
15 | filename: __filename
16 | },
17 | async (conn, mek, m, { from, args, isCreator, reply }) => {
18 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
19 |
20 | const status = args[0]?.toLowerCase();
21 | if (status === "on") {
22 | config.ADMIN_EVENTS = "true";
23 | return reply("✅ Admin event notifications are now enabled.");
24 | } else if (status === "off") {
25 | config.ADMIN_EVENTS = "false";
26 | return reply("❌ Admin event notifications are now disabled.");
27 | } else {
28 | return reply(`Example: .admin-events on`);
29 | }
30 | });
31 |
32 | cmd({
33 | pattern: "welcome",
34 | alias: ["welcomeset"],
35 | desc: "Enable or disable welcome messages for new members",
36 | category: "settings",
37 | filename: __filename
38 | },
39 | async (conn, mek, m, { from, args, isCreator, reply }) => {
40 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
41 |
42 | const status = args[0]?.toLowerCase();
43 | if (status === "on") {
44 | config.WELCOME = "true";
45 | return reply("✅ Welcome messages are now enabled.");
46 | } else if (status === "off") {
47 | config.WELCOME = "false";
48 | return reply("❌ Welcome messages are now disabled.");
49 | } else {
50 | return reply(`Example: .welcome on`);
51 | }
52 | });
53 |
54 | cmd({
55 | pattern: "setprefix",
56 | alias: ["prefix"],
57 | react: "🔧",
58 | desc: "Change the bot's command prefix.",
59 | category: "settings",
60 | filename: __filename,
61 | }, async (conn, mek, m, { from, args, isCreator, reply }) => {
62 | if (!isCreator) return reply("*📛 Only the owner can use this command!*");
63 |
64 | const newPrefix = args[0]; // Get the new prefix from the command arguments
65 | if (!newPrefix) return reply("❌ Please provide a new prefix. Example: `.setprefix !`");
66 |
67 | // Update the prefix in memory
68 | config.PREFIX = newPrefix;
69 |
70 | return reply(`✅ Prefix successfully changed to *${newPrefix}*`);
71 | });
72 |
73 | cmd({
74 | pattern: "mode",
75 | alias: ["setmode"],
76 | react: "",
77 | desc: "Set bot mode to private or public.",
78 | category: "settings",
79 | filename: __filename,
80 | }, async (conn, mek, m, { from, args, isCreator, reply }) => {
81 | if (!isCreator) return reply("*📛 Only the owner can use this command!*");
82 |
83 | // Si aucun argument n'est fourni, afficher le mode actuel et l'usage
84 | if (!args[0]) {
85 | return reply(`📌 Current mode: *${config.MODE}*\n\nUsage: .mode private OR .mode public`);
86 | }
87 |
88 | const modeArg = args[0].toLowerCase();
89 |
90 | if (modeArg === "private") {
91 | config.MODE = "private";
92 | return reply("✅ Bot mode is now set to *PRIVATE*.");
93 | } else if (modeArg === "public") {
94 | config.MODE = "public";
95 | return reply("✅ Bot mode is now set to *PUBLIC*.");
96 | } else {
97 | return reply("❌ Invalid mode. Please use `.mode private` or `.mode public`.");
98 | }
99 | });
100 |
101 | cmd({
102 | pattern: "autotyping",
103 | description: "Enable or disable auto-typing feature.",
104 | category: "settings",
105 | filename: __filename
106 | },
107 | async (conn, mek, m, { from, args, isCreator, reply }) => {
108 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
109 |
110 | const status = args[0]?.toLowerCase();
111 | if (!["on", "off"].includes(status)) {
112 | return reply("* ᴇxᴀᴍᴘʟᴇ: .ᴀᴜᴛᴏ-ᴛʏᴘɪɴɢ ᴏɴ*");
113 | }
114 |
115 | config.AUTO_TYPING = status === "on" ? "true" : "false";
116 | return reply(`Auto typing has been turned ${status}.`);
117 | });
118 |
119 | //mention reply
120 |
121 |
122 | cmd({
123 | pattern: "mention-reply",
124 | alias: ["menetionreply", "mee"],
125 | description: "Set bot status to always online or offline.",
126 | category: "settings",
127 | filename: __filename
128 | },
129 | async (conn, mek, m, { from, args, isCreator, reply }) => {
130 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
131 |
132 | const status = args[0]?.toLowerCase();
133 | // Check the argument for enabling or disabling the anticall feature
134 | if (args[0] === "on") {
135 | config.MENTION_REPLY = "true";
136 | return reply("Mention Reply feature is now enabled.");
137 | } else if (args[0] === "off") {
138 | config.MENTION_REPLY = "false";
139 | return reply("Mention Reply feature is now disabled.");
140 | } else {
141 | return reply(`_example: .mee on_`);
142 | }
143 | });
144 |
145 |
146 | //--------------------------------------------
147 | // ALWAYS_ONLINE COMMANDS
148 | //--------------------------------------------
149 | cmd({
150 | pattern: "always-online",
151 | alias: ["alwaysonline"],
152 | desc: "Enable or disable the always online mode",
153 | category: "settings",
154 | filename: __filename
155 | },
156 | async (conn, mek, m, { from, args, isCreator, reply }) => {
157 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
158 |
159 | const status = args[0]?.toLowerCase();
160 | if (status === "on") {
161 | config.ALWAYS_ONLINE = "true";
162 | await reply("*✅ always online mode is now enabled.*");
163 | } else if (status === "off") {
164 | config.ALWAYS_ONLINE = "false";
165 | await reply("*❌ always online mode is now disabled.*");
166 | } else {
167 | await reply(`*🛠️ ᴇxᴀᴍᴘʟᴇ: .ᴀʟᴡᴀʏs-ᴏɴʟɪɴᴇ ᴏɴ*`);
168 | }
169 | });
170 |
171 | //--------------------------------------------
172 | // AUTO_RECORDING COMMANDS
173 | //--------------------------------------------
174 | cmd({
175 | pattern: "auto-recording",
176 | alias: ["autorecoding"],
177 | description: "Enable or disable auto-recording feature.",
178 | category: "settings",
179 | filename: __filename
180 | },
181 | async (conn, mek, m, { from, args, isCreator, reply }) => {
182 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
183 |
184 | const status = args[0]?.toLowerCase();
185 | if (!["on", "off"].includes(status)) {
186 | return reply("* ᴇxᴀᴍᴘʟᴇ: .ᴀᴜᴛᴏ-ʀᴇᴄᴏʀᴅɪɴɢ ᴏɴ*");
187 | }
188 |
189 | config.AUTO_RECORDING = status === "on" ? "true" : "false";
190 | if (status === "on") {
191 | await conn.sendPresenceUpdate("recording", from);
192 | return reply("Auto recording is now enabled. Bot is recording...");
193 | } else {
194 | await conn.sendPresenceUpdate("available", from);
195 | return reply("Auto recording has been disabled.");
196 | }
197 | });
198 | //--------------------------------------------
199 | // AUTO_VIEW_STATUS COMMANDS
200 | //--------------------------------------------
201 | cmd({
202 | pattern: "auto-seen",
203 | alias: ["autostatusview"],
204 | desc: "Enable or disable auto-viewing of statuses",
205 | category: "settings",
206 | filename: __filename
207 | },
208 | async (conn, mek, m, { from, args, isCreator, reply }) => {
209 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
210 |
211 | const status = args[0]?.toLowerCase();
212 | // Default value for AUTO_VIEW_STATUS is "false"
213 | if (args[0] === "on") {
214 | config.AUTO_STATUS_SEEN = "true";
215 | return reply("Auto-viewing of statuses is now enabled.");
216 | } else if (args[0] === "off") {
217 | config.AUTO_STATUS_SEEN = "false";
218 | return reply("Auto-viewing of statuses is now disabled.");
219 | } else {
220 | return reply(`* ᴇxᴀᴍᴘʟᴇ: .ᴀᴜᴛᴏ-sᴇᴇɴ ᴏɴ*`);
221 | }
222 | });
223 | //--------------------------------------------
224 | // AUTO_LIKE_STATUS COMMANDS
225 | //--------------------------------------------
226 | cmd({
227 | pattern: "status-react",
228 | alias: ["autostatusreact"],
229 | desc: "Enable or disable auto-liking of statuses",
230 | category: "settings",
231 | filename: __filename
232 | },
233 | async (conn, mek, m, { from, args, isCreator, reply }) => {
234 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
235 |
236 | const status = args[0]?.toLowerCase();
237 | // Default value for AUTO_LIKE_STATUS is "false"
238 | if (args[0] === "on") {
239 | config.AUTO_STATUS_REACT = "true";
240 | return reply("Auto-liking of statuses is now enabled.");
241 | } else if (args[0] === "off") {
242 | config.AUTO_STATUS_REACT = "false";
243 | return reply("Auto-liking of statuses is now disabled.");
244 | } else {
245 | return reply(`Example: . status-react on`);
246 | }
247 | });
248 |
249 | //--------------------------------------------
250 | // READ-MESSAGE COMMANDS
251 | //--------------------------------------------
252 | cmd({
253 | pattern: "read-message",
254 | alias: ["autoread"],
255 | desc: "enable or disable readmessage.",
256 | category: "settings",
257 | filename: __filename
258 | },
259 | async (conn, mek, m, { from, args, isCreator, reply }) => {
260 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
261 |
262 | const status = args[0]?.toLowerCase();
263 | // Check the argument for enabling or disabling the anticall feature
264 | if (args[0] === "on") {
265 | config.READ_MESSAGE = "true";
266 | return reply("readmessage feature is now enabled.");
267 | } else if (args[0] === "off") {
268 | config.READ_MESSAGE = "false";
269 | return reply("readmessage feature is now disabled.");
270 | } else {
271 | return reply(`_example: .readmessage on_`);
272 | }
273 | });
274 |
275 | // AUTO_VOICE
276 |
277 | cmd({
278 | pattern: "auto-voice",
279 | alias: ["autovoice"],
280 | desc: "enable or disable readmessage.",
281 | category: "settings",
282 | filename: __filename
283 | },
284 | async (conn, mek, m, { from, args, isCreator, reply }) => {
285 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
286 |
287 | const status = args[0]?.toLowerCase();
288 | // Check the argument for enabling or disabling the anticall feature
289 | if (args[0] === "on") {
290 | config.AUTO_VOICE = "true";
291 | return reply("AUTO_VOICE feature is now enabled.");
292 | } else if (args[0] === "off") {
293 | config.AUTO_VOICE = "false";
294 | return reply("AUTO_VOICE feature is now disabled.");
295 | } else {
296 | return reply(`_example: .autovoice on_`);
297 | }
298 | });
299 |
300 |
301 | //--------------------------------------------
302 | // ANI-BAD COMMANDS
303 | //--------------------------------------------
304 | cmd({
305 | pattern: "anti-bad",
306 | alias: ["antibadword"],
307 | desc: "enable or disable antibad.",
308 | category: "settings",
309 | filename: __filename
310 | },
311 | async (conn, mek, m, { from, args, isCreator, reply }) => {
312 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
313 |
314 | const status = args[0]?.toLowerCase();
315 | // Check the argument for enabling or disabling the anticall feature
316 | if (args[0] === "on") {
317 | config.ANTI_BAD_WORD = "true";
318 | return reply("*anti bad word is now enabled.*");
319 | } else if (args[0] === "off") {
320 | config.ANTI_BAD_WORD = "false";
321 | return reply("*anti bad word feature is now disabled*");
322 | } else {
323 | return reply(`_example: .antibad on_`);
324 | }
325 | });
326 | //--------------------------------------------
327 | // AUTO-STICKER COMMANDS
328 | //--------------------------------------------
329 | cmd({
330 | pattern: "auto-sticker",
331 | alias: ["autosticker"],
332 | desc: "enable or disable auto-sticker.",
333 | category: "settings",
334 | filename: __filename
335 | },
336 | async (conn, mek, m, { from, args, isCreator, reply }) => {
337 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
338 |
339 | const status = args[0]?.toLowerCase();
340 | // Check the argument for enabling or disabling the anticall feature
341 | if (args[0] === "on") {
342 | config.AUTO_STICKER = "true";
343 | return reply("auto-sticker feature is now enabled.");
344 | } else if (args[0] === "off") {
345 | config.AUTO_STICKER = "false";
346 | return reply("auto-sticker feature is now disabled.");
347 | } else {
348 | return reply(`_example: .auto-sticker on_`);
349 | }
350 | });
351 | //--------------------------------------------
352 | // AUTO-REPLY COMMANDS
353 | //--------------------------------------------
354 | cmd({
355 | pattern: "auto-reply",
356 | alias: ["autoreply"],
357 | desc: "enable or disable auto-reply.",
358 | category: "settings",
359 | filename: __filename
360 | },
361 | async (conn, mek, m, { from, args, isCreator, reply }) => {
362 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
363 |
364 | const status = args[0]?.toLowerCase();
365 | // Check the argument for enabling or disabling the anticall feature
366 | if (args[0] === "on") {
367 | config.AUTO_REPLY = "true";
368 | return reply("*auto-reply is now enabled.*");
369 | } else if (args[0] === "off") {
370 | config.AUTO_REPLY = "false";
371 | return reply("auto-reply feature is now disabled.");
372 | } else {
373 | return reply(`* ᴇxᴀᴍᴘʟᴇ: . ᴀᴜᴛᴏ-ʀᴇᴘʟʏ ᴏɴ*`);
374 | }
375 | });
376 |
377 | //--------------------------------------------
378 | // AUTO-REACT COMMANDS
379 | //--------------------------------------------
380 | cmd({
381 | pattern: "auto-react",
382 | alias: ["autoreact"],
383 | desc: "Enable or disable the autoreact feature",
384 | category: "settings",
385 | filename: __filename
386 | },
387 | async (conn, mek, m, { from, args, isCreator, reply }) => {
388 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
389 |
390 | const status = args[0]?.toLowerCase();
391 | // Check the argument for enabling or disabling the anticall feature
392 | if (args[0] === "on") {
393 | config.AUTO_REACT = "true";
394 | await reply("*autoreact feature is now enabled.*");
395 | } else if (args[0] === "off") {
396 | config.AUTO_REACT = "false";
397 | await reply("autoreact feature is now disabled.");
398 | } else {
399 | await reply(`* ᴇxᴀᴍᴘʟᴇ: .ᴀᴜᴛᴏ-ʀᴇᴀᴄᴛ ᴏɴ*`);
400 | }
401 | });
402 | //--------------------------------------------
403 | // STATUS-REPLY COMMANDS
404 | //--------------------------------------------
405 | cmd({
406 | pattern: "status-reply",
407 | alias: ["autostatusreply"],
408 | desc: "enable or disable status-reply.",
409 | category: "settings",
410 | filename: __filename
411 | },
412 | async (conn, mek, m, { from, args, isCreator, reply }) => {
413 | if (!isCreator) return reply("*📛 ᴏɴʟʏ ᴛʜᴇ ᴏᴡɴᴇʀ ᴄᴀɴ ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ!*");
414 |
415 | const status = args[0]?.toLowerCase();
416 | // Check the argument for enabling or disabling the anticall feature
417 | if (args[0] === "on") {
418 | config.AUTO_STATUS_REPLY = "true";
419 | return reply("status-reply feature is now enabled.");
420 | } else if (args[0] === "off") {
421 | config.AUTO_STATUS_REPLY = "false";
422 | return reply("status-reply feature is now disabled.");
423 | } else {
424 | return reply(`* ᴇxᴀᴍᴘʟᴇ: .sᴛᴀᴛᴜs-ʀᴇᴘʟʏ ᴏɴ*`);
425 | }
426 | });
427 |
428 | //--------------------------------------------
429 | // ANTILINK COMMANDS
430 | //--------------------------------------------
431 |
432 | cmd({
433 | pattern: "antilink",
434 | alias: ["antilinks"],
435 | desc: "Enable or disable ANTI_LINK in groups",
436 | category: "group",
437 | react: "🚫",
438 | filename: __filename
439 | }, async (conn, mek, m, { isGroup, isAdmins, isBotAdmins, args, reply }) => {
440 | try {
441 | if (!isGroup) return reply('This command can only be used in a group.');
442 | if (!isBotAdmins) return reply('Bot must be an admin to use this command.');
443 | if (!isAdmins) return reply('You must be an admin to use this command.');
444 |
445 | if (args[0] === "on") {
446 | config.ANTI_LINK = "true";
447 | reply("✅ ANTI_LINK has been enabled.");
448 | } else if (args[0] === "off") {
449 | config.ANTI_LINK = "false";
450 | reply("❌ ANTI_LINK has been disabled.");
451 | } else {
452 | reply("Usage: *.antilink on/off*");
453 | }
454 | } catch (e) {
455 | reply(`Error: ${e.message}`);
456 | }
457 | });
458 |
459 | cmd({
460 | pattern: "antilinkkick",
461 | alias: ["kicklink"],
462 | desc: "Enable or disable ANTI_LINK_KICK in groups",
463 | category: "group",
464 | react: "⚠️",
465 | filename: __filename
466 | }, async (conn, mek, m, { isGroup, isAdmins, isBotAdmins, args, reply }) => {
467 | try {
468 | if (!isGroup) return reply('This command can only be used in a group.');
469 | if (!isBotAdmins) return reply('Bot must be an admin to use this command.');
470 | if (!isAdmins) return reply('You must be an admin to use this command.');
471 |
472 | if (args[0] === "on") {
473 | config.ANTI_LINK_KICK = "true";
474 | reply("✅ ANTI_LINK_KICK has been enabled.");
475 | } else if (args[0] === "off") {
476 | config.ANTI_LINK_KICK = "false";
477 | reply("❌ ANTI_LINK_KICK has been disabled.");
478 | } else {
479 | reply("Usage: *.antilinkkick on/off*");
480 | }
481 | } catch (e) {
482 | reply(`Error: ${e.message}`);
483 | }
484 | });
485 |
486 |
487 | cmd({
488 | pattern: "deletelink",
489 | alias: ["linksdelete"],
490 | desc: "Enable or disable DELETE_LINKS in groups",
491 | category: "group",
492 | react: "❌",
493 | filename: __filename
494 | }, async (conn, mek, m, { isGroup, isAdmins, isBotAdmins, args, reply }) => {
495 | try {
496 | if (!isGroup) return reply('This command can only be used in a group.');
497 | if (!isBotAdmins) return reply('Bot must be an admin to use this command.');
498 | if (!isAdmins) return reply('You must be an admin to use this command.');
499 |
500 | if (args[0] === "on") {
501 | config.DELETE_LINKS = "true";
502 | reply("✅ DELETE_LINKS is now enabled.");
503 | } else if (args[0] === "off") {
504 | config.DELETE_LINKS = "false";
505 | reply("❌ DELETE_LINKS is now disabled.");
506 | } else {
507 | reply("Usage: *.deletelink on/off*");
508 | }
509 | } catch (e) {
510 | reply(`Error: ${e.message}`);
511 | }
512 | });
513 |
--------------------------------------------------------------------------------
/plugins/antibad.js:
--------------------------------------------------------------------------------
1 | const { cmd } = require('../command');
2 | const config = require("../config");
3 |
4 | // Anti-Bad Words System
5 | cmd({
6 | 'on': "body"
7 | }, async (conn, m, store, {
8 | from,
9 | body,
10 | isGroup,
11 | isAdmins,
12 | isBotAdmins,
13 | reply,
14 | sender
15 | }) => {
16 | try {
17 | const badWords = ["wtf", "mia", "xxx", "fuck", 'sex', "huththa", "pakaya", 'ponnaya', "hutto"];
18 |
19 | if (!isGroup || isAdmins || !isBotAdmins) {
20 | return;
21 | }
22 |
23 | const messageText = body.toLowerCase();
24 | const containsBadWord = badWords.some(word => messageText.includes(word));
25 |
26 | if (containsBadWord && config.ANTI_BAD_WORD === "true") {
27 | await conn.sendMessage(from, { 'delete': m.key }, { 'quoted': m });
28 | await conn.sendMessage(from, { 'text': "🚫 ⚠️ BAD WORDS NOT ALLOWED ⚠️ 🚫" }, { 'quoted': m });
29 | }
30 | } catch (error) {
31 | console.error(error);
32 | reply("An error occurred while processing the message.");
33 | }
34 | });
35 |
--------------------------------------------------------------------------------
/plugins/antidelete.js:
--------------------------------------------------------------------------------
1 | const { pop } = require('@whiskeysockets/baileys');
2 | const { loadMessage, getAnti } = require('../data'); // Assuming these are correctly imported
3 | const config = require('../config');
4 |
5 | // Helper to send stylish text deletions
6 | const DeletedText = async (conn, mek, jid, deleteInfo, isGroup, update) => {
7 | const messageContent = mek.message?.conversation || mek.message?.extendedTextMessage?.text || '*(Empty Text Message)*';
8 |
9 | // Adding more emphasis to the deleted content
10 | const stylishContent = `\`\`\`${messageContent}\`\`\``; // Using code block for deleted text
11 |
12 | const fullMessage = `${deleteInfo}\n\n*💬 DELETED CONTENT:*\n${stylishContent}`;
13 |
14 | await conn.sendMessage(
15 | jid,
16 | {
17 | text: fullMessage,
18 | contextInfo: {
19 | mentionedJid: isGroup ? [update.key.participant, mek.key.participant] : [update.key.remoteJid],
20 | },
21 | },
22 | { quoted: mek },
23 | );
24 | };
25 |
26 | // Helper to handle stylish media deletions
27 | const DeletedMedia = async (conn, mek, jid, deleteInfo) => {
28 | const antideletedmek = structuredClone(mek.message);
29 | const messageType = Object.keys(antideletedmek)[0];
30 |
31 | // Prepare context info for relaying the original message
32 | if (antideletedmek[messageType]) {
33 | antideletedmek[messageType].contextInfo = {
34 | stanzaId: mek.key.id,
35 | participant: mek.sender,
36 | quotedMessage: mek.message, // This helps link to the original if possible
37 | };
38 | }
39 |
40 | if (messageType === 'imageMessage' || messageType === 'videoMessage') {
41 | // Set caption for image/video directly
42 | antideletedmek[messageType].caption = `${deleteInfo}\n\n*🖼️ / 🎥 Media Recovered*`; // Add a clear indicator
43 | await conn.relayMessage(jid, antideletedmek, {}); // Relay the media with new caption
44 | } else if (messageType === 'audioMessage' || messageType === 'documentMessage') {
45 | // For audio/document, send info text first, then relay
46 | await conn.sendMessage(jid, { text: `*🚨 DELETED MEDIA DETECTED!* 🚨\n\n${deleteInfo}\n\n*🎵 / 📄 Media Recovered Below*` }, { quoted: mek });
47 | await conn.relayMessage(jid, antideletedmek, {}); // Relay the media
48 | } else {
49 | // Fallback for other media types (e.g., sticker, contact, location)
50 | await conn.sendMessage(jid, { text: `*🚨 DELETED MESSAGE DETECTED!* 🚨\n\n${deleteInfo}\n\n*♻️ Message Content Recovered Below*` }, { quoted: mek });
51 | await conn.relayMessage(jid, antideletedmek, {}); // Relay the message as-is
52 | }
53 | };
54 |
55 | const AntiDelete = async (conn, updates) => {
56 | for (const update of updates) {
57 | if (update.update.message === null) {
58 | const store = await loadMessage(update.key.id);
59 |
60 | if (store && store.message) {
61 | const mek = store.message;
62 | const isGroup = isJidGroup(store.jid);
63 | const antiDeleteType = isGroup ? 'gc' : 'dm';
64 | const antiDeleteStatus = await getAnti(antiDeleteType); // Check if anti-delete is enabled for this chat type
65 | if (!antiDeleteStatus) continue;
66 |
67 | const deleteTime = new Date().toLocaleTimeString('en-GB', {
68 | hour: '2-digit',
69 | minute: '2-digit',
70 | second: '2-digit',
71 | hour12: false // Ensure 24-hour format
72 | });
73 |
74 | let deleteInfo, jid;
75 | if (isGroup) {
76 | const groupMetadata = await conn.groupMetadata(store.jid);
77 | const groupName = groupMetadata.subject;
78 | const sender = mek.key.participant?.split('@')[0];
79 | const deleter = update.key.participant?.split('@')[0];
80 |
81 | deleteInfo = `
82 | *🛡️ ANTI-DELETE ALERT 🛡️*
83 |
84 | *⏰ Time:* ${deleteTime}
85 | *👥 Group:* ${groupName}
86 | *🗑️ Deleted by:* @${deleter}
87 | *👤 Original Sender:* @${sender}
88 | `.trim(); // Using trim() to remove leading/trailing whitespace
89 | jid = config.ANTI_DEL_PATH === "log" ? conn.user.id : store.jid;
90 | } else {
91 | const senderNumber = mek.key.remoteJid?.split('@')[0]; // For DMs, original sender is remoteJid
92 | const deleterNumber = update.key.remoteJid?.split('@')[0]; // For DMs, deleter is also remoteJid (since it's their deletion)
93 |
94 | deleteInfo = `
95 | *🛡️ ANTI-DELETE ALERT 🛡️*
96 |
97 | *⏰ Time:* ${deleteTime}
98 | *🗑️ Deleted by:* @${deleterNumber}
99 | *👤 Original Sender:* @${senderNumber}
100 | `.trim();
101 | jid = config.ANTI_DEL_PATH === "log" ? conn.user.id : update.key.remoteJid;
102 | }
103 |
104 | if (mek.message?.conversation || mek.message?.extendedTextMessage) {
105 | await DeletedText(conn, mek, jid, deleteInfo, isGroup, update);
106 | } else {
107 | await DeletedMedia(conn, mek, jid, deleteInfo);
108 | }
109 | }
110 | }
111 | }
112 | };
113 |
114 | module.exports = {
115 | DeletedText,
116 | DeletedMedia,
117 | AntiDelete,
118 | };
119 |
120 | // by jawadtechx
121 |
--------------------------------------------------------------------------------
/plugins/antideleteand-anticall.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios');
2 | const config = require('../config');
3 | const { cmd, commands } = require('../command');
4 | const util = require("util");
5 | const { getAnti, setAnti, initializeAntiDeleteSettings } = require('../data/antidel');
6 |
7 | // Initialize AntiDelete settings
8 | initializeAntiDeleteSettings();
9 |
10 | cmd({
11 | pattern: "antidelete",
12 | alias: ['antidel', 'ad'],
13 | desc: "Sets up the Antidelete feature.",
14 | category: "misc",
15 | filename: __filename
16 | },
17 | async (conn, mek, m, { from, reply, q, text, isCreator, fromMe }) => {
18 | if (!isCreator) return reply('⚠️ This command is only for the bot owner. ⚠️');
19 |
20 | try {
21 | const command = q?.toLowerCase();
22 |
23 | switch (command) {
24 | // Enable AntiDelete globally (both GC and DM)
25 | case 'on':
26 | await setAnti('gc', false); // Disable in Group Chats
27 | await setAnti('dm', false); // Disable in Direct Messages
28 | return reply('🔴 _AntiDelete is now OFF for Group Chats and Direct Messages._');
29 |
30 | // Disable AntiDelete for Group Chats
31 | case 'off gc':
32 | await setAnti('gc', false);
33 | return reply('❌ _AntiDelete for Group Chats is now DISABLED._');
34 |
35 | // Disable AntiDelete for Direct Messages
36 | case 'off dm':
37 | await setAnti('dm', false);
38 | return reply('❌ _AntiDelete for Direct Messages is now DISABLED._');
39 |
40 | // Toggle AntiDelete for Group Chats
41 | case 'set gc':
42 | const gcStatus = await getAnti('gc');
43 | await setAnti('gc', !gcStatus); // Toggle state
44 | return reply(`🔄 _AntiDelete for Group Chats is now ${!gcStatus ? 'ENABLED' : 'DISABLED'}._`);
45 |
46 | // Toggle AntiDelete for Direct Messages
47 | case 'set dm':
48 | const dmStatus = await getAnti('dm');
49 | await setAnti('dm', !dmStatus); // Toggle state
50 | return reply(`🔄 _AntiDelete for Direct Messages is now ${!dmStatus ? 'ENABLED' : 'DISABLED'}._`);
51 |
52 | // Enable AntiDelete for both Group Chats and Direct Messages
53 | case 'set all':
54 | await setAnti('gc', true);
55 | await setAnti('dm', true);
56 | return reply('✅ _AntiDelete has been ENABLED for all chats._');
57 |
58 | // Show current AntiDelete status
59 | case 'status':
60 | const currentDmStatus = await getAnti('dm');
61 | const currentGcStatus = await getAnti('gc');
62 | return reply(`🔍 _AntiDelete Status:_\n\n*DM AntiDelete:* ${currentDmStatus ? '✅ ENABLED' : '❌ DISABLED'}\n*Group Chat AntiDelete:* ${currentGcStatus ? '✅ ENABLED' : '❌ DISABLED'}`);
63 |
64 | // Show Help Message for all available commands
65 | default:
66 | const helpMessage = `
67 | -- *AntiDelete Command Guide:* --
68 | • \`\`.antidelete on\`\` - 🔴 Turn OFF AntiDelete for all chats (disabled by default)
69 | • \`\`.antidelete off gc\`\` - ❌ Disable AntiDelete for Group Chats
70 | • \`\`.antidelete off dm\`\` - ❌ Disable AntiDelete for Direct Messages
71 | • \`\`.antidelete set gc\`\` - 🔄 Toggle AntiDelete for Group Chats
72 | • \`\`.antidelete set dm\`\` - 🔄 Toggle AntiDelete for Direct Messages
73 | • \`\`.antidelete set all\`\` - ✅ Enable AntiDelete for all chats
74 | • \`\`.antidelete status\`\` - 🔍 Check current AntiDelete status`;
75 |
76 | return reply(helpMessage);
77 | }
78 | } catch (e) {
79 | console.error("⚠️ Error in antidelete command:", e);
80 | return reply("❌ An error occurred while processing your request.");
81 | }
82 | });
83 |
84 | cmd({
85 | pattern: "anticall",
86 | alias: ['retrive', '🔥'],
87 | desc: "decline all calls❗❌❌.",
88 | category: "misc",
89 | use: '',
90 | filename: __filename
91 | },
92 | async (conn, mek, m, { from, reply }) => {
93 | try {
94 | const quotedMessage = m.msg.contextInfo.quotedMessage; // Get the quoted message
95 |
96 | // Check if it's a ViewOnce message
97 | if (quotedMessage && quotedMessage.anticall) {
98 | const quot = quotedMessage.anticall;
99 |
100 | if (quot.message.callhandler) {
101 | let caption = quot.message.imageMessage.caption;
102 | let media = await conn.downloadAndSaveMediaMessage(quot.message.imageMessage);
103 | return conn.sendMessage(from, { image: { url: media }, caption }, { quoted: mek });
104 | }
105 |
106 | if (quot.message.videoMessage) {
107 | let caption = quot.message.videoMessage.caption;
108 | let media = await conn.downloadAndSaveMediaMessage(quot.message.videoMessage);
109 | return conn.sendMessage(from, { video: { url: media }, caption }, { quoted: mek });
110 | }
111 |
112 | if (quot.message.audioMessage) {
113 | let media = await conn.downloadAndSaveMediaMessage(quot.message.audioMessage);
114 | return conn.sendMessage(from, { audio: { url: media } }, { quoted: mek });
115 | }
116 | }
117 |
118 | // If there is no quoted message or it's not a ViewOnce message
119 | if (!m.quoted) return reply("⚠️ Please reply to a ViewOnce message.");
120 |
121 | if (m.quoted.mtype === "viewOnceMessage") {
122 | if (m.quoted.message.imageMessage) {
123 | let caption = m.quoted.message.imageMessage.caption;
124 | let media = await conn.downloadAndSaveMediaMessage(m.quoted.message.imageMessage);
125 | return conn.sendMessage(from, { image: { url: media }, caption }, { quoted: mek });
126 | } else if (m.quoted.message.videoMessage) {
127 | let caption = m.quoted.message.videoMessage.caption;
128 | let media = await conn.downloadAndSaveMediaMessage(m.quoted.message.videoMessage);
129 | return conn.sendMessage(from, { video: { url: media }, caption }, { quoted: mek });
130 | } else if (m.quoted.message.audioMessage) {
131 | let media = await conn.downloadAndSaveMediaMessage(m.quoted.message.audioMessage);
132 | return conn.sendMessage(from, { audio: { url: media } }, { quoted: mek });
133 | }
134 | } else {
135 | return reply("❌ This is not a valid ViewOnce message.");
136 | }
137 | } catch (e) {
138 | console.log("⚠️ Error in vv3:", e);
139 | reply("❌ An error occurred while fetching the ViewOnce message.");
140 | }
141 | });
142 |
143 | // Credit: YourName | GitHub: github.com/YourHandle
144 |
--------------------------------------------------------------------------------
/plugins/antilink.js:
--------------------------------------------------------------------------------
1 | const { cmd } = require('../command');
2 | const config = require("../config");
3 |
4 | cmd({
5 | 'on': "body"
6 | }, async (conn, m, store, {
7 | from,
8 | body,
9 | sender,
10 | isGroup,
11 | isAdmins,
12 | isBotAdmins,
13 | reply
14 | }) => {
15 | try {
16 | // Initialize warnings if not exists
17 | if (!global.warnings) {
18 | global.warnings = {};
19 | }
20 |
21 | // Only act in groups where bot is admin and sender isn't admin
22 | if (!isGroup || isAdmins || !isBotAdmins) {
23 | return;
24 | }
25 |
26 | // List of link patterns to detect
27 | const linkPatterns = [
28 | /https?:\/\/(?:chat\.whatsapp\.com|wa\.me)\/\S+/gi, // WhatsApp links
29 | /https?:\/\/(?:api\.whatsapp\.com|wa\.me)\/\S+/gi, // WhatsApp API links
30 | /wa\.me\/\S+/gi, // WhatsApp.me links
31 | /https?:\/\/(?:t\.me|telegram\.me)\/\S+/gi, // Telegram links
32 | /https?:\/\/(?:www\.)?\.com\/\S+/gi, // Generic .com links
33 | /https?:\/\/(?:www\.)?twitter\.com\/\S+/gi, // Twitter links
34 | /https?:\/\/(?:www\.)?linkedin\.com\/\S+/gi, // LinkedIn links
35 | /https?:\/\/(?:whatsapp\.com|channel\.me)\/\S+/gi, // Other WhatsApp/channel links
36 | /https?:\/\/(?:www\.)?reddit\.com\/\S+/gi, // Reddit links
37 | /https?:\/\/(?:www\.)?discord\.com\/\S+/gi, // Discord links
38 | /https?:\/\/(?:www\.)?twitch\.tv\/\S+/gi, // Twitch links
39 | /https?:\/\/(?:www\.)?vimeo\.com\/\S+/gi, // Vimeo links
40 | /https?:\/\/(?:www\.)?dailymotion\.com\/\S+/gi, // Dailymotion links
41 | /https?:\/\/(?:www\.)?medium\.com\/\S+/gi // Medium links
42 | ];
43 |
44 | // Check if message contains any forbidden links
45 | const containsLink = linkPatterns.some(pattern => pattern.test(body));
46 |
47 | // Only proceed if anti-link is enabled and link is detected
48 | if (containsLink && config.ANTI_LINK === 'true') {
49 | console.log(`Link detected from ${sender}: ${body}`);
50 |
51 | // Try to delete the message
52 | try {
53 | await conn.sendMessage(from, {
54 | delete: m.key
55 | });
56 | console.log(`Message deleted: ${m.key.id}`);
57 | } catch (error) {
58 | console.error("Failed to delete message:", error);
59 | }
60 |
61 | // Update warning count for user
62 | global.warnings[sender] = (global.warnings[sender] || 0) + 1;
63 | const warningCount = global.warnings[sender];
64 |
65 | // Handle warnings
66 | if (warningCount < 4) {
67 | // Send warning message
68 | await conn.sendMessage(from, {
69 | text: `*⚠️ LINKS ARE NOT ALLOWED ⚠️*\n` +
70 | `*╭────⬡ WARNING ⬡────*\n` +
71 | `*├▢ USER :* @${sender.split('@')[0]}!\n` +
72 | `*├▢ COUNT : ${warningCount}*\n` +
73 | `*├▢ REASON : LINK SENDING*\n` +
74 | `*├▢ WARN LIMIT : 3*\n` +
75 | `*╰────────────────*`,
76 | mentions: [sender]
77 | });
78 | } else {
79 | // Remove user if they exceed warning limit
80 | await conn.sendMessage(from, {
81 | text: `@${sender.split('@')[0]} *HAS BEEN REMOVED - WARN LIMIT EXCEEDED!*`,
82 | mentions: [sender]
83 | });
84 | await conn.groupParticipantsUpdate(from, [sender], "remove");
85 | delete global.warnings[sender];
86 | }
87 | }
88 | } catch (error) {
89 | console.error("Anti-link error:", error);
90 | reply("❌ An error occurred while processing the message.");
91 | }
92 | });
93 |
--------------------------------------------------------------------------------
/plugins/antilinkkick.js:
--------------------------------------------------------------------------------
1 | const { cmd } = require('../command');
2 | const config = require("../config");
3 |
4 | // Anti-Link System
5 | const linkPatterns = [
6 | /https?:\/\/(?:chat\.whatsapp\.com|wa\.me)\/\S+/gi,
7 | /^https?:\/\/(www\.)?whatsapp\.com\/channel\/([a-zA-Z0-9_-]+)$/,
8 | /wa\.me\/\S+/gi,
9 | /https?:\/\/(?:t\.me|telegram\.me)\/\S+/gi,
10 | /https?:\/\/(?:www\.)?youtube\.com\/\S+/gi,
11 | /https?:\/\/youtu\.be\/\S+/gi,
12 | /https?:\/\/(?:www\.)?facebook\.com\/\S+/gi,
13 | /https?:\/\/fb\.me\/\S+/gi,
14 | /https?:\/\/(?:www\.)?instagram\.com\/\S+/gi,
15 | /https?:\/\/(?:www\.)?twitter\.com\/\S+/gi,
16 | /https?:\/\/(?:www\.)?tiktok\.com\/\S+/gi,
17 | /https?:\/\/(?:www\.)?linkedin\.com\/\S+/gi,
18 | /https?:\/\/(?:www\.)?snapchat\.com\/\S+/gi,
19 | /https?:\/\/(?:www\.)?pinterest\.com\/\S+/gi,
20 | /https?:\/\/(?:www\.)?reddit\.com\/\S+/gi,
21 | /https?:\/\/ngl\/\S+/gi,
22 | /https?:\/\/(?:www\.)?discord\.com\/\S+/gi,
23 | /https?:\/\/(?:www\.)?twitch\.tv\/\S+/gi,
24 | /https?:\/\/(?:www\.)?vimeo\.com\/\S+/gi,
25 | /https?:\/\/(?:www\.)?dailymotion\.com\/\S+/gi,
26 | /https?:\/\/(?:www\.)?medium\.com\/\S+/gi
27 | ];
28 |
29 | cmd({
30 | 'on': "body"
31 | }, async (conn, m, store, {
32 | from,
33 | body,
34 | sender,
35 | isGroup,
36 | isAdmins,
37 | isBotAdmins,
38 | reply
39 | }) => {
40 | try {
41 | if (!isGroup || isAdmins || !isBotAdmins) {
42 | return;
43 | }
44 |
45 | const containsLink = linkPatterns.some(pattern => pattern.test(body));
46 |
47 | if (containsLink && config.ANTI_LINK_KICK === 'true') {
48 | await conn.sendMessage(from, { 'delete': m.key }, { 'quoted': m });
49 | await conn.sendMessage(from, {
50 | 'text': `⚠️ Links are not allowed in this group.\n@${sender.split('@')[0]} has been removed. 🚫`,
51 | 'mentions': [sender]
52 | }, { 'quoted': m });
53 |
54 | await conn.groupParticipantsUpdate(from, [sender], "remove");
55 | }
56 | } catch (error) {
57 | console.error(error);
58 | reply("An error occurred while processing the message.");
59 | }
60 | });
61 |
--------------------------------------------------------------------------------
/plugins/autorecording.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 | const config = require('../config')
4 | const {cmd , commands} = require('../command')
5 |
6 |
7 | //auto recording
8 | cmd({
9 | on: "body"
10 | },
11 | async (conn, mek, m, { from, body, isOwner }) => {
12 | if (config.AUTO_RECORDING === 'true') {
13 | await conn.sendPresenceUpdate('recording', from);
14 | }
15 | }
16 | );
17 |
--------------------------------------------------------------------------------
/plugins/bible.js:
--------------------------------------------------------------------------------
1 | const axios = require("axios");
2 | const { cmd } = require("../command");
3 |
4 | // Command: bible
5 | cmd({
6 | pattern: "bible",
7 | desc: "Fetch Bible verses by reference.",
8 | category: "fun",
9 | react: "📖",
10 | filename: __filename
11 | }, async (conn, mek, m, { args, reply }) => {
12 | try {
13 | // Check if a reference is provided
14 | if (args.length === 0) {
15 | return reply(`⚠️ *Please provide a Bible reference.*\n\n📝 *Example:*\n.bible John 1:1`);
16 | }
17 |
18 | // Join the arguments to form the reference
19 | const reference = args.join(" ");
20 | const apiUrl = `https://bible-api.com/${encodeURIComponent(reference)}`;
21 | const response = await axios.get(apiUrl);
22 |
23 | // Handle possible API error message
24 | if (response.data.error) {
25 | return reply(`❌ *Error:* ${response.data.error}`);
26 | }
27 |
28 | // Check if response contains text
29 | if (response.status === 200 && response.data.text) {
30 | const { reference: ref, text, translation_name } = response.data;
31 | const verseText = text.trim();
32 |
33 | // Send beautifully formatted output
34 | reply(
35 | `╔══════════════════════════════╗\n` +
36 | ` 📖 *𝐁𝐈𝐁𝐋𝐄 𝐕𝐄𝐑𝐒𝐄* \n` +
37 | `╚══════════════════════════════╝\n\n` +
38 | `🔹 *Reference:* ${ref}\n` +
39 | `🔸 *Translation:* ${translation_name}\n` +
40 | `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n` +
41 | `📜 *𝐕𝐄𝐑𝐒𝐄 𝐓𝐄𝐗𝐓:*\n\n${verseText}\n` +
42 | `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n` +
43 | `❤️𝐏𝐎𝐏𝐊𝐈𝐃 𝐁𝐈𝐁𝐋𝐄🌎`
44 | );
45 | } else {
46 | reply("❌ *Verse not found.* Please check the reference and try again.");
47 | }
48 | } catch (error) {
49 | console.error(error);
50 | reply("⚠️ *An error occurred while fetching the Bible verse.* Please try again later.");
51 | }
52 | });
53 |
--------------------------------------------------------------------------------
/plugins/converter.js:
--------------------------------------------------------------------------------
1 | const converter = require('../data/converter');
2 | const stickerConverter = require('../data/sticker-converter');
3 | const { cmd } = require('../command');
4 |
5 | cmd({
6 | pattern: 'convert',
7 | alias: ['sticker2img', 'stoimg', 'stickertoimage', 's2i'],
8 | desc: 'Convert stickers to images',
9 | category: 'media',
10 | react: '🖼️',
11 | filename: __filename
12 | }, async (client, match, message, { from }) => {
13 | // Input validation
14 | if (!message.quoted) {
15 | return await client.sendMessage(from, {
16 | text: "✨ *Sticker Converter*\n\nPlease reply to a sticker message\n\nExample: `.convert` (reply to sticker)"
17 | }, { quoted: message });
18 | }
19 |
20 | if (message.quoted.mtype !== 'stickerMessage') {
21 | return await client.sendMessage(from, {
22 | text: "❌ Only sticker messages can be converted"
23 | }, { quoted: message });
24 | }
25 |
26 | // Send processing message
27 | await client.sendMessage(from, {
28 | text: "🔄 Converting sticker to image..."
29 | }, { quoted: message });
30 |
31 | try {
32 | const stickerBuffer = await message.quoted.download();
33 | const imageBuffer = await stickerConverter.convertStickerToImage(stickerBuffer);
34 |
35 | // Send result
36 | await client.sendMessage(from, {
37 | image: imageBuffer,
38 | caption: "> Powered By Popkid Xtech 🤍",
39 | mimetype: 'image/png'
40 | }, { quoted: message });
41 |
42 | } catch (error) {
43 | console.error('Conversion error:', error);
44 | await client.sendMessage(from, {
45 | text: "❌ Please try with a different sticker."
46 | }, { quoted: message });
47 | }
48 | });
49 |
50 | cmd({
51 | pattern: 'tomp3',
52 | desc: 'Convert media to audio',
53 | category: 'audio',
54 | react: '🎵',
55 | filename: __filename
56 | }, async (client, match, message, { from }) => {
57 | // Input validation
58 | if (!match.quoted) {
59 | return await client.sendMessage(from, {
60 | text: "*🔊 Please reply to a video/audio message*"
61 | }, { quoted: message });
62 | }
63 |
64 | if (!['videoMessage', 'audioMessage'].includes(match.quoted.mtype)) {
65 | return await client.sendMessage(from, {
66 | text: "❌ Only video/audio messages can be converted"
67 | }, { quoted: message });
68 | }
69 |
70 | if (match.quoted.seconds > 300) {
71 | return await client.sendMessage(from, {
72 | text: "⏱️ Media too long (max 5 minutes)"
73 | }, { quoted: message });
74 | }
75 |
76 | // Send processing message and store it
77 | await client.sendMessage(from, {
78 | text: "🔄 Converting to audio..."
79 | }, { quoted: message });
80 |
81 | try {
82 | const buffer = await match.quoted.download();
83 | const ext = match.quoted.mtype === 'videoMessage' ? 'mp4' : 'm4a';
84 | const audio = await converter.toAudio(buffer, ext);
85 |
86 | // Send result
87 | await client.sendMessage(from, {
88 | audio: audio,
89 | mimetype: 'audio/mpeg'
90 | }, { quoted: message });
91 |
92 | } catch (e) {
93 | console.error('Conversion error:', e.message);
94 | await client.sendMessage(from, {
95 | text: "❌ Failed to process audio"
96 | }, { quoted: message });
97 | }
98 | });
99 |
100 | cmd({
101 | pattern: 'toptt',
102 | desc: 'Convert media to voice message',
103 | category: 'audio',
104 | react: '🎙️',
105 | filename: __filename
106 | }, async (client, match, message, { from }) => {
107 | // Input validation
108 | if (!match.quoted) {
109 | return await client.sendMessage(from, {
110 | text: "*🗣️ Please reply to a video/audio message*"
111 | }, { quoted: message });
112 | }
113 |
114 | if (!['videoMessage', 'audioMessage'].includes(match.quoted.mtype)) {
115 | return await client.sendMessage(from, {
116 | text: "❌ Only video/audio messages can be converted"
117 | }, { quoted: message });
118 | }
119 |
120 | if (match.quoted.seconds > 60) {
121 | return await client.sendMessage(from, {
122 | text: "⏱️ Media too long for voice (max 1 minute)"
123 | }, { quoted: message });
124 | }
125 |
126 | // Send processing message
127 | await client.sendMessage(from, {
128 | text: "🔄 Converting to voice message..."
129 | }, { quoted: message });
130 |
131 | try {
132 | const buffer = await match.quoted.download();
133 | const ext = match.quoted.mtype === 'videoMessage' ? 'mp4' : 'm4a';
134 | const ptt = await converter.toPTT(buffer, ext);
135 |
136 | // Send result
137 | await client.sendMessage(from, {
138 | audio: ptt,
139 | mimetype: 'audio/ogg; codecs=opus',
140 | ptt: true
141 | }, { quoted: message });
142 |
143 | } catch (e) {
144 | console.error('PTT conversion error:', e.message);
145 | await client.sendMessage(from, {
146 | text: "❌ Failed to create voice message"
147 | }, { quoted: message });
148 | }
149 | });
150 |
--------------------------------------------------------------------------------
/plugins/couplepp.js:
--------------------------------------------------------------------------------
1 | const {
2 | cmd,
3 | commands
4 | } = require('../command');
5 | const axios = require('axios');
6 | cmd({
7 | 'pattern': "couplepp",
8 | 'alias': ["couple", "cpp"],
9 | 'react': '💑',
10 | 'desc': "Get a male and female couple profile picture.",
11 | 'category': "image",
12 | 'use': ".couplepp",
13 | 'filename': __filename
14 | }, async (_0x552520, _0x51cf3f, _0x29f4cb, {
15 | from: _0x556c44,
16 | args: _0x2e3a6d,
17 | reply: _0x30d3fc
18 | }) => {
19 | try {
20 | _0x30d3fc("*POPKID IS 💑 Fetching couple profile pictures...*");
21 | const _0x173643 = await axios.get("https://api.davidcyriltech.my.id/couplepp");
22 | if (!_0x173643.data || !_0x173643.data.success) {
23 | return _0x30d3fc("❌ Failed to fetch couple profile pictures. Please try again later.");
24 | }
25 | const _0x5d4b91 = _0x173643.data.male;
26 | const _0x5a1e4a = _0x173643.data.female;
27 | if (_0x5d4b91) {
28 | await _0x552520.sendMessage(_0x556c44, {
29 | 'image': {
30 | 'url': _0x5d4b91
31 | },
32 | 'caption': "POPKID XTECH SUGGESTS: 👨 Male Couple Profile Picture"
33 | }, {
34 | 'quoted': _0x51cf3f
35 | });
36 | }
37 | if (_0x5a1e4a) {
38 | await _0x552520.sendMessage(_0x556c44, {
39 | 'image': {
40 | 'url': _0x5a1e4a
41 | },
42 | 'caption': "POPKID XTECH SUGGESTS: 👩 Female Couple Profile Picture"
43 | }, {
44 | 'quoted': _0x51cf3f
45 | });
46 | }
47 | } catch (_0x1dc6a7) {
48 | console.error(_0x1dc6a7);
49 | _0x30d3fc("❌ An error occurred while fetching the couple profile pictures.");
50 | }
51 | });
52 |
--------------------------------------------------------------------------------
/plugins/define.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios');
2 | const {cmd , commands} = require('../command');
3 |
4 | cmd({
5 | pattern: "define",
6 | desc: "📚 Get the definition of a word",
7 | react: "🔍",
8 | category: "Auther",
9 | filename: __filename
10 | },
11 | async (conn, mek, m, { from, q, reply }) => {
12 | try {
13 | if (!q) return reply("❗ Please provide a word to define. Usage: .define [word]");
14 |
15 | const word = q;
16 | const url = `https://api.dictionaryapi.dev/api/v2/entries/en/${word}`;
17 |
18 | const response = await axios.get(url);
19 | const definitionData = response.data[0];
20 |
21 | const definition = definitionData.meanings[0].definitions[0].definition;
22 | const example = definitionData.meanings[0].definitions[0].example || 'No example available';
23 | const synonyms = definitionData.meanings[0].definitions[0].synonyms.join(', ') || 'No synonyms available';
24 |
25 | const wordInfo = `
26 | 📚 *Word*: ${definitionData.word}
27 | 🔍 *Definition*: ${definition}
28 | 📝 *Example*: ${example}
29 | 🔗 *Synonyms*: ${synonyms}
30 |
31 | > *@ 💎 popkid 💎*`;
32 |
33 | return reply(wordInfo);
34 | } catch (e) {
35 | console.log(e);
36 | if (e.response && e.response.status === 404) {
37 | return reply("🚫💎 popkid-xᴍᴅ 💎 Word not found. Please check the spelling and try again.");
38 | }
39 | return reply("⚠️ An error occurred while fetching the definition. Please try again later.");
40 | }
41 | });
42 |
--------------------------------------------------------------------------------
/plugins/download.js:
--------------------------------------------------------------------------------
1 | const { fetchJson } = require("../lib/functions");
2 | const { downloadTiktok } = require("@mrnima/tiktok-downloader");
3 | const { facebook } = require("@mrnima/facebook-downloader");
4 | const cheerio = require("cheerio");
5 | const { igdl } = require("ruhend-scraper");
6 | const axios = require("axios");
7 | const { cmd, commands } = require('../command');
8 |
9 | cmd({
10 | pattern: "ig",
11 | alias: ["insta", "Instagram"],
12 | desc: "To download Instagram videos.",
13 | react: "🎥",
14 | category: "download",
15 | filename: __filename
16 | }, async (conn, m, store, { from, q, reply }) => {
17 | try {
18 | if (!q || !q.startsWith("http")) {
19 | return reply("❌ Please provide a valid Instagram link.");
20 | }
21 |
22 | await conn.sendMessage(from, {
23 | react: { text: "⏳", key: m.key }
24 | });
25 |
26 | const response = await axios.get(`https://api.davidcyriltech.my.id/instagram?url=${q}`);
27 | const data = response.data;
28 |
29 | if (!data || data.status !== 200 || !data.downloadUrl) {
30 | return reply("⚠️ Failed to fetch Instagram video. Please check the link and try again.");
31 | }
32 |
33 | await conn.sendMessage(from, {
34 | video: { url: data.downloadUrl },
35 | mimetype: "video/mp4",
36 | caption: "📥 *Instagram Video Downloaded Successfully!*"
37 | }, { quoted: m });
38 |
39 | } catch (error) {
40 | console.error("Error:", error);
41 | reply("❌ An error occurred while processing your request. Please try again.");
42 | }
43 | });
44 |
45 |
46 | // twitter-dl
47 |
48 | cmd({
49 | pattern: "twitter",
50 | alias: ["tweet", "twdl"],
51 | desc: "Download Twitter videos",
52 | category: "download",
53 | filename: __filename
54 | }, async (conn, m, store, {
55 | from,
56 | quoted,
57 | q,
58 | reply
59 | }) => {
60 | try {
61 | if (!q || !q.startsWith("https://")) {
62 | return conn.sendMessage(from, { text: "❌ Please provide a valid Twitter URL." }, { quoted: m });
63 | }
64 |
65 | await conn.sendMessage(from, {
66 | react: { text: '⏳', key: m.key }
67 | });
68 |
69 | const response = await axios.get(`https://www.dark-yasiya-api.site/download/twitter?url=${q}`);
70 | const data = response.data;
71 |
72 | if (!data || !data.status || !data.result) {
73 | return reply("⚠️ Failed to retrieve Twitter video. Please check the link and try again.");
74 | }
75 |
76 | const { desc, thumb, video_sd, video_hd } = data.result;
77 |
78 | const caption = `╭━━━〔 *TWITTER DOWNLOADER* 〕━━━⊷\n`
79 | + `┃▸ *Description:* ${desc || "No description"}\n`
80 | + `╰━━━⪼\n\n`
81 | + `📹 *Download Options:*\n`
82 | + `1️⃣ *SD Quality*\n`
83 | + `2️⃣ *HD Quality*\n`
84 | + `🎵 *Audio Options:*\n`
85 | + `3️⃣ *Audio*\n`
86 | + `4️⃣ *Document*\n`
87 | + `5️⃣ *Voice*\n\n`
88 | + `📌 *Reply with the number to download your choice.*`;
89 |
90 | const sentMsg = await conn.sendMessage(from, {
91 | image: { url: thumb },
92 | caption: caption
93 | }, { quoted: m });
94 |
95 | const messageID = sentMsg.key.id;
96 |
97 | conn.ev.on("messages.upsert", async (msgData) => {
98 | const receivedMsg = msgData.messages[0];
99 | if (!receivedMsg.message) return;
100 |
101 | const receivedText = receivedMsg.message.conversation || receivedMsg.message.extendedTextMessage?.text;
102 | const senderID = receivedMsg.key.remoteJid;
103 | const isReplyToBot = receivedMsg.message.extendedTextMessage?.contextInfo?.stanzaId === messageID;
104 |
105 | if (isReplyToBot) {
106 | await conn.sendMessage(senderID, {
107 | react: { text: '⬇️', key: receivedMsg.key }
108 | });
109 |
110 | switch (receivedText) {
111 | case "1":
112 | await conn.sendMessage(senderID, {
113 | video: { url: video_sd },
114 | caption: "📥 *Downloaded in SD Quality*"
115 | }, { quoted: receivedMsg });
116 | break;
117 |
118 | case "2":
119 | await conn.sendMessage(senderID, {
120 | video: { url: video_hd },
121 | caption: "📥 *Downloaded in HD Quality*"
122 | }, { quoted: receivedMsg });
123 | break;
124 |
125 | case "3":
126 | await conn.sendMessage(senderID, {
127 | audio: { url: video_sd },
128 | mimetype: "audio/mpeg"
129 | }, { quoted: receivedMsg });
130 | break;
131 |
132 | case "4":
133 | await conn.sendMessage(senderID, {
134 | document: { url: video_sd },
135 | mimetype: "audio/mpeg",
136 | fileName: "Twitter_Audio.mp3",
137 | caption: "📥 *Audio Downloaded as Document*"
138 | }, { quoted: receivedMsg });
139 | break;
140 |
141 | case "5":
142 | await conn.sendMessage(senderID, {
143 | audio: { url: video_sd },
144 | mimetype: "audio/mp4",
145 | ptt: true
146 | }, { quoted: receivedMsg });
147 | break;
148 |
149 | default:
150 | reply("❌ Invalid option! Please reply with 1, 2, 3, 4, or 5.");
151 | }
152 | }
153 | });
154 |
155 | } catch (error) {
156 | console.error("Error:", error);
157 | reply("❌ An error occurred while processing your request. Please try again.");
158 | }
159 | });
160 |
161 | // MediaFire-dl
162 |
163 | cmd({
164 | pattern: "mediafire",
165 | alias: ["mfire"],
166 | desc: "To download MediaFire files.",
167 | react: "🎥",
168 | category: "download",
169 | filename: __filename
170 | }, async (conn, m, store, {
171 | from,
172 | quoted,
173 | q,
174 | reply
175 | }) => {
176 | try {
177 | if (!q) {
178 | return reply("❌ Please provide a valid MediaFire link.");
179 | }
180 |
181 | await conn.sendMessage(from, {
182 | react: { text: "⏳", key: m.key }
183 | });
184 |
185 | const response = await axios.get(`https://www.dark-yasiya-api.site/download/mfire?url=${q}`);
186 | const data = response.data;
187 |
188 | if (!data || !data.status || !data.result || !data.result.dl_link) {
189 | return reply("⚠️ Failed to fetch MediaFire download link. Ensure the link is valid and public.");
190 | }
191 |
192 | const { dl_link, fileName, fileType } = data.result;
193 | const file_name = fileName || "mediafire_download";
194 | const mime_type = fileType || "application/octet-stream";
195 |
196 | await conn.sendMessage(from, {
197 | react: { text: "⬆️", key: m.key }
198 | });
199 |
200 | const caption = `╭━━━〔 *MEDIAFIRE DOWNLOADER* 〕━━━⊷\n`
201 | + `┃▸ *File Name:* ${file_name}\n`
202 | + `┃▸ *File Type:* ${mime_type}\n`
203 | + `╰━━━⪼\n\n`
204 | + `📥 *Downloading your file...*`;
205 |
206 | await conn.sendMessage(from, {
207 | document: { url: dl_link },
208 | mimetype: mime_type,
209 | fileName: file_name,
210 | caption: caption
211 | }, { quoted: m });
212 |
213 | } catch (error) {
214 | console.error("Error:", error);
215 | reply("❌ An error occurred while processing your request. Please try again.");
216 | }
217 | });
218 |
219 | // apk-dl
220 |
221 | cmd({
222 | pattern: "apk",
223 | desc: "Download APK from Aptoide.",
224 | category: "download",
225 | filename: __filename
226 | }, async (conn, m, store, {
227 | from,
228 | quoted,
229 | q,
230 | reply
231 | }) => {
232 | try {
233 | if (!q) {
234 | return reply("❌ Please provide an app name to search.");
235 | }
236 |
237 | await conn.sendMessage(from, { react: { text: "⏳", key: m.key } });
238 |
239 | const apiUrl = `http://ws75.aptoide.com/api/7/apps/search/query=${q}/limit=1`;
240 | const response = await axios.get(apiUrl);
241 | const data = response.data;
242 |
243 | if (!data || !data.datalist || !data.datalist.list.length) {
244 | return reply("⚠️ No results found for the given app name.");
245 | }
246 |
247 | const app = data.datalist.list[0];
248 | const appSize = (app.size / 1048576).toFixed(2); // Convert bytes to MB
249 |
250 | const caption = `╭━━━〔 *APK Downloader* 〕━━━┈⊷
251 | ┃ 📦 *Name:* ${app.name}
252 | ┃ 🏋 *Size:* ${appSize} MB
253 | ┃ 📦 *Package:* ${app.package}
254 | ┃ 📅 *Updated On:* ${app.updated}
255 | ┃ 👨💻 *Developer:* ${app.developer.name}
256 | ╰━━━━━━━━━━━━━━━┈⊷
257 | 🔗 *Powered By Popkid-AI*`;
258 |
259 | await conn.sendMessage(from, { react: { text: "⬆️", key: m.key } });
260 |
261 | await conn.sendMessage(from, {
262 | document: { url: app.file.path_alt },
263 | fileName: `${app.name}.apk`,
264 | mimetype: "application/vnd.android.package-archive",
265 | caption: caption
266 | }, { quoted: m });
267 |
268 | await conn.sendMessage(from, { react: { text: "✅", key: m.key } });
269 |
270 | } catch (error) {
271 | console.error("Error:", error);
272 | reply("❌ An error occurred while fetching the APK. Please try again.");
273 | }
274 | });
275 |
276 | // G-Drive-DL
277 |
278 | cmd({
279 | pattern: "gdrive",
280 | desc: "Download Google Drive files.",
281 | react: "🌐",
282 | category: "download",
283 | filename: __filename
284 | }, async (conn, m, store, {
285 | from,
286 | quoted,
287 | q,
288 | reply
289 | }) => {
290 | try {
291 | if (!q) {
292 | return reply("❌ Please provide a valid Google Drive link.");
293 | }
294 |
295 | await conn.sendMessage(from, { react: { text: "⬇️", key: m.key } });
296 |
297 | const apiUrl = `https://api.fgmods.xyz/api/downloader/gdrive?url=${q}&apikey=mnp3grlZ`;
298 | const response = await axios.get(apiUrl);
299 | const downloadUrl = response.data.result.downloadUrl;
300 |
301 | if (downloadUrl) {
302 | await conn.sendMessage(from, { react: { text: "⬆️", key: m.key } });
303 |
304 | await conn.sendMessage(from, {
305 | document: { url: downloadUrl },
306 | mimetype: response.data.result.mimetype,
307 | fileName: response.data.result.fileName,
308 | caption: "*© Powered By Popkid*"
309 | }, { quoted: m });
310 |
311 | await conn.sendMessage(from, { react: { text: "✅", key: m.key } });
312 | } else {
313 | return reply("⚠️ No download URL found. Please check the link and try again.");
314 | }
315 | } catch (error) {
316 | console.error("Error:", error);
317 | reply("❌ An error occurred while fetching the Google Drive file. Please try again.");
318 | }
319 | });
320 |
--------------------------------------------------------------------------------
/plugins/fb.js:
--------------------------------------------------------------------------------
1 | const axios = require("axios");
2 | const { cmd } = require("../command");
3 |
4 | cmd({
5 | pattern: "fb",
6 | alias: ["facebook", "fbdl"],
7 | desc: "Download Facebook videos",
8 | category: "download",
9 | filename: __filename,
10 | use: "",
11 | }, async (conn, m, store, { from, args, q, reply }) => {
12 | try {
13 | // Check if a URL is provided
14 | if (!q || !q.startsWith("http")) {
15 | return reply("*`Need a valid Facebook URL`*\n\nExample: `.fb https://www.facebook.com/...`");
16 | }
17 |
18 | // Add a loading react
19 | await conn.sendMessage(from, { react: { text: '⏳', key: m.key } });
20 |
21 | // Fetch video URL from the API
22 | const apiUrl = `https://www.velyn.biz.id/api/downloader/facebookdl?url=${encodeURIComponent(q)}`;
23 | const { data } = await axios.get(apiUrl);
24 |
25 | // Check if the API response is valid
26 | if (!data.status || !data.data || !data.data.url) {
27 | return reply("❌ Failed to fetch the video. Please try another link.");
28 | }
29 |
30 | // Send the video to the user
31 | const videoUrl = data.data.url;
32 | await conn.sendMessage(from, {
33 | video: { url: videoUrl },
34 | caption: "📥 *Facebook Video Downloaded*\n\n- Powered By Popkid ✅",
35 | }, { quoted: m });
36 |
37 | } catch (error) {
38 | console.error("Error:", error); // Log the error for debugging
39 | reply("❌ Error fetching the video. Please try again.");
40 | }
41 | });
42 |
--------------------------------------------------------------------------------
/plugins/image.js:
--------------------------------------------------------------------------------
1 | const { cmd } = require("../command");
2 | const axios = require("axios");
3 |
4 | cmd({
5 | pattern: "img",
6 | alias: ["image", "googleimage", "searchimg"],
7 | react: "🦋",
8 | desc: "Search and download Google images",
9 | category: "fun",
10 | use: ".img ",
11 | filename: __filename
12 | }, async (conn, mek, m, { reply, args, from }) => {
13 | try {
14 | const query = args.join(" ");
15 | if (!query) {
16 | return reply("🖼️ Please provide a search query\nExample: .img cute cats");
17 | }
18 |
19 | await reply(`🔍 Searching images for "${query}"...`);
20 |
21 | const url = `https://apis.davidcyriltech.my.id/googleimage?query=${encodeURIComponent(query)}`;
22 | const response = await axios.get(url);
23 |
24 | // Validate response
25 | if (!response.data?.success || !response.data.results?.length) {
26 | return reply("❌ No images found. Try different keywords");
27 | }
28 |
29 | const results = response.data.results;
30 | // Get 5 random images
31 | const selectedImages = results
32 | .sort(() => 0.5 - Math.random())
33 | .slice(0, 5);
34 |
35 | for (const imageUrl of selectedImages) {
36 | await conn.sendMessage(
37 | from,
38 | {
39 | image: { url: imageUrl },
40 | caption: `📷 Result for: ${query}\n> © Powered by PopkidXtech💖`
41 | },
42 | { quoted: mek }
43 | );
44 | // Add delay between sends to avoid rate limiting
45 | await new Promise(resolve => setTimeout(resolve, 1000));
46 | }
47 |
48 | } catch (error) {
49 | console.error('Image Search Error:', error);
50 | reply(`❌ Error: ${error.message || "Failed to fetch images"}`);
51 | }
52 | });
53 |
--------------------------------------------------------------------------------
/plugins/menu.js:
--------------------------------------------------------------------------------
1 |
2 | const config = require('../config')
3 | const { cmd, commands } = require('../command');
4 | const os = require("os")
5 | const {runtime} = require('../lib/functions')
6 | const axios = require('axios')
7 |
8 | cmd({
9 | pattern: "menu",
10 | alias: ["allmenu","fullmenu"],use: '.menu',
11 | desc: "menu the bot",
12 | category: "menu",
13 | react: "📱",
14 | filename: __filename
15 | },
16 | async (conn, mek, m, { from, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isAdmins, reply }) => {
17 | try {
18 | let dec = `*╭══🧊⌨︎ ${config.BOT_NAME} ⌨︎🧊*
19 | *┃🪩* *ʀᴜɴᴛɪᴍᴇ* : ${runtime(process.uptime())}
20 | *┃🎲* *ᴍᴏᴅᴇ* : *${config.MODE}*
21 | *┃📺* *ᴘʀᴇғɪx* : *${config.PREFIX}*
22 | *┃🎮* *ʀᴀᴍ ᴜsᴇ* : ${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)},GB / ${Math.round(require('os').totalmem / 1024 / 1024)},GB
23 | *┃🧑* *ᴅᴇᴠ* : *ᴘᴏᴘᴋɪᴅ ᴛᴇᴄʜ*
24 | *┃🚀* *ᴠᴇʀsɪᴏɴs* : *1.0.0*
25 | > ©𝗱𝗲𝘃 𝗽𝗼𝗽𝗸𝗶𝗱🎮
26 | *╰════════════════⊷*
27 | *╭────🧊* *DOWNLOAD-CMD* *🧊*
28 | *├🍟* *.ғʙ*
29 | *├⬡* *.ɪɴꜱᴛᴀ*
30 | *├⬡* *.ᴠɪᴅᴇᴏ*
31 | *├⬡* *.ɢᴅʀɪᴠᴇ*
32 | *├⬡* *.ᴛᴡɪᴛᴛᴇʀ*
33 | *├⬡* *.ᴛᴛ*
34 | *├⬡* *.ᴍᴇᴅɪᴀғɪʀᴇ*
35 | *├⬡* *.ᴘʟᴀʏ*
36 | *├⬡* *.sᴏɴɢ*
37 | *├⬡* *.ᴠɪᴅᴇᴏ*
38 | *├⬡* *.sᴘᴏᴛɪꜰʏ*
39 | *├⬡* *.ᴠɪᴅᴇᴏ4*
40 | *├⬡* *.ɪᴍɢ*
41 | *├⬡* *.Lʏʀɪᴄs*
42 | *├⬡* *.ᴀᴘᴋ*
43 | *├⬡* *.ʙᴀɪsᴄᴏᴘᴇ*
44 | *├🍟* *.ɢɪɴɪsɪsɪʟᴀ*
45 | *┕──────────────❒*
46 | *╭────🎲* *SEARCH-CMD* *🎲*
47 | *├🌸* *.ʏᴛꜱ*
48 | *├⬡* *.ʏᴛᴀ*
49 | *├⬡* *.ᴍᴏᴠɪᴇ*
50 | *├⬡* *.ʀᴏᴍᴀɴᴄᴇ*
51 | *├⬡* *.ᴍᴏᴛɪᴠᴀᴛᴇ*
52 | *├⬡* *.ᴀɪᴠᴏɪᴄᴇ*
53 | *├⬡* *.Gᴏᴏɢʟᴇ*
54 | *├⬡* *.ᴡᴇᴀᴛʜᴇʀ*
55 | *├🌸* *.sᴛɪᴄᴋsᴇᴀʀᴄʜ*
56 | *┕──────────────❒*
57 | *╭────💖* *LOGO-CMD* *💖*
58 | *├👻* *.3ᴅᴄᴏᴍɪᴄ*
59 | *├⬡* *.ᴅʀᴀɢᴏɴʙᴀʟʟ*
60 | *├⬡* *.ᴅᴇᴀᴅᴘᴏᴏʟ*
61 | *├⬡* *.ʙʟᴀᴄᴋᴘɪɴᴋ*
62 | *├⬡* *.ɴᴇᴏɴʟɪɢʜᴛ*
63 | *├⬡* *.ᴄᴀᴛ*
64 | *├⬡* *.sᴀᴅɢɪʀʟ*
65 | *├⬡* *.ᴘᴏʀɴʜᴜʙ*
66 | *├⬡* *.ɴᴀʀᴜᴛᴏ*
67 | *├⬡* *.ᴛʜᴏʀ*
68 | *├⬡* *.ᴀᴍᴇʀɪᴄᴀ*
69 | *├⬡* *.ᴇʀᴀsᴇʀ*
70 | *├⬡* *.3ᴅᴘᴀᴘᴇʀ*
71 | *├⬡* *.ғᴜᴛᴜʀɪsᴛɪᴄ*
72 | *├⬡* *.ᴄʟᴏᴜᴅs*
73 | *├⬡* *.sᴀɴs*
74 | *├⬡* *.ɢᴀʟᴀxʏ*
75 | *├⬡* *.ʟᴇᴀғ*
76 | *├⬡* *.sᴜɴsᴇᴛ*
77 | *├⬡* *.ɴɪɢᴇʀɪᴀ*
78 | *├⬡* *.ᴅᴇᴠɪʟᴡɪɴɢs*
79 | *├⬡* *.ʜᴀᴄᴋᴇʀ*
80 | *├⬡* *.ʙᴏᴏᴍ*
81 | *├⬡* *.ʟᴜxᴜʀʏ*
82 | *├⬡* *.ᴢᴏᴅɪᴀᴄ*
83 | *├⬡* *.ᴀɴɢᴇʟᴡɪɴɢs*
84 | *├⬡* *.ʙᴜʟʙ*
85 | *├⬡* *.ᴛᴀᴛᴏᴏ*
86 | *├⬡* *.ᴄᴀsᴛʟᴇ*
87 | *├⬡* *.ғʀᴏᴢᴇɴ*
88 | *├⬡* *.ᴘᴀɪɴᴛ*
89 | *├⬡* *.ʙɪʀᴛʜᴅᴀʏ*
90 | *├⬡* *.ᴛʏᴘᴏɢʀᴀᴘʜʏ*
91 | *├⬡* *.ʙᴇᴀʀ*
92 | *├👻* *.ᴠᴀʟᴏʀᴀɴᴛ*
93 | *┕──────────────❒*
94 | *╭────👻* *AI-CMD* *👻*
95 | *├🚀* *.ɢᴘᴛ*
96 | *├⬡* *.ᴀɪ*
97 | *├⬡* *.ɪᴍᴀɢᴇsᴄᴀɴ*
98 | *├🚀* *.ɪᴍᴀɢɪɴᴇ*
99 | *┕──────────────❒*
100 | *╭────🕳️* *OWNER-CMD* *🕳️*
101 | *├🎮* *.ᴜᴘᴅᴀᴛᴇᴄᴍᴅ*
102 | *├⬡* *.sᴇᴛᴛɪɴɢs*
103 | *├⬡* *.ᴏᴡɴᴇʀ*
104 | *├⬡* *.ʀᴇᴘᴏ*
105 | *├⬡* *.ꜱʏꜱᴛᴇᴍ*
106 | *├⬡* *.ꜱᴛᴀᴛᴜꜱ*
107 | *├⬡* *.Aʙᴏᴜᴛ*
108 | *├⬡* *.ʙʟᴏᴄᴋ*
109 | *├⬡* *.ᴜɴʙʟᴏᴄᴋ*
110 | *├⬡* *.sʜᴜᴛᴅᴏᴡɴ*
111 | *├⬡* *.ʙʀᴏᴀᴅᴄᴀsᴛ*
112 | *├⬡* *.ᴊɪᴅ*
113 | *├⬡* *.ɢᴊɪᴅ*
114 | *├⬡* *.ᴘᴀɪʀ*
115 | *├⬡* *.sᴀᴠᴇ*
116 | *├🎮* *.ʀᴇꜱᴛᴀʀᴛ*
117 | *┕───────────────❒*
118 | *╭────🌸* *GROUP-CMD* *🌸*
119 | *├🎲* *.ʀᴇᴍᴏᴠᴇ*
120 | *├⬡* *.ᴅᴇʟ*
121 | *├⬡* *.ᴀᴅᴅ*
122 | *├⬡* *.ᴋɪᴄᴋ*
123 | *├⬡* *.ᴋɪᴄᴋᴀʟʟ*
124 | *├⬡* *.ᴘʀᴏᴍᴏᴛᴇ*
125 | *├⬡* *.ᴅᴇᴍᴏᴛᴇ*
126 | *├⬡* *.ᴛᴀɢᴀʟʟ*
127 | *├⬡* *.ɪɴᴠɪᴛᴇ*
128 | *├⬡* *.ʀᴇᴠᴏᴋᴇ*
129 | *├⬡* *.ᴘᴏʟʟ*
130 | *├⬡* *.ʀᴀɴᴅᴏᴍsʜɪᴘ*
131 | *├⬡* *.ɴᴇᴡɢᴄ*
132 | *├⬡* *.ᴍᴜᴛᴇ*
133 | *├⬡* *.ᴜɴᴍᴜᴛᴇ*
134 | *├⬡* *.ʟᴏᴄᴋɢᴄ*
135 | *├⬡* *.ᴜɴʟᴏᴄᴋɢᴄ*
136 | *├⬡* *.ʟᴇᴀᴠᴇ*
137 | *├⬡* *.ɢɴᴀᴍᴇ*
138 | *├⬡* *.ᴍᴀᴋᴇᴀᴅᴍɪɴ*
139 | *├⬡* *.ᴛᴀɢᴀᴅᴍɪɴs*
140 | *├⬡* *.ɢᴅᴇsᴄ*
141 | *├⬡* *.ᴊᴏɪɴ*
142 | *├⬡* *.ʜɪᴅᴇᴛᴀɢ*
143 | *├🎲* *.ɢɪɴғᴏ*
144 | *┕──────────────❒*
145 | *╭────🌌* *INFO-CMD* *🌌*
146 | *├🍉* *.ᴀʙᴏᴜᴛ*
147 | *├⬡* *.ᴀʟɪᴠᴇ*
148 | *├⬡* *.ʀᴇǫᴜᴇsᴛ*
149 | *├⬡* *.ʙᴏᴛɪɴꜰᴏ*
150 | *├⬡* *.ꜱᴛᴀᴛᴜꜱ*
151 | *├⬡* *.ᴘɪɴɢ*
152 | *├⬡* *.ꜱʏꜱᴛᴇᴍ*
153 | *├🍉* *.ᴜᴘᴛɪᴍᴇ*
154 | *┕──────────────❒*
155 | *╭────🦜* *BOT-CMD* *🦜*
156 | *├💖* *.ʀᴇᴘᴏ*
157 | *├⬡* *.ᴍᴇɴᴜ*
158 | *├⬡* *.ᴜᴘᴅᴀᴛᴇ*
159 | *├⬡* *.ᴍᴏᴅᴇ*
160 | *├⬡* *.ᴀᴜᴛᴏ-ᴛʏᴘɪɴɢ*
161 | *├⬡* *.ᴀʟᴡᴀʏsᴏɴʟɪɴᴇ*
162 | *├⬡* *.ᴀᴜᴛᴏ-ʀᴇᴄᴏʀᴅɪɴɢ*
163 | *├⬡* *.ᴀᴜᴛᴏʀᴇᴀᴅsᴛᴀᴛᴜs*
164 | *├⬡* *.ᴀɴᴛɪʙᴀᴅ*
165 | *├⬡* *.ᴀᴜᴛᴏsᴛɪᴄᴋᴇʀ*
166 | *├⬡* *.ᴀᴜᴛᴏʀᴇᴘʟʏ*
167 | *├⬡* *.ᴀᴜᴛᴏʀᴇᴀᴄᴛ*
168 | *├⬡* *.ᴀɴᴛɪʟɪɴᴋ*
169 | *├💖* *.ᴀᴜᴛᴏʀᴇᴀᴅ*
170 | *┕──────────────❒*
171 | *╭────🍉* *CONVERTER-CMD* *🍉*
172 | *├🎥* *.sᴛɪᴄᴋᴇʀ*
173 | *├⬡* *.ᴛᴀᴋᴇ*
174 | *├⬡* *.ᴛʀᴛ*
175 | *├⬡* *.ᴛᴛs*
176 | *├⬡* *.ꜰᴀɴᴄʏ*
177 | *├⬡* *.ᴜʀʟ*
178 | *├⬡* *.Aɢᴇ*
179 | *├⬡* *.Cᴏɴᴠᴇʀᴛ*
180 | *├⬡* *.ᴛɪɴʏ*
181 | *├⬡* *.ᴍᴏᴠɪᴇ*
182 | *├⬡* *.ᴛᴇʀᴍɪɴᴀᴛᴇ*
183 | *├⬡* *.ғᴀᴍɪʟʏ*
184 | *├⬡* *.ᴛʀᴛ*
185 | *├🎥* *.ᴛᴛs*
186 | *┕─────────────❒*
187 | *╭────🍟* *RANDOM-CMD* *🍟*
188 | *├🍔* *.ᴀɴɪᴍᴇ*
189 | *├⬡* *.ᴄᴏᴜᴘʟᴇᴘᴘ*
190 | *├⬡* *.ʟᴏʟɪ*
191 | *├⬡* *.ᴡᴀɪꜰᴜ*
192 | *├⬡* *.ᴄᴏsᴘʟᴀʏ*
193 | *├⬡* *.ɴᴇᴋᴏ*
194 | *├🍔* *.ʀᴀɴᴅᴏᴍᴀɴɪᴍᴇ*
195 | *┕──────────────❒*
196 | *╭────🍔* *WALLPAPERS-CMD* *🍔*
197 | *├🧊* *.ɪᴍɢ*
198 | *├⬡* *.ʟᴏɢᴏ*
199 | *├🧊* *.ss*
200 | *┕──────────────❒*
201 | *╭────🪩* *OTHER-CMD* *🪩*
202 | *├🫠* *.ᴛʀᴛ*
203 | *├⬡* *.ᴊᴏᴋᴇ*
204 | *├⬡* *.ꜰᴀᴄᴛ*
205 | *├⬡* *.ɢɪᴛʜᴜʙ*
206 | *├⬡* *.ɢᴘᴀꜱꜱ*
207 | *├⬡* *.ʜᴀᴄᴋ*
208 | *├⬡* *.vv*
209 | *├⬡* *.vv2*
210 | *├⬡* *.sᴘᴀᴍ*
211 | *├⬡* *.ᴠᴄᴀʀᴅ*
212 | *├⬡* *.ꜱʀᴇᴘᴏ*
213 | *├⬡* *.sʏsᴛᴇᴍ*
214 | *├⬡* *.ʀᴀɴᴋ*
215 | *├⬡* *.Tɪᴍᴇᴢᴏɴᴇ*
216 | *├⬡* *.ᴅᴇꜰɪɴᴇ*
217 | *├🫠* *.Dᴀɪʟʏꜰᴀᴄᴛ*
218 | *┕─────────────❒*
219 | > ᴘᴏᴡᴇʀᴇᴅ ʙʏ ᴘᴏᴘᴋɪᴅ🎲`;
220 |
221 | await conn.sendMessage(
222 | from,
223 | {
224 | image: { url: `https://files.catbox.moe/e6rhto.jpg` },
225 | caption: dec,
226 | contextInfo: {
227 | mentionedJid: [m.sender],
228 | forwardingScore: 999,
229 | isForwarded: true,
230 | forwardedNewsletterMessageInfo: {
231 | newsletterJid: '120363290715861418@newsletter',
232 | newsletterName: 'PᴏᴘᴋɪᴅXᴛᴇᴄʜ',
233 | serverMessageId: 143
234 | }
235 | }
236 | },
237 | { quoted: mek }
238 | );
239 |
240 | // Send audio
241 | await conn.sendMessage(from, {
242 | audio: { url: 'https://files.catbox.moe/kxdej4.m4a' },
243 | mimetype: 'audio/mp4',
244 | ptt: true
245 | }, { quoted: mek });
246 |
247 | } catch (e) {
248 | console.log(e);
249 | reply(`${e}`);
250 | }
251 | });
252 |
--------------------------------------------------------------------------------
/plugins/owner.js:
--------------------------------------------------------------------------------
1 | const { cmd } = require('../command');
2 | const config = require('../config');
3 |
4 | cmd({
5 | pattern: "owner",
6 | react: "✅",
7 | desc: "Displays bot owner's contact info",
8 | category: "main",
9 | filename: __filename
10 | },
11 | async (conn, mek, m, { from, reply }) => {
12 | try {
13 | const ownerNumber = config.OWNER_NUMBER;
14 | const ownerName = config.OWNER_NAME;
15 |
16 | if (!ownerNumber || !ownerName) {
17 | return reply("Owner details are missing in config file.");
18 | }
19 |
20 | const vcard = [
21 | 'BEGIN:VCARD',
22 | 'VERSION:3.0',
23 | `FN:${ownerName}`,
24 | `TEL;type=CELL;type=VOICE;waid=${ownerNumber.replace('+', '')}:${ownerNumber}`,
25 | 'END:VCARD'
26 | ].join('\n');
27 |
28 | // Send vCard contact
29 | await conn.sendMessage(from, {
30 | contacts: {
31 | displayName: ownerName,
32 | contacts: [{ vcard }]
33 | }
34 | });
35 |
36 | // Send owner details with image
37 | await conn.sendMessage(from, {
38 | image: { url: 'https://files.catbox.moe/e6rhto.jpg' },
39 | caption:
40 | `┏━━━『 *Bot Owner Info* 』━━━┓
41 | ┃ ✦ *Name:* ${ownerName}
42 | ┃ ✦ *Number:* ${ownerNumber}
43 | ┃ ✦ *Bot Version:* 2.0.0 Beta
44 | ┃ ✦ *Framework:* POPKID XMD
45 | ┗━━━━━━━━━━━━━━━━━━━━━━┛
46 | _Contact owner only for important queries._`,
47 | contextInfo: {
48 | mentionedJid: [`${ownerNumber.replace('+', '')}@s.whatsapp.net`],
49 | forwardingScore: 999,
50 | isForwarded: true,
51 | forwardedNewsletterMessageInfo: {
52 | newsletterJid: '120363290715861418@newsletter',
53 | newsletterName: 'ᴘᴏᴘᴋɪᴅ xᴍᴅ',
54 | serverMessageId: 143
55 | }
56 | }
57 | }, { quoted: mek });
58 |
59 | // Send voice message
60 | await conn.sendMessage(from, {
61 | audio: { url: 'https://files.catbox.moe/x9g2rd.m4a' },
62 | mimetype: 'audio/mp4',
63 | ptt: true
64 | }, { quoted: mek });
65 |
66 | } catch (error) {
67 | console.error(error);
68 | reply(`An error occurred: ${error.message}`);
69 | }
70 | });
71 |
--------------------------------------------------------------------------------
/plugins/ping.js:
--------------------------------------------------------------------------------
1 | const config = require('../config');
2 | const { cmd, commands } = require('../command');
3 |
4 | cmd({
5 | pattern: "ping",
6 | alias: ["speed","pong"],use: '.ping',
7 | desc: "Check bot's response time.",
8 | category: "main",
9 | react: "⚡",
10 | filename: __filename
11 | },
12 | async (conn, mek, m, { from, quoted, sender, reply }) => {
13 | try {
14 | const start = new Date().getTime();
15 |
16 | const reactionEmojis = ['🔥', '⚡', '🚀', '💨', '🎯', '🎉', '🌟', '💥', '🕐', '🔹'];
17 | const textEmojis = ['💎', '🏆', '⚡️', '🚀', '🎶', '🌠', '🌀', '🔱', '🛡️', '✨'];
18 |
19 | const reactionEmoji = reactionEmojis[Math.floor(Math.random() * reactionEmojis.length)];
20 | let textEmoji = textEmojis[Math.floor(Math.random() * textEmojis.length)];
21 |
22 | // Ensure reaction and text emojis are different
23 | while (textEmoji === reactionEmoji) {
24 | textEmoji = textEmojis[Math.floor(Math.random() * textEmojis.length)];
25 | }
26 |
27 | // Send reaction using conn.sendMessage()
28 | await conn.sendMessage(from, {
29 | react: { text: textEmoji, key: mek.key }
30 | });
31 |
32 | const end = new Date().getTime();
33 | const responseTime = (end - start) / 1000;
34 |
35 | const text = `> *POPKID-XTECH SPEED: ${responseTime.toFixed(2)}ms ${reactionEmoji}*`;
36 |
37 | await conn.sendMessage(from, {
38 | text,
39 | contextInfo: {
40 | mentionedJid: [sender],
41 | forwardingScore: 999,
42 | isForwarded: true,
43 | forwardedNewsletterMessageInfo: {
44 | newsletterJid: '120363290715861418@newsletter',
45 | newsletterName: "PopkidXtech",
46 | serverMessageId: 143
47 | }
48 | }
49 | }, { quoted: mek });
50 |
51 | } catch (e) {
52 | console.error("Error in ping command:", e);
53 | reply(`An error occurred: ${e.message}`);
54 | }
55 | });
56 |
57 | // ping2
58 |
59 | cmd({
60 | pattern: "ping2",
61 | desc: "Check bot's response time.",
62 | category: "main",
63 | react: "🍂",
64 | filename: __filename
65 | },
66 | async (conn, mek, m, { from, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isAdmins, reply }) => {
67 | try {
68 | const startTime = Date.now()
69 | const message = await conn.sendMessage(from, { text: '*PINGING...*' })
70 | const endTime = Date.now()
71 | const ping = endTime - startTime
72 | await conn.sendMessage(from, { text: `*🔥 POPKID-MD SPEED : ${ping}ms*` }, { quoted: message })
73 | } catch (e) {
74 | console.log(e)
75 | reply(`${e}`)
76 | }
77 | })
78 |
--------------------------------------------------------------------------------
/plugins/play.js:
--------------------------------------------------------------------------------
1 |
2 | const { cmd } = require('../command');
3 | const { ytsearch } = require('@dark-yasiya/yt-dl.js');
4 |
5 | cmd({
6 | pattern: "mp4",
7 | alias: ["video"],
8 | react: "🎥",
9 | desc: "Download YouTube video",
10 | category: "main",
11 | use: '.mp4 < Yt url or Name >',
12 | filename: __filename
13 | }, async (conn, mek, m, { from, prefix, quoted, q, reply }) => {
14 | try {
15 | if (!q) return await reply("Please provide a YouTube URL or video name.");
16 |
17 | const yt = await ytsearch(q); // Search for video in parallel
18 | if (yt.results.length < 1) return reply("No results found!");
19 |
20 | let yts = yt.results[0];
21 | let apiUrl = `https://apis.davidcyriltech.my.id/download/ytmp4?url=${encodeURIComponent(yts.url)}`;
22 |
23 | // Start the API fetch concurrently
24 | let [videoRes] = await Promise.all([
25 | fetch(apiUrl).then((res) => res.json()) // Fetch the video data
26 | ]);
27 |
28 | if (videoRes.status !== 200 || !videoRes.success || !videoRes.result.download_url) {
29 | return reply("Failed to fetch the video. Please try again later.");
30 | }
31 |
32 | let ytmsg = `📹 *Popkid Video Downloader*
33 | 🎬 *Title:* ${yts.title}
34 | ⏳ *Duration:* ${yts.timestamp}
35 | 👀 *Views:* ${yts.views}
36 | 👤 *Author:* ${yts.author.name}
37 | 🔗 *Link:* ${yts.url}
38 | > Powered by PopkidXtech❤️`;
39 |
40 | // Send video directly with caption
41 | await conn.sendMessage(
42 | from,
43 | {
44 | video: { url: videoRes.result.download_url },
45 | caption: ytmsg,
46 | mimetype: "video/mp4"
47 | },
48 | { quoted: mek }
49 | );
50 | } catch (e) {
51 | console.log(e);
52 | reply("An error occurred. Please try again later.");
53 | }
54 | });
55 |
56 | // MP3 song download - Optimized for faster response
57 |
58 | cmd({
59 | pattern: "song",
60 | alias: ["play", "mp3"],
61 | react: "🎧",
62 | desc: "Download YouTube song",
63 | category: "main",
64 | use: '.song ',
65 | filename: __filename
66 | }, async (conn, mek, m, { from, sender, reply, q }) => {
67 | try {
68 | if (!q) return reply("Please provide a song name or YouTube link.");
69 |
70 | const yt = await ytsearch(q); // Search for song in parallel
71 | if (!yt.results.length) return reply("No results found!");
72 |
73 | const song = yt.results[0];
74 | const apiUrl = `https://apis.davidcyriltech.my.id/youtube/mp3?url=${encodeURIComponent(song.url)}`;
75 |
76 | // Fetch song data concurrently
77 | let [songRes] = await Promise.all([
78 | fetch(apiUrl).then((res) => res.json())
79 | ]);
80 |
81 | if (!songRes?.result?.downloadUrl) return reply("Download failed. Try again later.");
82 |
83 | await conn.sendMessage(from, {
84 | audio: { url: songRes.result.downloadUrl },
85 | mimetype: "audio/mpeg",
86 | fileName: `${song.title}.mp3`,
87 | contextInfo: {
88 | externalAdReply: {
89 | title: song.title.length > 25 ? `${song.title.substring(0, 22)}...` : song.title,
90 | body: "Join our WhatsApp Channel",
91 | mediaType: 1,
92 | thumbnailUrl: song.thumbnail.replace('default.jpg', 'hqdefault.jpg'),
93 | sourceUrl: 'https://whatsapp.com/channel/0029VadQrNI8KMqo79BiHr3l',
94 | mediaUrl: 'https://whatsapp.com/channel/0029VadQrNI8KMqo79BiHr3l',
95 | showAdAttribution: true,
96 | renderLargerThumbnail: true
97 | }
98 | }
99 | }, { quoted: mek });
100 |
101 | } catch (error) {
102 | console.error(error);
103 | reply("An error occurred. Please try again.");
104 | }
105 | });
106 |
--------------------------------------------------------------------------------
/plugins/presence.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 | const config = require('../config')
4 | const {cmd , commands} = require('../command')
5 |
6 |
7 | //auto recording
8 | cmd({
9 | on: "body"
10 | },
11 | async (conn, mek, m, { from, body, isOwner }) => {
12 | if (config.AUTO_RECORDING === 'true') {
13 | await conn.sendPresenceUpdate('recording', from);
14 | }
15 | }
16 | );
17 |
18 | // Composing (Auto Typing)
19 | cmd({
20 | on: "body"
21 | },
22 | async (conn, mek, m, { from, body, isOwner }) => {
23 | if (config.AUTO_TYPING === 'true') {
24 | await conn.sendPresenceUpdate('composing', from); // send typing
25 | }
26 | });
27 |
28 | // Always Online
29 | cmd({
30 | on: "body"
31 | }, async (conn, mek, m, { from, isOwner }) => {
32 | try {
33 | if (config.ALWAYS_ONLINE === "true") {
34 | // Always Online Mode: Bot always appears online (double tick)
35 | await conn.sendPresenceUpdate("available", from);
36 | } else {
37 | // Dynamic Mode: Adjust presence based on owner's status
38 | if (isOwner) {
39 | // If the owner is online, show as available (double tick)
40 | await conn.sendPresenceUpdate("available", from);
41 | } else {
42 | // If the owner is offline, show as unavailable (single tick)
43 | await conn.sendPresenceUpdate("unavailable", from);
44 | }
45 | }
46 | } catch (e) {
47 | console.log(e);
48 | }
49 | });
50 |
51 | // Public Mod
52 | cmd({
53 | on: "body"
54 | }, async (conn, mek, m, { from, isOwner }) => {
55 | try {
56 | if (config.ALWAYS_ONLINE === "true") {
57 | // Public Mode + Always Online: Always show as online
58 | await conn.sendPresenceUpdate("available", from);
59 | } else if (config.PUBLIC_MODE === "true") {
60 | // Public Mode + Dynamic: Respect owner's presence
61 | if (isOwner) {
62 | // If owner is online, show available
63 | await conn.sendPresenceUpdate("available", from);
64 | } else {
65 | // If owner is offline, show unavailable
66 | await conn.sendPresenceUpdate("unavailable", from);
67 | }
68 | }
69 | } catch (e) {
70 | console.log(e);
71 | }
72 | });
73 |
--------------------------------------------------------------------------------
/plugins/repo.js:
--------------------------------------------------------------------------------
1 | const fetch = require('node-fetch');
2 | const config = require('../config');
3 | const { cmd } = require('../command');
4 |
5 | cmd({
6 | pattern: "repo",
7 | alias: ["sc", "script", "info"],
8 | desc: "Fetch GitHub repository information",
9 | react: "📂",
10 | category: "info",
11 | filename: __filename,
12 | },
13 | async (conn, mek, m, { from, reply }) => {
14 | const githubRepoURL = 'https://github.com/Popkiddevs/POPKID-XTECH';
15 |
16 | try {
17 | const [, username, repoName] = githubRepoURL.match(/github\.com\/([^/]+)\/([^/]+)/);
18 | const response = await fetch(`https://api.github.com/repos/${username}/${repoName}`);
19 |
20 | if (!response.ok) throw new Error(`GitHub API error: ${response.status}`);
21 | const repoData = await response.json();
22 |
23 | // Format 1: Classic Box
24 | const style1 = `╭───『 ${config.BOT_NAME} REPO 』───⳹
25 | │
26 | │ 📦 *Repository*: ${repoData.name}
27 | │ 👑 *Owner*: ${repoData.owner.login}
28 | │ ⭐ *Stars*: ${repoData.stargazers_count}
29 | │ ⑂ *Forks*: ${repoData.forks_count}
30 | │ 🔗 *URL*: ${repoData.html_url}
31 | │
32 | │ 📝 *Description*:
33 | │ ${repoData.description || 'No description'}
34 | │
35 | ╰────────────────⳹
36 | > ${config.DESCRIPTION}`;
37 |
38 | // Format 2: Minimalist
39 | const style2 = `•——[ GITHUB INFO ]——•
40 | │
41 | ├─ 🏷️ ${repoData.name}
42 | ├─ 👤 ${repoData.owner.login}
43 | ├─ ✨ ${repoData.stargazers_count} Stars
44 | ├─ ⑂ ${repoData.forks_count} Forks
45 | │
46 | •——[ ${config.BOT_NAME} ]——•
47 | > ${config.DESCRIPTION}`;
48 |
49 | // Format 3: Fancy Borders
50 | const style3 = `▄▀▄▀▄ REPOSITORY INFO ▄▀▄▀▄
51 |
52 | ♢ *Project*: ${repoData.name}
53 | ♢ *Author*: ${repoData.owner.login}
54 | ♢ *Stars*: ${repoData.stargazers_count} ✨
55 | ♢ *Forks*: ${repoData.forks_count} ⑂
56 | ♢ *Updated*: ${new Date(repoData.updated_at).toLocaleDateString()}
57 |
58 | 🔗 ${repoData.html_url}
59 |
60 | > ${config.DESCRIPTION}`;
61 |
62 | // Format 4: Code Style
63 | const style4 = `┌──────────────────────┐
64 | │ ⚡ ${config.BOT_NAME} REPO ⚡ │
65 | ├──────────────────────┤
66 | │ • Name: ${repoData.name}
67 | │ • Owner: ${repoData.owner.login}
68 | │ • Stars: ${repoData.stargazers_count}
69 | │ • Forks: ${repoData.forks_count}
70 | │ • URL: ${repoData.html_url}
71 | │ • Desc: ${repoData.description || 'None'}
72 | └──────────────────────┘
73 | > ${config.DESCRIPTION}`;
74 |
75 | // Format 5: Modern Blocks
76 | const style5 = `▰▰▰▰▰ REPO INFO ▰▰▰▰▰
77 |
78 | 🏷️ *${repoData.name}*
79 | 👨💻 ${repoData.owner.login}
80 |
81 | ⭐ ${repoData.stargazers_count} ⑂ ${repoData.forks_count}
82 | 🔗 ${repoData.html_url}
83 |
84 | 📜 ${repoData.description || 'No description'}
85 |
86 | > ${config.DESCRIPTION}`;
87 |
88 | // Format 6: Retro Terminal
89 | const style6 = `╔══════════════════════╗
90 | ║ ${config.BOT_NAME} REPO ║
91 | ╠══════════════════════╣
92 | ║ > NAME: ${repoData.name}
93 | ║ > OWNER: ${repoData.owner.login}
94 | ║ > STARS: ${repoData.stargazers_count}
95 | ║ > FORKS: ${repoData.forks_count}
96 | ║ > URL: ${repoData.html_url}
97 | ║ > DESC: ${repoData.description || 'None'}
98 | ╚══════════════════════╝
99 | > ${config.DESCRIPTION}`;
100 |
101 | // Format 7: Elegant
102 | const style7 = `┌───────────────┐
103 | │ 📂 REPO │
104 | └───────────────┘
105 | │
106 | │ *Project*: ${repoData.name}
107 | │ *Author*: ${repoData.owner.login}
108 | │
109 | │ ✨ ${repoData.stargazers_count} Stars
110 | │ ⑂ ${repoData.forks_count} Forks
111 | │
112 | │ 🔗 ${repoData.html_url}
113 | │
114 | ┌───────────────┐
115 | │ 📝 DESC │
116 | └───────────────┘
117 | ${repoData.description || 'No description'}
118 |
119 | > ${config.DESCRIPTION}`;
120 |
121 | // Format 8: Social Media Style
122 | const style8 = `✦ ${config.BOT_NAME} Repository ✦
123 |
124 | 📌 *${repoData.name}*
125 | 👤 @${repoData.owner.login}
126 |
127 | ⭐ ${repoData.stargazers_count} Stars | ⑂ ${repoData.forks_count} Forks
128 | 🔄 Last updated: ${new Date(repoData.updated_at).toLocaleDateString()}
129 |
130 | 🔗 GitHub: ${repoData.html_url}
131 |
132 | ${repoData.description || 'No description available'}
133 |
134 | > ${config.DESCRIPTION}`;
135 |
136 | // Format 9: Fancy List
137 | const style9 = `╔♫═🎧═♫══════════╗
138 | ${config.BOT_NAME} REPO
139 | ╚♫═🎧═♫══════════╝
140 |
141 | •・゜゜・* ✧ *・゜゜・•
142 | ✧ *Name*: ${repoData.name}
143 | ✧ *Owner*: ${repoData.owner.login}
144 | ✧ *Stars*: ${repoData.stargazers_count}
145 | ✧ *Forks*: ${repoData.forks_count}
146 | •・゜゜・* ✧ *・゜゜・•
147 |
148 | 🔗 ${repoData.html_url}
149 |
150 | ${repoData.description || 'No description'}
151 |
152 | > ${config.DESCRIPTION}`;
153 |
154 | // Format 10: Professional
155 | const style10 = `┏━━━━━━━━━━━━━━━━━━┓
156 | ┃ REPOSITORY REPORT ┃
157 | ┗━━━━━━━━━━━━━━━━━━┛
158 |
159 | ◈ Project: ${repoData.name}
160 | ◈ Maintainer: ${repoData.owner.login}
161 | ◈ Popularity: ★ ${repoData.stargazers_count} | ⑂ ${repoData.forks_count}
162 | ◈ Last Update: ${new Date(repoData.updated_at).toLocaleDateString()}
163 | ◈ URL: ${repoData.html_url}
164 |
165 | Description:
166 | ${repoData.description || 'No description provided'}
167 |
168 | > ${config.DESCRIPTION}`;
169 |
170 | const styles = [style1, style2, style3, style4, style5, style6, style7, style8, style9, style10];
171 | const selectedStyle = styles[Math.floor(Math.random() * styles.length)];
172 |
173 | // Send image with repo info
174 | await conn.sendMessage(from, {
175 | image: { url: config.MENU_IMAGE_URL || 'https://files||.catbox.moe/e6rhto.jpg' },
176 | caption: selectedStyle,
177 | contextInfo: {
178 | mentionedJid: [m.sender],
179 | forwardingScore: 999,
180 | isForwarded: true,
181 | forwardedNewsletterMessageInfo: {
182 | newsletterJid: '120363290715861418@newsletter',
183 | newsletterName: config.OWNER_NAME || 'Popkid Xtech',
184 | serverMessageId: 143
185 | }
186 | }
187 | }, { quoted: mek });
188 |
189 | // Send audio
190 | await conn.sendMessage(from, {
191 | audio: { url: 'https://files.catbox.moe/10rp3b.m4a' },
192 | mimetype: 'audio/mp4',
193 | ptt: true,
194 | contextInfo: {
195 | mentionedJid: [m.sender],
196 | forwardingScore: 999,
197 | isForwarded: true
198 | }
199 | }, { quoted: mek });
200 |
201 | } catch (error) {
202 | console.error("Repo command error:", error);
203 | reply(`❌ Error: ${error.message}`);
204 | }
205 | });
206 |
--------------------------------------------------------------------------------
/plugins/save.js:
--------------------------------------------------------------------------------
1 | const { cmd } = require("../command");
2 |
3 | cmd({
4 | pattern: "send",
5 | alias: ["sendme", 'save'],
6 | react: '📤',
7 | desc: "Forwards quoted message back to user",
8 | category: "utility",
9 | filename: __filename
10 | }, async (client, message, match, { from }) => {
11 | try {
12 | if (!match.quoted) {
13 | return await client.sendMessage(from, {
14 | text: "*🍁 Please reply to a message!*"
15 | }, { quoted: message });
16 | }
17 |
18 | const buffer = await match.quoted.download();
19 | const mtype = match.quoted.mtype;
20 | const options = { quoted: message };
21 |
22 | let messageContent = {};
23 | switch (mtype) {
24 | case "imageMessage":
25 | messageContent = {
26 | image: buffer,
27 | caption: match.quoted.text || '',
28 | mimetype: match.quoted.mimetype || "image/jpeg"
29 | };
30 | break;
31 | case "videoMessage":
32 | messageContent = {
33 | video: buffer,
34 | caption: match.quoted.text || '',
35 | mimetype: match.quoted.mimetype || "video/mp4"
36 | };
37 | break;
38 | case "audioMessage":
39 | messageContent = {
40 | audio: buffer,
41 | mimetype: "audio/mp4",
42 | ptt: match.quoted.ptt || false
43 | };
44 | break;
45 | default:
46 | return await client.sendMessage(from, {
47 | text: "❌ Only image, video, and audio messages are supported"
48 | }, { quoted: message });
49 | }
50 |
51 | await client.sendMessage(from, messageContent, options);
52 | } catch (error) {
53 | console.error("Forward Error:", error);
54 | await client.sendMessage(from, {
55 | text: "❌ Error forwarding message:\n" + error.message
56 | }, { quoted: message });
57 | }
58 | });
59 |
--------------------------------------------------------------------------------
/plugins/settings.js:
--------------------------------------------------------------------------------
1 | const config = require('../config');
2 | const { cmd, commands } = require('../command');
3 | const { runtime } = require('../lib/functions');
4 | const axios = require('axios');
5 |
6 | function isEnabled(value) {
7 | return value && value.toString().toLowerCase() === "true";
8 | }
9 |
10 | cmd({
11 | pattern: "env",
12 | alias: ["config", "settings"],
13 | desc: "Show all bot configuration variables (Owner Only)",
14 | category: "system",
15 | react: "⚙️",
16 | filename: __filename
17 | },
18 | async (conn, mek, m, { from, quoted, reply, isCreator }) => {
19 | try {
20 | if (!isCreator) {
21 | return reply("🚫 *Owner Only Command!* You're not authorized to view bot configurations.");
22 | }
23 |
24 | let envSettings = `
25 | ╔═════〔 *${config.BOT_NAME} SYSTEM CONFIG* 〕═════╗
26 |
27 | ┌─「 🤖 *BOT INFO* 」
28 | │ • *Name:* ${config.BOT_NAME}
29 | │ • *Prefix:* ${config.PREFIX}
30 | │ • *Owner:* ${config.OWNER_NAME}
31 | │ • *Number:* ${config.OWNER_NUMBER}
32 | │ • *Mode:* ${config.MODE.toUpperCase()}
33 | └─────────────────────
34 |
35 | ┌─「 ⚙️ *CORE SETTINGS* 」
36 | │ • Public Mode: ${isEnabled(config.PUBLIC_MODE) ? "✅" : "❌"}
37 | │ • Always Online: ${isEnabled(config.ALWAYS_ONLINE) ? "✅" : "❌"}
38 | │ • Read Msgs: ${isEnabled(config.READ_MESSAGE) ? "✅" : "❌"}
39 | │ • Read Cmds: ${isEnabled(config.READ_CMD) ? "✅" : "❌"}
40 | └─────────────────────
41 |
42 | ┌─「 🔌 *AUTOMATION* 」
43 | │ • Auto Reply: ${isEnabled(config.AUTO_REPLY) ? "✅" : "❌"}
44 | │ • Auto React: ${isEnabled(config.AUTO_REACT) ? "✅" : "❌"}
45 | │ • Custom React: ${isEnabled(config.CUSTOM_REACT) ? "✅" : "❌"}
46 | │ • React Emojis: ${config.CUSTOM_REACT_EMOJIS}
47 | │ • Auto Sticker: ${isEnabled(config.AUTO_STICKER) ? "✅" : "❌"}
48 | │ • Auto Voice: ${isEnabled(config.AUTO_VOICE) ? "✅" : "❌"}
49 | └─────────────────────
50 |
51 | ┌─「 📢 *STATUS SETTINGS* 」
52 | │ • Status Seen: ${isEnabled(config.AUTO_STATUS_SEEN) ? "✅" : "❌"}
53 | │ • Status Reply: ${isEnabled(config.AUTO_STATUS_REPLY) ? "✅" : "❌"}
54 | │ • Status React: ${isEnabled(config.AUTO_STATUS_REACT) ? "✅" : "❌"}
55 | │ • Status Msg: ${config.AUTO_STATUS_MSG}
56 | └─────────────────────
57 |
58 | ┌─「 🛡️ *SECURITY* 」
59 | │ • Anti-Link: ${isEnabled(config.ANTI_LINK) ? "✅" : "❌"}
60 | │ • Anti-Bad: ${isEnabled(config.ANTI_BAD) ? "✅" : "❌"}
61 | │ • Anti-VV: ${isEnabled(config.ANTI_VV) ? "✅" : "❌"}
62 | │ • Delete Links: ${isEnabled(config.DELETE_LINKS) ? "✅" : "❌"}
63 | └─────────────────────
64 |
65 | ┌─「 🎨 *MEDIA* 」
66 | │ • Alive Image: ${config.ALIVE_IMG}
67 | │ • Menu Image: ${config.MENU_IMAGE_URL}
68 | │ • Alive Msg: ${config.LIVE_MSG}
69 | │ • Sticker Pack: ${config.STICKER_NAME}
70 | └─────────────────────
71 |
72 | ┌─「 ⏳ *MISC* 」
73 | │ • Auto Typing: ${isEnabled(config.AUTO_TYPING) ? "✅" : "❌"}
74 | │ • Auto Recording: ${isEnabled(config.AUTO_RECORDING) ? "✅" : "❌"}
75 | │ • Anti-Del Path: ${config.ANTI_DEL_PATH}
76 | │ • Dev Number: ${config.DEV}
77 | └─────────────────────
78 |
79 | ╚═════〔 *${config.DESCRIPTION}* 〕═════╝
80 | `;
81 |
82 | await conn.sendMessage(
83 | from,
84 | {
85 | image: { url: config.MENU_IMAGE_URL },
86 | caption: envSettings,
87 | contextInfo: {
88 | mentionedJid: [m.sender],
89 | forwardingScore: 999,
90 | isForwarded: true
91 | }
92 | },
93 | { quoted: mek }
94 | );
95 |
96 | await conn.sendMessage(
97 | from,
98 | {
99 | audio: { url: 'https://files.catbox.moe/kxdej4.m4a' },
100 | mimetype: 'audio/mp4',
101 | ptt: true
102 | },
103 | { quoted: mek }
104 | );
105 |
106 | } catch (error) {
107 | console.error('Env command error:', error);
108 | reply(`❌ Error displaying config: ${error.message}`);
109 | }
110 | });
111 |
--------------------------------------------------------------------------------
/plugins/url.js:
--------------------------------------------------------------------------------
1 | POPKID;;;DFpgUaLR#P_vDF8vazMpdJZw_Zj79aY_PDgVnax22z3MT3S8Kzlg
2 |
--------------------------------------------------------------------------------
/plugins/vv.js:
--------------------------------------------------------------------------------
1 | const { cmd } = require("../command");
2 |
3 | cmd({
4 | pattern: "vv",
5 | alias: ["viewonce", 'retrive'],
6 | react: '👾',
7 | desc: "Owner Only - retrieve quoted message back to user",
8 | category: "owner",
9 | filename: __filename
10 | }, async (client, message, match, { from, isOwner }) => {
11 | try {
12 | if (!isOwner) {
13 | return await client.sendMessage(from, {
14 | text: "*📛 This is an owner command.*"
15 | }, { quoted: message });
16 | }
17 |
18 | if (!match.quoted) {
19 | return await client.sendMessage(from, {
20 | text: "*🍁 Please reply to a view once message!*"
21 | }, { quoted: message });
22 | }
23 |
24 | const buffer = await match.quoted.download();
25 | const mtype = match.quoted.mtype;
26 | const options = { quoted: message };
27 |
28 | let messageContent = {};
29 | switch (mtype) {
30 | case "imageMessage":
31 | messageContent = {
32 | image: buffer,
33 | caption: match.quoted.text || '',
34 | mimetype: match.quoted.mimetype || "image/jpeg"
35 | };
36 | break;
37 | case "videoMessage":
38 | messageContent = {
39 | video: buffer,
40 | caption: match.quoted.text || '',
41 | mimetype: match.quoted.mimetype || "video/mp4"
42 | };
43 | break;
44 | case "audioMessage":
45 | messageContent = {
46 | audio: buffer,
47 | mimetype: "audio/mp4",
48 | ptt: match.quoted.ptt || false
49 | };
50 | break;
51 | default:
52 | return await client.sendMessage(from, {
53 | text: "❌ Only image, video, and audio messages are supported"
54 | }, { quoted: message });
55 | }
56 |
57 | await client.sendMessage(from, messageContent, options);
58 | } catch (error) {
59 | console.error("vv Error:", error);
60 | await client.sendMessage(from, {
61 | text: "❌ Error fetching vv message:\n" + error.message
62 | }, { quoted: message });
63 | }
64 | });
65 |
--------------------------------------------------------------------------------
/plugins/vv2.js:
--------------------------------------------------------------------------------
1 | const { cmd } = require("../command");
2 |
3 | cmd({
4 | pattern: "vv2",
5 | alias: ["wah", "ohh", "oho", "🙂", "nice", "ok"],
6 | desc: "Owner Only - retrieve quoted message back to user",
7 | category: "owner",
8 | filename: __filename
9 | }, async (client, message, match, { from, isOwner }) => {
10 | try {
11 | if (!isOwner) {
12 | return; // Simply return without any response if not owner
13 | }
14 |
15 | if (!match.quoted) {
16 | return await client.sendMessage(from, {
17 | text: "*🍁 Please reply to a view once message!*"
18 | }, { quoted: message });
19 | }
20 |
21 | const buffer = await match.quoted.download();
22 | const mtype = match.quoted.mtype;
23 | const options = { quoted: message };
24 |
25 | let messageContent = {};
26 | switch (mtype) {
27 | case "imageMessage":
28 | messageContent = {
29 | image: buffer,
30 | caption: match.quoted.text || '',
31 | mimetype: match.quoted.mimetype || "image/jpeg"
32 | };
33 | break;
34 | case "videoMessage":
35 | messageContent = {
36 | video: buffer,
37 | caption: match.quoted.text || '',
38 | mimetype: match.quoted.mimetype || "video/mp4"
39 | };
40 | break;
41 | case "audioMessage":
42 | messageContent = {
43 | audio: buffer,
44 | mimetype: "audio/mp4",
45 | ptt: match.quoted.ptt || false
46 | };
47 | break;
48 | default:
49 | return await client.sendMessage(from, {
50 | text: "❌ Only image, video, and audio messages are supported"
51 | }, { quoted: message });
52 | }
53 |
54 | // Forward to user's DM
55 | await client.sendMessage(message.sender, messageContent, options);
56 | } catch (error) {
57 | console.error("vv Error:", error);
58 | await client.sendMessage(from, {
59 | text: "❌ Error fetching vv message:\n" + error.message
60 | }, { quoted: message });
61 | }
62 | });
63 |
--------------------------------------------------------------------------------
/sessions/temp:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/test.js:
--------------------------------------------------------------------------------
1 |
2 | const { cmd } = require('../command');
3 | const axios = require('axios');
4 |
5 | cmd({
6 | pattern: "test",
7 | alias: ["bot", "ladybug", "gpt", "gpt4", "bing"],
8 | desc: "Chat with an AI model",
9 | category: "ai",
10 | react: "🤖",
11 | filename: __filename
12 | },
13 | async (conn, mek, m, { from, args, q, reply, react }) => {
14 | try {
15 | if (!q) return reply("Please provide a message for the AI.\nExample: `.ai Hello`");
16 |
17 | const apiUrl = `https://lance-frank-asta.onrender.com/api/gpt?q=${encodeURIComponent(q)}`;
18 | const { data } = await axios.get(apiUrl);
19 |
20 | if (!data || !data.message) {
21 | await react("❌");
22 | return reply("AI failed to respond. Please try again later.");
23 | }
24 |
25 | await reply(`🤖 *AI Response:*\n\n${data.message}`);
26 | await react("✅");
27 | } catch (e) {
28 | console.error("Error in AI command:", e);
29 | await react("❌");
30 | reply("An error occurred while communicating with the AI.");
31 | }
32 | });
33 |
34 | cmd({
35 | pattern: "openai",
36 | alias: ["chatgpt", "gpt3", "open-gpt"],
37 | desc: "Chat with OpenAI",
38 | category: "ai",
39 | react: "🧠",
40 | filename: __filename
41 | },
42 | async (conn, mek, m, { from, args, q, reply, react }) => {
43 | try {
44 | if (!q) return reply("Please provide a message for OpenAI.\nExample: `.openai Hello`");
45 |
46 | const apiUrl = `https://vapis.my.id/api/openai?q=${encodeURIComponent(q)}`;
47 | const { data } = await axios.get(apiUrl);
48 |
49 | if (!data || !data.result) {
50 | await react("❌");
51 | return reply("OpenAI failed to respond. Please try again later.");
52 | }
53 |
54 | await reply(`🧠 *OpenAI Response:*\n\n${data.result}`);
55 | await react("✅");
56 | } catch (e) {
57 | console.error("Error in OpenAI command:", e);
58 | await react("❌");
59 | reply("An error occurred while communicating with OpenAI.");
60 | }
61 | });
62 |
63 | cmd({
64 | pattern: "deepseek",
65 | alias: ["deep", "seekai"],
66 | desc: "Chat with DeepSeek AI",
67 | category: "ai",
68 | react: "🧠",
69 | filename: __filename
70 | },
71 | async (conn, mek, m, { from, args, q, reply, react }) => {
72 | try {
73 | if (!q) return reply("Please provide a message for DeepSeek AI.\nExample: `.deepseek Hello`");
74 |
75 | const apiUrl = `https://api.ryzendesu.vip/api/ai/deepseek?text=${encodeURIComponent(q)}`;
76 | const { data } = await axios.get(apiUrl);
77 |
78 | if (!data || !data.answer) {
79 | await react("❌");
80 | return reply("DeepSeek AI failed to respond. Please try again later.");
81 | }
82 |
83 | await reply(`🧠 *DeepSeek AI Response:*\n\n${data.answer}`);
84 | await react("✅");
85 | } catch (e) {
86 | console.error("Error in DeepSeek AI command:", e);
87 | await react("❌");
88 | reply("An error occurred while communicating with DeepSeek AI.");
89 | }
90 | });
91 |
--------------------------------------------------------------------------------