├── .github └── FUNDING.yml ├── Dockerfile ├── LICENSE ├── README.md ├── app.json ├── command.js ├── config.js ├── data ├── autoreply.json ├── autosticker.json └── autovoice.json ├── index.js ├── lib ├── functions.js └── msg.js ├── package.json ├── plugins ├── ai.js ├── alive.js ├── animemd.js ├── antidelete.js ├── antilinks.js ├── antionce.js ├── antivv.js ├── block.js ├── couplespp.js ├── define.js ├── del.js ├── dltik.js ├── dog.js ├── download.js ├── endgc.js ├── env.js ├── gcsetting.js ├── getprofilestalk.js ├── gitclone.js ├── gitstalk.js ├── gitstalks.js ├── gpass.js ├── group.js ├── img.js ├── jid.js ├── linksdel.js ├── listcmd.js ├── logo.js ├── main.js ├── menu.js ├── movie.js ├── music.js ├── news.js ├── owner.js ├── ownermsg.js ├── ping.js ├── play.js ├── prank.js ├── presence.js ├── quote.js ├── repo.js ├── restart.js ├── rw.js ├── saver.js ├── setgc.js ├── silva-channelreact.js ├── silva-fb.js ├── srepo.js ├── sticker.js ├── store.js ├── system.js ├── tools.js ├── tts.js ├── unmute.js ├── updater.js ├── updaterold.js ├── url.js ├── weather.js ├── wikipediax.js ├── yta.js ├── ytdl.js └── yts.js ├── sessions └── temp └── sylivanus ├── SilvaSpark.png └── silva /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # GitHub Sponsors 2 | github: ["SilvaTechB"] 3 | thanks_dev: ["gh/silvatechb"] 4 | 5 | # Additional Sponsorship Platforms (if any, e.g., Open Collective or Patreon) 6 | # Uncomment and replace URLs as needed 7 | # patreon: [your-patreon-username] 8 | # open_collective: [your-collective-name] 9 | # ko_fi: [your-ko-fi-username] 10 | # tidelift: [your-tidelift-project-url] 11 | # custom: ["https://example.com/sponsor"] 12 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:lts-buster 2 | 3 | RUN apt-get update && \ 4 | apt-get install -y \ 5 | ffmpeg \ 6 | imagemagick \ 7 | webp && \ 8 | apt-get upgrade -y && \ 9 | rm -rf /var/lib/apt/lists/* 10 | 11 | COPY package.json . 12 | 13 | RUN npm install && npm install -g qrcode-terminal pm2 14 | 15 | COPY . . 16 | 17 | EXPOSE 3000 18 | 19 | 20 | CMD ["pm2-runtime", "start", "index.js"] 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | silva spark md with silva tech inc 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # 🌟 Silva Spark MD 🌟 3 | 4 |

5 | Silva Spark MD Logo 6 |

7 | 8 |

9 | 10 | Header Typing SVG 11 | 12 |

13 | 14 | > **🚀 Updated with Latest Features | 🔥 Most Advanced WhatsApp Bot | 💜 Open Source** 15 | 16 | --- 17 | 18 | ## 📌 Table of Contents 19 | - [📱 Connect With Me](#-connect-with-me) 20 | - [💖 Support](#-support-silva-tech-inc) 21 | - [📊 Project Stats](#-project-stats) 22 | - [🚀 Getting Started](#-getting-started) 23 | - [☁️ Deployment Options](#️-deployment-options)b 24 | - [⚠️ Important Notices](#️-important-notices) 25 | - [👥 Team](#-team) 26 | 27 | --- 28 | 29 | ## 📱 Connect With Me 30 | 31 |

32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 |
40 | 41 | 42 | 43 |
44 | 45 | 46 | 47 |

48 | 49 | --- 50 | 51 | ## 💖 Support Silva Tech Inc 52 | 53 |

54 | 55 | Sponsor Badge 56 | 57 |

58 | 59 | --- 60 | 61 | ## 📊 Project Stats 62 | 63 |
64 | 65 | | Statistic | Badge | 66 | |-----------|-------| 67 | | **Profile Views** | | 68 | | **Last Update** | | 69 | | **Repo Size** | | 70 | | **Stars** | | 71 | | **Forks** | | 72 | 73 |
74 | 75 | --- 76 | 77 | ## 🚀 Getting Started 78 | 79 | ### 1️⃣ Fork This Repository 80 | ```bash 81 | # Click the button below to fork the project 82 | ``` 83 |

84 | 85 | Fork Button 86 | 87 |

88 | 89 | ### 2️⃣ Get Session ID 90 | ```bash 91 | # You'll need a WhatsApp session to proceed 92 | ``` 93 |

94 | 95 | Session Button 96 | 97 |

98 | 99 | --- 100 | 101 | ## ☁️ Deployment Options 102 | 103 |

104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 |
PlatformDeploy Button
Heroku
Koyeb
Railway
Render
126 |

127 | 128 | --- 129 | 130 | ## ⚠️ Important Notices 131 | 132 | ### 🛑 Disclaimer 133 | ```diff 134 | - This is an independent project not affiliated with WhatsApp Inc. 135 | - Account bans may occur with misuse (only 1 unban allowed) 136 | - Use at your own risk - no liability for bans/misuse 137 | ``` 138 | 139 | ### 📜 Terms of Use 140 | ```diff 141 | + Strictly NOT FOR SALE 142 | + No unauthorized copying/distribution 143 | + Credit must be given when using/modifying 144 | ``` 145 | 146 | --- 147 | 148 | ## 👥 Team 149 | 150 |
151 | 152 | | Role | Badge | 153 | |------|-------| 154 | | **Project Owner** | | 155 | | **Main Developer** | | 156 | 157 |
158 | 159 | --- 160 | 161 |

162 | Footer Animation 163 |

164 | 165 |

166 | Visitor Counter 167 |
168 | ✨ Thank you for visiting! ✨ 169 |

170 | 171 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "silva-spark-md", 3 | "description": "Javascript WhatsApp bot made by Silva.", 4 | "keywords": ["silva-spark-md"], 5 | "success_url": "/", 6 | 7 | "stack": "container", 8 | "env": { 9 | "SESSION_ID": { 10 | "description": "Put the session-id here.", 11 | "required": true, 12 | "value": "" 13 | }, 14 | 15 | "ALIVE_IMG": { 16 | "description": "paste your image url if you don't have you can use this public url.", 17 | "required": false, 18 | "value": "https://i.imgur.com/PEZ5QL2.jpeg" 19 | }, 20 | 21 | "LIVE_MSG": { 22 | "description": "paste your alive message hear.", 23 | "required": false, 24 | "value": "> SILVA SPARK IS SPARKING ACTIVE AND ALIVE⚡" 25 | }, 26 | "ANTIDELETE_PRIVATE": { 27 | "description": "when someone deletes a message on dm the bot restores it.", 28 | "required": true, 29 | "value": "true" 30 | }, 31 | "ANTIDELETE_GROUP": { 32 | "description": "when someone deletes a message in group the bot restores it.", 33 | "required": true, 34 | "value": "true" 35 | }, 36 | 37 | "PREFIX": { 38 | "description": "paste your bot prefix note! Don't apply null prefix.", 39 | "required": false, 40 | "value": "." 41 | }, 42 | 43 | "MODE": { 44 | "description": "select your bot work type public-private-inbox-group.", 45 | "required": false, 46 | "value": "public" 47 | 48 | }, 49 | 50 | "AUTO_STATUS_REACT": { 51 | "description": "Make it true if want auto status react.", 52 | "required": false, 53 | "value": "true" 54 | }, 55 | 56 | 57 | "ALWAYS_ONLINE": { 58 | "description": "Make it true if want always online.", 59 | "required": false, 60 | "value": "false" 61 | }, 62 | 63 | "AUTO_VOICE": { 64 | "description": "Make it true if want automatic voice reply .", 65 | "required": false, 66 | "value": "false" 67 | }, 68 | 69 | "AUTO_REPLY": { 70 | "description": "Make it true if you want automatic reply.", 71 | "required": false, 72 | "value": "false" 73 | }, 74 | 75 | "AUTO_STICKER": { 76 | "description": "Make it true if you want automatic sticker.", 77 | "required": false, 78 | "value": "false" 79 | }, 80 | 81 | 82 | "AUTO_STATUS_SEEN": { 83 | "description": "Make it true for automatic status seen.", 84 | "required": true, 85 | "value": "true" 86 | }, 87 | 88 | "AUTO_STATUS_REPLY": { 89 | "description": "Make it true for auto reply msg on status seen.", 90 | "required": true, 91 | "value": "false" 92 | }, 93 | 94 | "AUTO_STATUS__MSG": { 95 | "description": "Type custom message on status reply", 96 | "required": true, 97 | "value": "*🎉👀 Seen by Silva Spark MD 🚀🔥*" 98 | }, 99 | 100 | "OWNER_NAME": { 101 | "description": "Type Bot Owner Name.", 102 | "required": false, 103 | "value": "Silva Spark" 104 | }, 105 | 106 | "OWNER_NUMBER": { 107 | "description": "put the owner number for bot.", 108 | "required": false, 109 | "value": "254700143167" 110 | 111 | }, 112 | 113 | "BOT_NAME": { 114 | "description": "Type here the bot name.", 115 | "required": false, 116 | "value": "✦ Silva ✦ Spark ✦ MD ✦" 117 | 118 | }, 119 | 120 | "ANTI_LINK": { 121 | "description": "Make it true if you want bot auto remove group link.", 122 | "required": true, 123 | "value": "true" 124 | 125 | }, 126 | 127 | "ANTI_BAD": { 128 | "description": "Make it true if you want bot auto delete bad words.", 129 | "required": false, 130 | "value": "false" 131 | }, 132 | 133 | "DESCRIPTION": { 134 | "description": "add caption for menu and other", 135 | "required": false, 136 | "value": "*© ✦ Silva ✦ Spark ✦ MD ✦*" 137 | }, 138 | 139 | "DELETE_LINKS": { 140 | "description": "remove links from group automatically without removing member", 141 | "required": false, 142 | "value": "true" 143 | }, 144 | 145 | "AUTO_RECORDING": { 146 | "description": "Make it true if you want auto recoding.", 147 | "required": false, 148 | "value": "false" 149 | }, 150 | 151 | "AUTO_TYPING": { 152 | "description": "Make it true if you want auto typing.", 153 | "required": false, 154 | "value": "false" 155 | }, 156 | 157 | "AUTO_REACT": { 158 | "description": "Make it true if you want react on every message.", 159 | "required": false, 160 | "value": "false" 161 | }, 162 | 163 | "OWNER_REACT": { 164 | "description": "Make it true if you only want react on Owner Massages.", 165 | "required": false, 166 | "value": "true" 167 | 168 | }, 169 | 170 | "CUSTOM_REACT": { 171 | "description": "Make it true if you want custom reactions.", 172 | "required": false, 173 | "value": "true" 174 | 175 | }, 176 | 177 | "CUSTOM_REACT_EMOJIS": { 178 | "description": "put here custom react react emojis.", 179 | "required": false, 180 | "value": "💝,💖,💗,❤️‍🔥,❤️‍🩹,❤️,🩷,🧡,💛,💚,💙,🩵,💜,🤎,🖤,🩶,🤍" 181 | }, 182 | 183 | 184 | "READ_MESSAGE": { 185 | "description": "Make it true if you want bot read your all sms just now.", 186 | "required": false, 187 | "value": "false" 188 | } 189 | 190 | }, 191 | 192 | "buildpacks": [ 193 | { 194 | "url": "https://github.com/heroku/heroku-buildpack-nodejs.git" 195 | } 196 | ], 197 | "stack": "heroku-24" 198 | } 199 | 200 | -------------------------------------------------------------------------------- /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 | 22 | -------------------------------------------------------------------------------- /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 || "", 9 | // add your Session Id 10 | PREFIX: process.env.PREFIX || ".", 11 | // add your prifix for bot 12 | BOT_NAME: process.env.BOT_NAME || "✦ Silva ✦ Spark ✦ MD ✦", 13 | // add bot namw here for menu 14 | AUTO_STATUS_REACT: process.env.AUTO_STATUS_REACT || "true", 15 | // true to get auto status react 16 | CUSTOM_REACT: process.env.CUSTOM_REACT || "false", 17 | // make this true for custum emoji react 18 | CUSTOM_REACT_EMOJIS: process.env.CUSTOM_REACT_EMOJIS || "💝,💖,💗,❤️‍🔥,❤️‍🩹,❤️,🩷,🧡,💛,💚,💙,🩵,💜,🤎,🖤,🤍", 19 | // chose custom react emojis by yourself 20 | DELETE_LINKS: process.env.DELETE_LINKS || "false", 21 | // automatic delete links witho remove member 22 | OWNER_NUMBER: process.env.OWNER_NUMBER || "254700143167", 23 | // add your bot owner number 24 | OWNER_NAME: process.env.OWNER_NAME || "✦ Silva ✦ Spark ✦ MD ✦", 25 | // add bot owner name 26 | DESCRIPTION: process.env.DESCRIPTION || "*© ✦ Silva ✦ Spark ✦ MD ✦*", 27 | // add bot owner name 28 | ALIVE_IMG: process.env.ALIVE_IMG || "https://i.imgur.com/PEZ5QL2.jpeg", 29 | // add img for alive msg 30 | LIVE_MSG: process.env.LIVE_MSG || "> SILVA SPARK IS SPARKING ACTIVE AND ALIVE\n\n\nKEEP USING SILVA SPARK FROM SILVA TECH INC⚡", 31 | // add alive msg here 32 | READ_MESSAGE: process.env.READ_MESSAGE || "false", 33 | // Turn true or false for automatic read msgs 34 | AUTO_REACT: process.env.AUTO_REACT || "false", 35 | // make this true or false for auto react on all msgs 36 | ANTI_BAD: process.env.ANTI_BAD || "false", 37 | // false or true for anti bad words 38 | AUTO_STATUS_SEEN: process.env.AUTO_STATUS_SEEN || "true", 39 | // make true or false status auto seen 40 | AUTO_STATUS_REPLY: process.env.AUTO_STATUS_REPLY || "true", 41 | // make true if you want auto reply on status 42 | AUTO_STATUS__MSG: process.env.AUTO_STATUS__MSG || "*🎉👀 Seen by Silva Spark MD 🚀🔥*", 43 | // set the auto reply massage on status reply 44 | MODE: process.env.MODE || "public", 45 | // make bot public-private-inbox-group 46 | ANTI_LINK: process.env.ANTI_LINK || "true", 47 | // make anti link true,false for groups 48 | AUTO_VOICE: process.env.AUTO_VOICE || "false", 49 | // make true for send automatic voices 50 | AUTO_STICKER: process.env.AUTO_STICKER || "false", 51 | // make true for automatic stickers 52 | AUTO_REPLY: process.env.AUTO_REPLY || "false", 53 | // make true or false automatic text reply 54 | HEART_REACT: process.env.HEART_REACT || "false", 55 | // make this true or false for heart reactions only 56 | OWNER_REACT: process.env.OWNER_REACT || "true", 57 | // make it true or fasle for only react on owner msg only 58 | ALWAYS_ONLINE: process.env.ALWAYS_ONLINE || "true", 59 | // maks true for always online 60 | PUBLIC_MODE: process.env.PUBLIC_MODE || "true", 61 | // make false if want private mod 62 | AUTO_TYPING: process.env.AUTO_TYPING || "true", 63 | // true for automatic show typing 64 | AUTO_RECORDING: process.env.AUTO_RECORDING || "false" 65 | // make it true for auto recoding 66 | }; 67 | -------------------------------------------------------------------------------- /data/autoreply.json: -------------------------------------------------------------------------------- 1 | { 2 | "Hi":"*💖HI*... *How are You..!*", 3 | "Good Morning":"*Good Morning 🌅*", 4 | "Good Night":"*Good Night..🌉*", 5 | "Goodnight":"*Good Night..🌉*", 6 | "Bye":"*Bye bye....*", 7 | "Yoow":"> *Silva will respond soon ❤‍🔥🤌🏻*", 8 | "Yoh":"> *Silva will respond soon ❤‍🔥🤌🏻*", 9 | "Payment":"> *our payment is through safaricom m-pesa 0700143167 ❤‍🔥🤌🏻*", 10 | "owner":"*Silva* 🫀", 11 | "Hello":"Hello... How are you?..🐵", 12 | "link":"*https://silvatechinc.my.id/ 🌚🙌😂*", 13 | "Session":"*https://power-session.silvatechinc.my.id/ 🙈🤣*", 14 | "Bro":"*Yes, silva tech here*", 15 | "Mmmh":"*Are you praying.🔪*", 16 | "hmm":"> *Hamm.🌚*", 17 | "Yoo":"*wassup 🙌😂*", 18 | "uff":"*💋 Hyee*", 19 | "love":"*Lub you two 💗😁*" 20 | } 21 | -------------------------------------------------------------------------------- /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 | "good morning":"https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autosticker/STK-20241110-WA0008.webp", 5 | "Silva":"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/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/menu.m4a", 3 | "Imran":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/sigma.m4a", 4 | "zinda":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/alive.m4a", 5 | "hi":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/hi.m4a", 6 | "helo":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/hello.m4a", 7 | "good morning":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/gm.m4a", 8 | "haha":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/haha.m4a", 9 | "bye":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/bye.m4a", 10 | "i love you":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/love.m4a", 11 | "don":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/repo.m4a", 12 | "oya":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/repo.m4a", 13 | "thanku":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/thanks.m4a", 14 | "sigma":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/sigma.m4a", 15 | "jan":"https://github.com/Silva-World/SPARK-DATA/raw/refs/heads/main/autovoice/sigma.m4a", 16 | ".ping2":"https://github.com/Silva-World/SPARK-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 | "hmmmm":"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 | "0yah":"https://github.com/tharumin/Alexa_Voice/raw/refs/heads/main/oya_kawada.m4a", 33 | "Over":"https://github.com/Silva-World/SPARK-DATA/blob/main/logo/Lauren%20Spencer-Smith%20-%20Flower.mp3", 34 | "Morning":"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 | -------------------------------------------------------------------------------- /lib/functions.js: -------------------------------------------------------------------------------- 1 | var _0x326e26=_0x52c0;function _0x52c0(_0x7d24a1,_0x8be195){var _0x217244=_0x2172();return _0x52c0=function(_0x52c08d,_0x2814d0){_0x52c08d=_0x52c08d-0x179;var _0x459f1a=_0x217244[_0x52c08d];return _0x459f1a;},_0x52c0(_0x7d24a1,_0x8be195);}(function(_0x1d024a,_0x5c615c){var _0x285383=_0x52c0,_0x50c581=_0x1d024a();while(!![]){try{var _0x51c672=-parseInt(_0x285383(0x17c))/0x1+-parseInt(_0x285383(0x182))/0x2*(parseInt(_0x285383(0x193))/0x3)+-parseInt(_0x285383(0x189))/0x4*(-parseInt(_0x285383(0x196))/0x5)+parseInt(_0x285383(0x191))/0x6*(-parseInt(_0x285383(0x17d))/0x7)+-parseInt(_0x285383(0x195))/0x8+-parseInt(_0x285383(0x181))/0x9+parseInt(_0x285383(0x190))/0xa;if(_0x51c672===_0x5c615c)break;else _0x50c581['push'](_0x50c581['shift']());}catch(_0x40292b){_0x50c581['push'](_0x50c581['shift']());}}}(_0x2172,0x35f13));const axios=require('axios'),getBuffer=async(_0x33e6d2,_0x46fe71)=>{var _0xc08f13=_0x52c0;try{_0x46fe71?_0x46fe71:{};var _0x300c74=await axios({'method':_0xc08f13(0x18c),'url':_0x33e6d2,'headers':{'DNT':0x1,'Upgrade-Insecure-Request':0x1},..._0x46fe71,'responseType':_0xc08f13(0x17f)});return _0x300c74[_0xc08f13(0x188)];}catch(_0x17a528){console['log'](_0x17a528);}},getGroupAdmins=_0x20060a=>{var _0x3df1c4=_0x52c0,_0x51cbf8=[];for(let _0x5a5309 of _0x20060a){_0x5a5309['admin']!==null?_0x51cbf8[_0x3df1c4(0x194)](_0x5a5309['id']):'';}return _0x51cbf8;},getRandom=_0x37cd2c=>{var _0x37fc75=_0x52c0;return''+Math[_0x37fc75(0x179)](Math[_0x37fc75(0x186)]()*0x2710)+_0x37cd2c;},h2k=_0x539fb5=>{var _0x18ff78=_0x52c0,_0x31647b=['','K','M','B','T','P','E'],_0x15c6a0=Math['log10'](Math[_0x18ff78(0x18a)](_0x539fb5))/0x3|0x0;if(_0x15c6a0==0x0)return _0x539fb5;var _0x68c738=_0x31647b[_0x15c6a0],_0xaeb9b8=Math[_0x18ff78(0x18e)](0xa,_0x15c6a0*0x3),_0x442cc1=_0x539fb5/_0xaeb9b8,_0x1d4649=_0x442cc1['toFixed'](0x1);if(/\.0$/[_0x18ff78(0x17e)](_0x1d4649))_0x1d4649=_0x1d4649[_0x18ff78(0x187)](0x0,_0x1d4649[_0x18ff78(0x18d)]-0x2);return _0x1d4649+_0x68c738;},isUrl=_0x3bdebf=>{var _0x15ec73=_0x52c0;return _0x3bdebf[_0x15ec73(0x18f)](new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%.+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%+.~#?&/=]*)/,'gi'));},Json=_0x42b5a6=>{var _0x40ec44=_0x52c0;return JSON[_0x40ec44(0x197)](_0x42b5a6,null,0x2);},runtime=_0x226b46=>{var _0x5e623c=_0x52c0;_0x226b46=Number(_0x226b46);var _0x3acd58=Math[_0x5e623c(0x179)](_0x226b46/(0xe10*0x18)),_0x11147a=Math[_0x5e623c(0x179)](_0x226b46%(0xe10*0x18)/0xe10),_0x37267d=Math[_0x5e623c(0x179)](_0x226b46%0xe10/0x3c),_0x184eb1=Math[_0x5e623c(0x179)](_0x226b46%0x3c),_0x19babd=_0x3acd58>0x0?_0x3acd58+(_0x3acd58==0x1?'\x20day,\x20':_0x5e623c(0x17a)):'',_0x46d4b5=_0x11147a>0x0?_0x11147a+(_0x11147a==0x1?_0x5e623c(0x18b):'\x20hours,\x20'):'',_0x588563=_0x37267d>0x0?_0x37267d+(_0x37267d==0x1?_0x5e623c(0x183):'\x20minutes,\x20'):'',_0x15c885=_0x184eb1>0x0?_0x184eb1+(_0x184eb1==0x1?_0x5e623c(0x192):_0x5e623c(0x17b)):'';return _0x19babd+_0x46d4b5+_0x588563+_0x15c885;},sleep=async _0x5c6709=>{return new Promise(_0x27c9ea=>setTimeout(_0x27c9ea,_0x5c6709));},fetchJson=async(_0xa926b,_0x320719)=>{var _0x5beedb=_0x52c0;try{_0x320719?_0x320719:{};const _0x3596c3=await axios({'method':_0x5beedb(0x184),'url':_0xa926b,'headers':{'User-Agent':_0x5beedb(0x185)},..._0x320719});return _0x3596c3[_0x5beedb(0x188)];}catch(_0x206360){return _0x206360;}};function _0x2172(){var _0x331799=['exports','66717jDinWp','350hhJjgh','\x20minute,\x20','GET','Mozilla/5.0\x20(Windows\x20NT\x2010.0;\x20Win64;\x20x64)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/95.0.4638.69\x20Safari/537.36','random','substr','data','12ArkHUr','abs','\x20hour,\x20','get','length','pow','match','11344510FrhLNy','1680276xObYRC','\x20second','1275UxKEGT','push','2242712JEsNpa','165565XuYETB','stringify','floor','\x20days,\x20','\x20seconds','370670ywBaWi','7Rcfcjr','test','arraybuffer'];_0x2172=function(){return _0x331799;};return _0x2172();}module[_0x326e26(0x180)]={'getBuffer':getBuffer,'getGroupAdmins':getGroupAdmins,'getRandom':getRandom,'h2k':h2k,'isUrl':isUrl,'Json':Json,'runtime':runtime,'sleep':sleep,'fetchJson':fetchJson}; 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "silva-spark-md", 3 | "version": "1.0.0", 4 | "description": "A WhatsApp Bot Created By silva tech inc", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "pm2 start index.js --deep-monitoring --attach --name silva-spark-md", 8 | "stop": "pm2 stop silva-spark-md", 9 | "restart": "pm2 restart silva-spark-md" 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 | "pino": "^7.0.5", 17 | "pm2": "^5.2.0", 18 | "util": "^0.12.4", 19 | "express": "latest", 20 | "axios": "^1.2.5", 21 | "crypto-digest-sync": "^1.0.0", 22 | "crypto-js": "latest", 23 | "file_size_url": "1.0.4", 24 | "fs-extra": "^11.1.0", 25 | "fs": "^0.0.1-security", 26 | "ffmpeg": "^0.0.4", 27 | "file-type": "^16.5.3", 28 | "fluent-ffmpeg": "^2.1.2", 29 | "form-data": "^4.0.0", 30 | "google-tts-api": "^2.0.2", 31 | "path": "^0.12.7", 32 | "node-fetch": "^2.6.1", 33 | "btch-downloader": "^2.2.9", 34 | "megajs": "^1.1.0", 35 | "wa_set_pkg": "1.0.5", 36 | "wa-sticker-formatter": "^4.4.4", 37 | "path": "^0.12.7", 38 | "vm": "^0.1.0", 39 | "cheerio": "^1.0.0-rc.12", 40 | "ruhend-scraper" : "8.0.3", 41 | "qrcode-terminal": "^0.12.0", 42 | "wikipedia":"2.1.2", 43 | "yt-search":"2.11.1", 44 | "api-dylux":"1.8.5", 45 | "@mrnima/tiktok-downloader":"1.0.0", 46 | "@mrnima/facebook-downloader":"1.0.0", 47 | "mrnima-moviedl":"1.0.0" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /plugins/ai.js: -------------------------------------------------------------------------------- 1 | const { cmd } = require('../command'); 2 | const axios = require('axios'); 3 | 4 | cmd({ 5 | pattern: "ai", 6 | alias: ["bot", "dj", "gpt", "gpt4", "bing"], 7 | desc: "Chat with an AI model", 8 | category: "ai", 9 | react: "🤖", 10 | filename: __filename 11 | }, 12 | async (conn, mek, m, { from, args, q, reply, react }) => { 13 | try { 14 | if (!q) return reply("Please provide a message for the AI.\nExample: `.ai Hello`"); 15 | 16 | const apiUrl = `https://lance-frank-asta.onrender.com/api/gpt?q=${encodeURIComponent(q)}`; 17 | const { data } = await axios.get(apiUrl); 18 | 19 | if (!data || !data.message) { 20 | await react("❌"); 21 | return reply("AI failed to respond. Please try again later."); 22 | } 23 | 24 | await reply(`🤖 *AI Response:*\n\n${data.message}`); 25 | await react("✅"); 26 | } catch (e) { 27 | console.error("Error in AI command:", e); 28 | await react("❌"); 29 | reply("An error occurred while communicating with the AI."); 30 | } 31 | }); 32 | 33 | cmd({ 34 | pattern: "openai", 35 | alias: ["chatgpt", "gpt3", "open-gpt"], 36 | desc: "Chat with OpenAI", 37 | category: "ai", 38 | react: "🧠", 39 | filename: __filename 40 | }, 41 | async (conn, mek, m, { from, args, q, reply, react }) => { 42 | try { 43 | if (!q) return reply("Please provide a message for OpenAI.\nExample: `.openai Hello`"); 44 | 45 | const apiUrl = `https://vapis.my.id/api/openai?q=${encodeURIComponent(q)}`; 46 | const { data } = await axios.get(apiUrl); 47 | 48 | if (!data || !data.result) { 49 | await react("❌"); 50 | return reply("OpenAI failed to respond. Please try again later."); 51 | } 52 | 53 | await reply(`🧠 *OpenAI Response:*\n\n${data.result}`); 54 | await react("✅"); 55 | } catch (e) { 56 | console.error("Error in OpenAI command:", e); 57 | await react("❌"); 58 | reply("An error occurred while communicating with OpenAI."); 59 | } 60 | }); 61 | 62 | cmd({ 63 | pattern: "deepseek", 64 | alias: ["deep", "seekai"], 65 | desc: "Chat with DeepSeek AI", 66 | category: "ai", 67 | react: "🧠", 68 | filename: __filename 69 | }, 70 | async (conn, mek, m, { from, args, q, reply, react }) => { 71 | try { 72 | if (!q) return reply("Please provide a message for DeepSeek AI.\nExample: `.deepseek Hello`"); 73 | 74 | const apiUrl = `https://api.ryzendesu.vip/api/ai/deepseek?text=${encodeURIComponent(q)}`; 75 | const { data } = await axios.get(apiUrl); 76 | 77 | if (!data || !data.answer) { 78 | await react("❌"); 79 | return reply("DeepSeek AI failed to respond. Please try again later."); 80 | } 81 | 82 | await reply(`🧠 *DeepSeek AI Response:*\n\n${data.answer}`); 83 | await react("✅"); 84 | } catch (e) { 85 | console.error("Error in DeepSeek AI command:", e); 86 | await react("❌"); 87 | reply("An error occurred while communicating with DeepSeek AI."); 88 | } 89 | }); 90 | -------------------------------------------------------------------------------- /plugins/alive.js: -------------------------------------------------------------------------------- 1 | const { cmd, commands } = require('../command'); 2 | const os = require("os"); 3 | const { runtime } = require('../lib/functions'); 4 | 5 | cmd({ 6 | pattern: "alive", 7 | alias: ["status", "runtime", "uptime"], 8 | desc: "Check uptime and system status", 9 | category: "main", 10 | react: "⌚", 11 | filename: __filename 12 | }, 13 | 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 }) => { 14 | try { 15 | // Generate system status message 16 | const status = `╭━━〔 *✦ Silva ✦ Spark ✦ MD ✦* 〕━━┈⊷ 17 | ┃🦄╭─────────────·๏ 18 | ┃🦄┃• *⏳Uptime*: ${runtime(process.uptime())} 19 | ┃🦄┃• *📟 Ram usage*: ${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}GB / ${(os.totalmem() / 1024 / 1024).toFixed(2)}TB 20 | ┃🦄┃• *⚙️ HostName*: ${os.hostname()} 21 | ┃🦄┃• *👨‍💻 Owner*: SPARK 22 | ┃🦄┃• *🧬 Version*: 1.0.0 23 | ✦ Silva ✦ Spark ✦ MD ✦ 24 | ╰──────────────┈⊷ 25 | > © ✦ Silva ✦ Spark ✦ MD ✦`; 26 | 27 | // Send the status message with an image 28 | await conn.sendMessage(from, { 29 | image: { url: `https://files.catbox.moe/0vldgh.jpeg` }, 30 | caption: status, 31 | contextInfo: { 32 | mentionedJid: [m.sender], 33 | forwardingScore: 999, 34 | isForwarded: true, 35 | forwardedNewsletterMessageInfo: { 36 | newsletterJid: '120363200367779016@newsletter', 37 | newsletterName: 'SILVA SPARK 💖', 38 | serverMessageId: 143 39 | } 40 | } 41 | }, { quoted: mek }); 42 | 43 | } catch (e) { 44 | console.error("Error in alive command:", e); 45 | reply(`An error occurred: ${e.message}`); 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /plugins/antidelete.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | let deletedMessages = {}; 4 | 5 | module.exports = { 6 | name: 'antidelete', 7 | disabled: false, // set to true to turn off 8 | type: 'system', 9 | async before(m, { conn }) { 10 | const jid = m.key.remoteJid; 11 | const id = m.key.id; 12 | 13 | if (!m.message || m.key.fromMe) return; 14 | 15 | if (!deletedMessages[jid]) deletedMessages[jid] = {}; 16 | deletedMessages[jid][id] = m; 17 | 18 | // Optional: cleanup 19 | if (Object.keys(deletedMessages[jid]).length > 50) { 20 | const firstKey = Object.keys(deletedMessages[jid])[0]; 21 | delete deletedMessages[jid][firstKey]; 22 | } 23 | }, 24 | async afterDeleted(messageUpdate, conn) { 25 | for (const update of messageUpdate) { 26 | if (update.update && update.update.status === 'revoked') { 27 | const key = update.key; 28 | const jid = key.remoteJid; 29 | const id = key.id; 30 | const participant = key.participant || jid; 31 | 32 | if ( 33 | deletedMessages[jid] && 34 | deletedMessages[jid][id] && 35 | deletedMessages[jid][id].message 36 | ) { 37 | const msgData = deletedMessages[jid][id]; 38 | const type = Object.keys(msgData.message)[0]; 39 | 40 | let caption = `🚫 *Anti-Delete Alert!*\n👤 *Sender:* ${msgData.pushName || 'Unknown'}\n💬 *Type:* ${type}\n🕒 *Time:* ${new Date().toLocaleString()}`; 41 | 42 | // Send notice and restored message 43 | await conn.sendMessage(jid, { text: caption }); 44 | await conn.sendMessage(jid, msgData.message, { 45 | quoted: msgData, 46 | }); 47 | 48 | delete deletedMessages[jid][id]; 49 | } 50 | } 51 | } 52 | }, 53 | }; -------------------------------------------------------------------------------- /plugins/antilinks.js: -------------------------------------------------------------------------------- 1 | const { 2 | cmd 3 | } = require('../command'); 4 | const config = require("../config"); 5 | cmd({ 6 | 'on': "body" 7 | }, async (_0x4be391, _0x2bbd0c, _0x558f90, { 8 | from: _0x529db2, 9 | body: _0x572277, 10 | isGroup: _0xffba41, 11 | isAdmins: _0x5e74ad, 12 | isBotAdmins: _0x26676b, 13 | reply: _0x53a5ce, 14 | sender: _0x3dfc05 15 | }) => { 16 | try { 17 | const _0x3b3c8f = ["wtf", "mia", "xxx", "fuck", 'sex', "huththa", "pakaya", 'ponnaya', "hutto"]; 18 | if (!_0xffba41 || _0x5e74ad || !_0x26676b) { 19 | return; 20 | } 21 | const _0x157c8a = _0x572277.toLowerCase(); 22 | const _0x371867 = _0x3b3c8f.some(_0x2e3bd4 => _0x157c8a.includes(_0x2e3bd4)); 23 | if (_0x371867 & config.ANTI_BAD_WORD === "true") { 24 | await _0x4be391.sendMessage(_0x529db2, { 25 | 'delete': _0x2bbd0c.key 26 | }, { 27 | 'quoted': _0x2bbd0c 28 | }); 29 | await _0x4be391.sendMessage(_0x529db2, { 30 | 'text': "🚫 ⚠️💎 Sɪʟᴠᴀ Sᴘᴀʀᴋ MD 💎 BAD WORDS NOT ALLOWED⚠️ 🚫" 31 | }, { 32 | 'quoted': _0x2bbd0c 33 | }); 34 | } 35 | } catch (_0x47eee8) { 36 | console.error(_0x47eee8); 37 | _0x53a5ce("An error occurred while processing the message."); 38 | } 39 | }); 40 | const linkPatterns = [/https?:\/\/(?:chat\.whatsapp\.com|wa\.me)\/\S+/gi, /^https?:\/\/(www\.)?whatsapp\.com\/channel\/([a-zA-Z0-9_-]+)$/, /wa\.me\/\S+/gi, /https?:\/\/(?:t\.me|telegram\.me)\/\S+/gi, /https?:\/\/(?:www\.)?youtube\.com\/\S+/gi, /https?:\/\/youtu\.be\/\S+/gi, /https?:\/\/(?:www\.)?facebook\.com\/\S+/gi, /https?:\/\/fb\.me\/\S+/gi, /https?:\/\/(?:www\.)?instagram\.com\/\S+/gi, /https?:\/\/(?:www\.)?twitter\.com\/\S+/gi, /https?:\/\/(?:www\.)?tiktok\.com\/\S+/gi, /https?:\/\/(?:www\.)?linkedin\.com\/\S+/gi, /https?:\/\/(?:www\.)?snapchat\.com\/\S+/gi, /https?:\/\/(?:www\.)?pinterest\.com\/\S+/gi, /https?:\/\/(?:www\.)?reddit\.com\/\S+/gi, /https?:\/\/ngl\/\S+/gi, /https?:\/\/(?:www\.)?discord\.com\/\S+/gi, /https?:\/\/(?:www\.)?twitch\.tv\/\S+/gi, /https?:\/\/(?:www\.)?vimeo\.com\/\S+/gi, /https?:\/\/(?:www\.)?dailymotion\.com\/\S+/gi, /https?:\/\/(?:www\.)?medium\.com\/\S+/gi]; 41 | cmd({ 42 | 'on': "body" 43 | }, async (_0x488fe3, _0x4807fa, _0x524921, { 44 | from: _0x49635a, 45 | body: _0x3c0765, 46 | sender: _0x36e9e2, 47 | isGroup: _0x5cc616, 48 | isAdmins: _0x4f15b6, 49 | isBotAdmins: _0x148963, 50 | reply: _0x3855a2 51 | }) => { 52 | try { 53 | if (!_0x5cc616 || _0x4f15b6 || !_0x148963) { 54 | return; 55 | } 56 | const _0x58c73c = linkPatterns.some(_0x332817 => _0x332817.test(_0x3c0765)); 57 | if (_0x58c73c && config.ANTI_LINK === 'true') { 58 | await _0x488fe3.sendMessage(_0x49635a, { 59 | 'delete': _0x4807fa.key 60 | }, { 61 | 'quoted': _0x4807fa 62 | }); 63 | await _0x488fe3.sendMessage(_0x49635a, { 64 | 'text': "⚠️💎 Sɪʟᴠᴀ Sᴘᴀʀᴋ MD 💎 Links are not allowed in this group.\n@" + _0x36e9e2.split('@')[0x0] + " has been removed. 🚫", 65 | 'mentions': [_0x36e9e2] 66 | }, { 67 | 'quoted': _0x4807fa 68 | }); 69 | await _0x488fe3.groupParticipantsUpdate(_0x49635a, [_0x36e9e2], "remove"); 70 | } 71 | } catch (_0x2e5577) { 72 | console.error(_0x2e5577); 73 | _0x3855a2("An error occurred while processing the message."); 74 | } 75 | }); 76 | -------------------------------------------------------------------------------- /plugins/antionce.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, isCreator }) => { 10 | try { 11 | if (!isCreator) { 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 | }); -------------------------------------------------------------------------------- /plugins/antivv.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, isCreator }) => { 11 | try { 12 | if (!isCreator) { 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 | }); -------------------------------------------------------------------------------- /plugins/block.js: -------------------------------------------------------------------------------- 1 | const config = require('../config') 2 | const { cmd, commands } = require('../command') 3 | cmd({ 4 | pattern: "block", 5 | desc: "Block a user.", 6 | category: "owner", 7 | react: "🚫", 8 | filename: __filename 9 | }, 10 | async (conn, mek, m, { from, isOwner, quoted, reply }) => { 11 | if (!isOwner) return reply("❌ You are not the owner!"); 12 | if (!quoted) return reply("❌ Please reply to the user you want to block."); 13 | 14 | const user = quoted.sender; 15 | try { 16 | await conn.updateBlockStatus(user, 'block'); 17 | reply('🚫💎 Sɪʟᴠᴀ Sᴘᴀʀᴋ MD 💎 User ' + user + ' blocked successfully.'); 18 | } catch (error) { 19 | reply('❌ Error blocking user: ' + error.message); 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /plugins/couplespp.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("*SILVA SPARK 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': "SILVA SPARK 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': "SILVA SPARK 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 | > *@ 💎 Sɪʟᴠᴀ Sᴘᴀʀᴋ MD 💎*`; 32 | 33 | return reply(wordInfo); 34 | } catch (e) { 35 | console.log(e); 36 | if (e.response && e.response.status === 404) { 37 | return reply("🚫💎 Sɪʟᴠᴀ Sᴘᴀʀᴋ MD 💎 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/del.js: -------------------------------------------------------------------------------- 1 | const config = require('../config') 2 | const { cmd, commands } = require('../command') 3 | 4 | cmd({ 5 | pattern: "delete", 6 | react: "❌", 7 | alias: ["del"], 8 | desc: "delete message", 9 | category: "group", 10 | use: '.del', 11 | filename: __filename 12 | }, 13 | async(conn, mek, m,{from, l, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, isItzcp, groupAdmins, isBotAdmins, isAdmins, reply}) => { 14 | if (!isOwner || !isAdmins) return; 15 | try{ 16 | if (!m.quoted) return reply(mg.notextfordel); 17 | const key = { 18 | remoteJid: m.chat, 19 | fromMe: false, 20 | id: m.quoted.id, 21 | participant: m.quoted.sender 22 | } 23 | await conn.sendMessage(m.chat, { delete: key }) 24 | } catch(e) { 25 | console.log(e); 26 | reply('💎 Sɪʟᴠᴀ Sᴘᴀʀᴋ MD 💎 successful..👨‍💻✅') 27 | } 28 | }) 29 | -------------------------------------------------------------------------------- /plugins/dltik.js: -------------------------------------------------------------------------------- 1 | const fetch = require("node-fetch"); 2 | const { 3 | cmd 4 | } = require("../command"); 5 | cmd({ 6 | 'pattern': "tiktok2", 7 | 'alias': ["tt2", "tiktokdl2", "ttdown2", "tiktokvid2", "ttdl"], 8 | 'desc': "Download videos or images from TikTok.", 9 | 'react': '✅', 10 | 'category': 'tools', 11 | 'filename': __filename 12 | }, async (_0x5361f3, _0x2bb796, _0x4262dc, { 13 | from: _0xd8ba49, 14 | args: _0x5a77fe, 15 | reply: _0x2303a0 16 | }) => { 17 | try { 18 | const _0x432f6b = _0x5a77fe[0x0]; 19 | if (!_0x432f6b || !_0x432f6b.startsWith("http")) { 20 | return _0x2303a0("Please provide a valid TikTok link.\n\n*Usage Example:*\n\n.tt2 "); 21 | } 22 | const _0x4eed81 = await fetch('https://api.yanzbotz.live/api/downloader/tiktok?url=' + encodeURIComponent(_0x432f6b) + '&apiKey=yanzdev'); 23 | const _0x233679 = await _0x4eed81.json(); 24 | if (!_0x233679 || !_0x233679.result) { 25 | return _0x2303a0("Sorry, I couldn't fetch the TikTok content. Please check the link and try again."); 26 | } 27 | const _0x5796a2 = _0x233679.result; 28 | const _0x48590b = "*𝕊𝕚𝕝𝕧𝕒 𝕊𝕡𝕒𝕣𝕜 𝕄𝔻* ⊷\n┃๏ *TIKTOK DOWNLOADER*\n···๏\n⊷\n*Post Details* ⊷\n*Type:* " + (_0x5796a2.type || "N/A") + "\n*Name:* " + (_0x5796a2.name || "N/A") + "\n*Username:* " + (_0x5796a2.username || 'N/A') + "\n*Views:* " + (_0x5796a2.views || 0x0) + "\n*Likes:* " + (_0x5796a2.likes || 0x0) + "\n*Comments:* " + (_0x5796a2.comments || 0x0) + "\n*Favorites:* " + (_0x5796a2.favorite || 0x0) + "\n┇๏ *Shares:* " + (_0x5796a2.shares || 0x0) + " \n┇๏ *Description:* " + (_0x5796a2.description || "N/A") + " \n╰━━━━━━━━━━━━──┈⊷\n> ©𝕊𝕚𝕝𝕧𝕒 𝕊𝕡𝕒𝕣𝕜 𝕄𝔻"; 29 | if (_0x5796a2.type === 'video') { 30 | await _0x5361f3.sendMessage(_0xd8ba49, { 31 | 'video': { 32 | 'url': _0x5796a2.video["no-watermark"] 33 | }, 34 | 'caption': _0x48590b 35 | }, { 36 | 'quoted': _0x4262dc 37 | }); 38 | } else { 39 | if (_0x5796a2.type === "image") { 40 | for (const [_0xdd53f2, _0x2eb0c5] of (_0x5796a2.image || []).entries()) { 41 | await _0x5361f3.sendMessage(_0xd8ba49, { 42 | 'image': { 43 | 'url': _0x2eb0c5 44 | }, 45 | 'caption': "*💜 Image:* " + (_0xdd53f2 + 0x1) + "\n\n" + _0x48590b 46 | }, { 47 | 'quoted': _0x4262dc 48 | }); 49 | } 50 | } else { 51 | return _0x2303a0("Sorry, I couldn't process this type of TikTok content."); 52 | } 53 | } 54 | } catch (_0x56bda5) { 55 | console.error("𝕊𝕚𝕝𝕧𝕒 𝕊𝕡𝕒𝕣𝕜 𝕄𝔻 Error in TikTok command:", _0x56bda5); 56 | _0x2303a0("𝕊𝕚𝕝𝕧𝕒 𝕊𝕡𝕒𝕣𝕜 𝕄𝔻 An error occurred while processing your request. Please try again later."); 57 | } 58 | }); 59 | -------------------------------------------------------------------------------- /plugins/dog.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const { cmd, commands } = require('../command'); 3 | 4 | cmd({ 5 | pattern: "dog", 6 | desc: "Fetch a random dog image.", 7 | category: "fun", 8 | react: "🐶", 9 | filename: __filename 10 | }, 11 | 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 }) => { 12 | try { 13 | const apiUrl = `https://dog.ceo/api/breeds/image/random`; 14 | const response = await axios.get(apiUrl); 15 | const data = response.data; 16 | 17 | await conn.sendMessage(from, { image: { url: data.message }, caption: '> *© 𝕊𝕚𝕝𝕧𝕒 𝕊𝕡𝕒𝕣𝕜 𝕄𝔻 ' }, { quoted: mek }); 18 | } catch (e) { 19 | console.log(e); // ❯❯ 𝕊𝕚𝕝𝕧𝕒 𝕊𝕡𝕒𝕣𝕜 𝕄𝔻 20 | reply(`єяяσя ƒєт¢нιηg ∂σg ιмαgє: ${e.message}`); 21 | } 22 | }); 23 | -------------------------------------------------------------------------------- /plugins/endgc.js: -------------------------------------------------------------------------------- 1 | const { 2 | cmd 3 | } = require('../command'); 4 | const sleep = _0x28b89a => new Promise(_0x3ad2ff => setTimeout(_0x3ad2ff, _0x28b89a)); 5 | cmd({ 6 | 'pattern': 'removemembers', 7 | 'alias': ["kickall", 'endgc', "endgroup"], 8 | 'desc': "Remove all non-admin members from the group.", 9 | 'react': '🎉', 10 | 'category': "group", 11 | 'filename': __filename 12 | }, async (_0x541c7c, _0x28ecd0, _0x2ebb28, { 13 | from: _0x3ec016, 14 | groupMetadata: _0x561a47, 15 | groupAdmins: _0x4abe0f, 16 | isBotAdmins: _0x119769, 17 | senderNumber: _0x112bfc, 18 | reply: _0x1cd54a, 19 | isGroup: _0x2d9dc6 20 | }) => { 21 | try { 22 | if (!_0x2d9dc6) { 23 | return _0x1cd54a("This command can only be used in groups."); 24 | } 25 | const _0x5ad0e2 = _0x541c7c.user.id.split(':')[0x0]; 26 | if (_0x112bfc !== _0x5ad0e2) { 27 | return _0x1cd54a("【SILVA】💥SPARK💥【MD\n\n】Only the bot owner can use this command."); 28 | } 29 | if (!_0x119769) { 30 | return _0x1cd54a("【SILVA】💥SPARK💥【MD】\n\nI need to be an admin to execute this command."); 31 | } 32 | const _0x27054b = _0x561a47.participants; 33 | const _0x59ce1d = _0x27054b.filter(_0x31bd1b => !_0x4abe0f.includes(_0x31bd1b.id)); 34 | if (_0x59ce1d.length === 0x0) { 35 | return _0x1cd54a("【SILVA】💥SPARK💥【MD】\n\nThere are no non-admin members to remove."); 36 | } 37 | _0x1cd54a("Starting to remove " + _0x59ce1d.length + " non-admin members..."); 38 | for (let _0x58a736 of _0x59ce1d) { 39 | try { 40 | await _0x541c7c.groupParticipantsUpdate(_0x3ec016, [_0x58a736.id], 'remove'); 41 | await sleep(0x7d0); 42 | } catch (_0x448767) { 43 | console.error("Failed to remove " + _0x58a736.id + ':', _0x448767); 44 | } 45 | } 46 | _0x1cd54a("【SILVA】💥SPARK💥【MD】\n\nSuccessfully removed all non-admin members from the group."); 47 | } catch (_0x2ffa0d) { 48 | console.error("Error removing non-admin users:", _0x2ffa0d); 49 | _0x1cd54a("An error occurred while trying to remove non-admin members. Please try again."); 50 | } 51 | }); 52 | cmd({ 53 | 'pattern': "removeadmins", 54 | 'alias': ["kickadmins", "kickall3", "deladmins"], 55 | 'desc': "Remove all admin members from the group, excluding the bot and bot owner.", 56 | 'react': '🎉', 57 | 'category': "group", 58 | 'filename': __filename 59 | }, async (_0x2c9a95, _0x3d19b1, _0x5d9806, { 60 | from: _0x49bf85, 61 | isGroup: _0x437d8e, 62 | senderNumber: _0x39ac26, 63 | groupMetadata: _0x45af2, 64 | groupAdmins: _0x59d911, 65 | isBotAdmins: _0x25f378, 66 | reply: _0x454a95 67 | }) => { 68 | try { 69 | if (!_0x437d8e) { 70 | return _0x454a95("【SILVA】💥SPARK💥【MD】\n\nThis command can only be used in groups."); 71 | } 72 | const _0x86850b = _0x2c9a95.user.id.split(':')[0x0]; 73 | if (_0x39ac26 !== _0x86850b) { 74 | return _0x454a95("Only the bot owner can use this command."); 75 | } 76 | if (!_0x25f378) { 77 | return _0x454a95("I need to be an admin to execute this command."); 78 | } 79 | const _0x5251dc = _0x45af2.participants; 80 | const _0x3468fe = _0x5251dc.filter(_0x6832c1 => _0x59d911.includes(_0x6832c1.id) && _0x6832c1.id !== _0x2c9a95.user.id && _0x6832c1.id !== _0x86850b + "@s.whatsapp.net"); 81 | if (_0x3468fe.length === 0x0) { 82 | return _0x454a95("There are no admin members to remove."); 83 | } 84 | _0x454a95("Starting to remove " + _0x3468fe.length + " admin members, excluding the bot and bot owner..."); 85 | for (let _0x164699 of _0x3468fe) { 86 | try { 87 | await _0x2c9a95.groupParticipantsUpdate(_0x49bf85, [_0x164699.id], 'remove'); 88 | await sleep(0x7d0); 89 | } catch (_0x1b4051) { 90 | console.error("Failed to remove " + _0x164699.id + ':', _0x1b4051); 91 | } 92 | } 93 | _0x454a95("Successfully removed all admin members from the group, excluding the bot and bot owner."); 94 | } catch (_0x2a5e6b) { 95 | console.error("Error removing admins:", _0x2a5e6b); 96 | _0x454a95("An error occurred while trying to remove admins. Please try again."); 97 | } 98 | }); 99 | cmd({ 100 | 'pattern': "removeall2", 101 | 'alias': ["kickall2", "endgc2", "endgroup2"], 102 | 'desc': "Remove all members and admins from the group, excluding the bot and bot owner.", 103 | 'react': '🎉', 104 | 'category': "group", 105 | 'filename': __filename 106 | }, async (_0x58df9b, _0x205354, _0x4f7c7c, { 107 | from: _0xc8fca7, 108 | isGroup: _0x4daea3, 109 | senderNumber: _0x270b3f, 110 | groupMetadata: _0x5289f6, 111 | isBotAdmins: _0x1db97d, 112 | reply: _0x477905 113 | }) => { 114 | try { 115 | if (!_0x4daea3) { 116 | return _0x477905("This command can only be used in groups."); 117 | } 118 | const _0x3fdab4 = _0x58df9b.user.id.split(':')[0x0]; 119 | if (_0x270b3f !== _0x3fdab4) { 120 | return _0x477905("Only the bot owner can use this command."); 121 | } 122 | if (!_0x1db97d) { 123 | return _0x477905("【SILVA】💥SPARK💥【MD】\n\nI need to be an admin to execute this command."); 124 | } 125 | const _0x44e3d7 = _0x5289f6.participants; 126 | if (_0x44e3d7.length === 0x0) { 127 | return _0x477905("The group has no members to remove."); 128 | } 129 | const _0x94c1ea = _0x44e3d7.filter(_0x29a3c7 => _0x29a3c7.id !== _0x58df9b.user.id && _0x29a3c7.id !== _0x3fdab4 + "@s.whatsapp.net"); 130 | if (_0x94c1ea.length === 0x0) { 131 | return _0x477905("No members to remove after excluding the bot and bot owner."); 132 | } 133 | _0x477905("Starting to remove " + _0x94c1ea.length + " members, excluding the bot and bot owner..."); 134 | for (let _0x447569 of _0x94c1ea) { 135 | try { 136 | await _0x58df9b.groupParticipantsUpdate(_0xc8fca7, [_0x447569.id], "remove"); 137 | await sleep(0x7d0); 138 | } catch (_0x2fc4ea) { 139 | console.error("Failed to remove " + _0x447569.id + ':', _0x2fc4ea); 140 | } 141 | } 142 | _0x477905("【SILVA】💥SPARK💥【MD】\n\nSuccessfully removed all members, excluding the bot and bot owner, from the group."); 143 | } catch (_0x191e55) { 144 | console.error("Error removing members:", _0x191e55); 145 | _0x477905("An error occurred while trying to remove members. Please try again."); 146 | } 147 | }); 148 | -------------------------------------------------------------------------------- /plugins/env.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 | // Function to check if a value represents a "true" boolean state 8 | return value && value.toString().toLowerCase() === "true"; 9 | } 10 | 11 | cmd({ 12 | pattern: "env", 13 | alias: ["setting", "allvar"], 14 | desc: "Settings of bot", 15 | category: "menu", 16 | react: "⤵️", 17 | filename: __filename 18 | }, 19 | async (conn, mek, m, { from, quoted, reply }) => { 20 | try { 21 | // Define the settings message with the correct boolean checks 22 | let envSettings = `╭〔 *【SILVA】💥SPARK💥【MD】* 〕⊷ 23 | ┃▸╭─────────── 24 | ┃▸┃๏ *ENV SETTINGS 🗿* 25 | ┃▸└───────────···๏ 26 | ╰────────────────┈⊷ 27 | ╭━━〔 *Enabled Disabled* 〕━━┈⊷ 28 | ┇๏ *Auto Read Status:* ${isEnabled(config.AUTO_STATUS_SEEN) ? "Enabled ✅" : "Disabled ❌"} 29 | ┇๏ *Auto Reply Status:* ${isEnabled(config.AUTO_STATUS_REPLY) ? "Enabled ✅" : "Disabled ❌"} 30 | ┇๏ *Auto Reply:* ${isEnabled(config.AUTO_REPLY) ? "Enabled ✅" : "Disabled ❌"} 31 | ┇๏ *Auto Sticker:* ${isEnabled(config.AUTO_STICKER) ? "Enabled ✅" : "Disabled ❌"} 32 | ┇๏ *Auto Voice:* ${isEnabled(config.AUTO_VOICE) ? "Enabled ✅" : "Disabled ❌"} 33 | ┇๏ *Owner React:* ${isEnabled(config.OWNER_REACT) ? "Enabled ✅" : "Disabled ❌"} 34 | ┇๏ *Custom Reacts:* ${isEnabled(config.CUSTOM_REACT) ? "Enabled ✅" : "Disabled ❌"} 35 | ┇๏ *Auto React:* ${isEnabled(config.AUTO_REACT) ? "Enabled ✅" : "Disabled ❌"} 36 | ┇๏ *Delete Links:* ${isEnabled(config.DELETE_LINKS) ? "Enabled ✅" : "Disabled ❌"} 37 | ┇๏ *Anti-Link:* ${isEnabled(config.ANTI_LINK) ? "Enabled ✅" : "Disabled ❌"} 38 | ┇๏ *Anti-Bad Words:* ${isEnabled(config.ANTI_BAD) ? "Enabled ✅" : "Disabled ❌"} 39 | ┇๏ *Auto Typing:* ${isEnabled(config.AUTO_TYPING) ? "Enabled ✅" : "Disabled ❌"} 40 | ┇๏ *Auto Recording:* ${isEnabled(config.AUTO_RECORDING) ? "Enabled ✅" : "Disabled ❌"} 41 | ┇๏ *Always Online:* ${isEnabled(config.ALWAYS_ONLINE) ? "Enabled ✅" : "Disabled ❌"} 42 | ┇๏ *Public Mode:* ${isEnabled(config.PUBLIC_MODE) ? "Enabled ✅" : "Disabled ❌"} 43 | ┇๏ *Read Message:* ${isEnabled(config.READ_MESSAGE) ? "Enabled ✅" : "Disabled ❌"} 44 | ╰━━━━━━━━━━━━──┈⊷ 45 | > ${config.DESCRIPTION}`; 46 | 47 | // Send message with an image 48 | await conn.sendMessage( 49 | from, 50 | { 51 | image: { url: 'https://files.catbox.moe/0vldgh.jpeg' }, // Image URL 52 | caption: envSettings, 53 | contextInfo: { 54 | mentionedJid: [m.sender], 55 | forwardingScore: 999, 56 | isForwarded: true, 57 | forwardedNewsletterMessageInfo: { 58 | newsletterJid: '120363200367779016@newsletter', 59 | newsletterName: "THE SILVA SPARK 🥰", 60 | serverMessageId: 143 61 | } 62 | } 63 | }, 64 | { quoted: mek } 65 | ); 66 | 67 | // Send an audio file 68 | await conn.sendMessage(from, { 69 | audio: { url: 'https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/sigma.m4a' }, // Audio URL 70 | mimetype: 'audio/mp4', 71 | ptt: true 72 | }, { quoted: mek }); 73 | 74 | } catch (error) { 75 | console.log(error); 76 | reply(`Error: ${error.message}`); 77 | } 78 | }); 79 | -------------------------------------------------------------------------------- /plugins/gcsetting.js: -------------------------------------------------------------------------------- 1 | const { 2 | cmd 3 | } = require('../command'); 4 | cmd({ 5 | 'pattern': "leave", 6 | 'alias': ['left', 'l'], 7 | 'react': '🔐', 8 | 'desc': "Remove all members with a specific country code from the group", 9 | 'category': 'owner', 10 | 'filename': __filename 11 | }, async (_0x403693, _0x1fe1a1, _0xe5d90b, { 12 | from: _0x1ac45c, 13 | quoted: _0x1d832e, 14 | body: _0x2e22cd, 15 | isCmd: _0x3e35c1, 16 | command: _0x2ba3e8, 17 | args: _0x400b8c, 18 | q: _0x473315, 19 | isGroup: _0x51c21a, 20 | senderNumber: _0x5bd5ac, 21 | reply: _0x284a7b 22 | }) => { 23 | try { 24 | if (!_0x51c21a) { 25 | return _0x284a7b("*🚫 This command can only be used in groups.*"); 26 | } 27 | const _0x3f975e = _0x403693.user.id.split(':')[0x0]; 28 | if (_0x5bd5ac !== _0x3f975e) { 29 | return _0x284a7b("> *🚫 Only the bot owner can use this command.*"); 30 | } 31 | const _0x32c8ad = _0x400b8c[0x0]; 32 | if (!_0x32c8ad) { 33 | return _0x284a7b("Please specify the country code (e.g., +92 or +91)."); 34 | } 35 | const _0x239d3d = await _0x403693.groupMetadata(_0x1ac45c); 36 | const _0x1bb4c9 = _0x239d3d.participants; 37 | const _0x1f9bc8 = _0x1bb4c9.filter(_0x22331a => _0x22331a.number && _0x22331a.number.startsWith(_0x32c8ad)); 38 | if (_0x1f9bc8.length === 0x0) { 39 | return _0x284a7b("No members found with country code " + _0x32c8ad + '.'); 40 | } 41 | for (let _0x298c47 of _0x1f9bc8) { 42 | await _0x403693.groupRemove(_0x1ac45c, [_0x298c47.jid]); 43 | } 44 | _0x284a7b("Removed all members with country code " + _0x32c8ad + " from the group."); 45 | } catch (_0x1f5ab4) { 46 | console.error(_0x1f5ab4); 47 | _0x284a7b("❌ Error: " + _0x1f5ab4); 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /plugins/getprofilestalk.js: -------------------------------------------------------------------------------- 1 | const { cmd } = require('../command'); 2 | 3 | cmd({ 4 | pattern: "getpp", 5 | desc: "🖼️ Get profile picture of any user", 6 | react: "📸", 7 | category: "User", 8 | filename: __filename 9 | }, 10 | async (conn, mek, m, { from, isGroup, mentionByTag, quoted, sender, reply }) => { 11 | try { 12 | // 🧠 Identify the target user 13 | let target; 14 | if (isGroup) { 15 | target = mentionByTag?.[0] || quoted?.sender || sender; 16 | } else { 17 | target = sender; 18 | } 19 | 20 | if (!target.includes('@')) target += '@s.whatsapp.net'; 21 | 22 | // 🌐 Attempt to get profile picture URL 23 | let profilePic; 24 | try { 25 | profilePic = await conn.profilePictureUrl(target, 'image'); 26 | } catch { 27 | return reply("🚫 No profile picture found or it's private."); 28 | } 29 | 30 | // 🎯 Get display name 31 | const name = await conn.getName(target); 32 | 33 | // 📩 Send the profile picture 34 | await conn.sendMessage(from, { 35 | image: { url: profilePic }, 36 | caption: `🖼️ *Profile Picture of ${name}*`, 37 | contextInfo: { 38 | mentionedJid: [target], 39 | forwardingScore: 500, 40 | isForwarded: true, 41 | forwardedNewsletterMessageInfo: { 42 | newsletterJid: '120363200367779016@newsletter', 43 | newsletterName: 'Silva Spark MD', 44 | serverMessageId: 101 45 | } 46 | } 47 | }, { quoted: m }); 48 | 49 | } catch (error) { 50 | console.error("❌ getpp error:", error); 51 | return reply("⚠️ Unexpected error occurred. Try again."); 52 | } 53 | }); -------------------------------------------------------------------------------- /plugins/gitclone.js: -------------------------------------------------------------------------------- 1 | const { 2 | cmd 3 | } = require("../command"); 4 | const fetch = require("node-fetch"); 5 | cmd({ 6 | 'pattern': 'gitclone', 7 | 'alias': ["git"], 8 | 'desc': "Download GitHub repository as a zip file.", 9 | 'react': '📦', 10 | 'category': "downloader", 11 | 'filename': __filename 12 | }, async (_0x359a4d, _0x5b481d, _0x310e0a, { 13 | from: _0x421a7d, 14 | quoted: _0x163171, 15 | args: _0x216653, 16 | reply: _0x11eb9d 17 | }) => { 18 | if (!_0x216653[0x0]) { 19 | return _0x11eb9d("Where is the GitHub link?\n\nExample:\n.gitclone https://github.com/SilvaTechB/silva-spark-md"); 20 | } 21 | if (!/^(https:\/\/)?github\.com\/.+/.test(_0x216653[0x0])) { 22 | return _0x11eb9d("⚠️ Invalid GitHub link."); 23 | } 24 | try { 25 | let _0xb5560f = /github\.com\/([^\/]+)\/([^\/]+)(?:\.git)?/i; 26 | let [_0x460bcd, _0x5194b2, _0x16a926] = _0x216653[0x0].match(_0xb5560f) || []; 27 | if (!_0x5194b2 || !_0x16a926) { 28 | throw new Error("Invalid GitHub URL."); 29 | } 30 | let _0x936878 = "https://api.github.com/repos/" + _0x5194b2 + '/' + _0x16a926 + '/zipball'; 31 | let _0xe6be44 = await fetch(_0x936878, { 32 | 'method': "HEAD" 33 | }); 34 | if (!_0xe6be44.ok) { 35 | throw new Error("Repository not found."); 36 | } 37 | let _0x49a379 = _0xe6be44.headers.get("content-disposition"); 38 | let _0x481150 = _0x49a379 ? _0x49a379.match(/filename=(.*)/)[0x1] : _0x16a926 + ".zip"; 39 | _0x11eb9d("*📥𝘚𝘪𝘭𝘷𝘢 𝘚𝘱𝘢𝘳𝘬 𝘔𝘋 DOWNLOADING REPOSITORY...*\n\n*REPOSITORY:* " + _0x5194b2 + '/' + _0x16a926 + "\n*FILENAME:* " + _0x481150 + "\n\n> *© 𝘚𝘪𝘭𝘷𝘢 𝘚𝘱𝘢𝘳𝘬 𝘔𝘋*"); 40 | await _0x359a4d.sendMessage(_0x421a7d, { 41 | 'document': { 42 | 'url': _0x936878 43 | }, 44 | 'fileName': _0x481150 + ".zip", 45 | 'mimetype': 'application/zip', 46 | 'contextInfo': { 47 | 'mentionedJid': [_0x5b481d.sender], 48 | 'forwardingScore': 0x3e7, 49 | 'isForwarded': true, 50 | 'forwardedNewsletterMessageInfo': { 51 | 'newsletterJid': "120363200367779016@newsletter", 52 | 'newsletterName': "SILVA GITHUB CLONE💀", 53 | 'serverMessageId': 0x8f 54 | } 55 | } 56 | }, { 57 | 'quoted': _0x5b481d 58 | }); 59 | } catch (_0x12ae9b) { 60 | console.error(_0x12ae9b); 61 | _0x11eb9d("❌ Failed to download the repository. Please try again later."); 62 | } 63 | }); 64 | -------------------------------------------------------------------------------- /plugins/gitstalk.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const config = require('../config'); 3 | const { cmd, commands } = require('../command'); 4 | 5 | cmd({ 6 | pattern: "githubstalk", 7 | desc: "Fetch detailed GitHub user profile including profile picture.", 8 | category: "menu", 9 | react: "🖥️", 10 | filename: __filename 11 | }, 12 | 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 }) => { 13 | try { 14 | const username = args[0]; 15 | if (!username) { 16 | return reply("Please provide a GitHub username."); 17 | } 18 | const apiUrl = `https://api.github.com/users/${username}`; 19 | const response = await axios.get(apiUrl); 20 | const data = response.data; 21 | 22 | let userInfo = `👤 *Username*: ${data.name || data.login} 23 | 🔗 *Github Url*:(${data.html_url}) 24 | 📝 *Bio*: ${data.bio || 'Not available'} 25 | 🏙️ *Location*: ${data.location || 'Unknown'} 26 | 📊 *Public Repos*: ${data.public_repos} 27 | 👥 *Followers*: ${data.followers} | Following: ${data.following} 28 | 📅 *Created At*: ${new Date(data.created_at).toDateString()} 29 | 🔭 *Public Gists*: ${data.public_gists} 30 | > © 𝘚𝘪𝘭𝘷𝘢 𝘚𝘱𝘢𝘳𝘬 𝘔𝘋`; 31 | const sentMsg = await conn.sendMessage(from,{image:{url: data.avatar_url },caption: userInfo },{quoted:mek }) 32 | } catch (e) { 33 | console.log(e); 34 | reply(`error: ${e.response ? e.response.data.message : e.message}`); 35 | } 36 | }); 37 | 38 | // 𝘚𝘪𝘭𝘷𝘢 𝘚𝘱𝘢𝘳𝘬 𝘔𝘋 39 | -------------------------------------------------------------------------------- /plugins/gitstalks.js: -------------------------------------------------------------------------------- 1 | const fetch = require("node-fetch"); 2 | const { 3 | getBuffer, 4 | getGroupAdmins, 5 | getRandom, 6 | h2k, 7 | isUrl, 8 | Json, 9 | sleep, 10 | fetchJson 11 | } = require("../lib/functions"); 12 | const { 13 | cmd 14 | } = require("../command"); 15 | cmd({ 16 | 'pattern': "getpair", 17 | 'alias': "pair", 18 | 'desc': "Get a pairing code for a phone number", 19 | 'category': "main", 20 | 'filename': __filename 21 | }, async (_0x3f368b, _0x1c1435, _0x2fe294, { 22 | reply: _0x393f08, 23 | body: _0x4cbc9c, 24 | isGroup: _0x586b42 25 | }) => { 26 | try { 27 | await _0x3f368b.sendMessage(_0x2fe294.key.remoteJid || _0x2fe294.from, { 28 | 'react': { 29 | 'text': '⌛', 30 | 'key': _0x2fe294.key 31 | } 32 | }); 33 | if (_0x586b42) { 34 | return _0x3f368b.sendMessage(_0x2fe294.key.remoteJid || _0x2fe294.from, { 35 | 'text': "*❌ Getting a pairing code is not allowed in groups!*\n\nPlease use this command in my inbox to get your pairing code." 36 | }, { 37 | 'quoted': _0x2fe294 38 | }); 39 | } 40 | const _0x3b2587 = _0x4cbc9c.split(" ")[0x1]; 41 | if (!_0x3b2587 || !/^\d{10,15}$/.test(_0x3b2587)) { 42 | return _0x393f08("*❌ Invalid phone number format*.\n\nPlease enter a valid number with country code (.getpair 254000000000)."); 43 | } 44 | await _0x3f368b.sendMessage(_0x2fe294.key.remoteJid || _0x2fe294.from, { 45 | 'react': { 46 | 'text': '⏳', 47 | 'key': _0x2fe294.key 48 | } 49 | }); 50 | _0x393f08("Processing your request. Please wait..."); 51 | const _0x13d51a = await fetch("https://session-id.silvatechinc.my.id/pair?phone=" + encodeURIComponent(_0x3b2587)); 52 | const _0x2e869c = await _0x13d51a.json(); 53 | if (_0x2e869c.code) { 54 | const _0x25f740 = _0x2e869c.code; 55 | const _0xeea95a = "*⚡Pairing Code For silva spark 🗿*\n\n🪀 notification has been sent to your WhatsApp. Please check your phone and copy this code to pair it and get your *Silva Spark MD* session id.\n\n*🔢 Pairing Code* : *" + _0x25f740 + "*\n\n> *_Copy it from below message 👇🏻_*"; 56 | try { 57 | await _0x3f368b.sendMessage(_0x2fe294.key.remoteJid || _0x2fe294.from, { 58 | 'image': { 59 | 'url': "https://i.imgur.com/PEZ5QL2.jpeg" 60 | }, 61 | 'caption': _0xeea95a 62 | }, { 63 | 'quoted': _0x2fe294 64 | }); 65 | } catch (_0x3ddd1f) { 66 | console.error("Error sending pairing code message with image:", _0x3ddd1f); 67 | _0x393f08("⚠️ Error sending pairing code message with image. Please try again."); 68 | } 69 | await _0x3f368b.sendMessage(_0x2fe294.key.remoteJid || _0x2fe294.from, { 70 | 'text': _0x25f740 71 | }, { 72 | 'quoted': _0x2fe294 73 | }); 74 | await _0x3f368b.sendMessage(_0x2fe294.key.remoteJid || _0x2fe294.from, { 75 | 'react': { 76 | 'text': '⤵️', 77 | 'key': _0x2fe294.key 78 | } 79 | }); 80 | } else if (_0x2e869c.error) { 81 | _0x393f08("❌ Error: " + _0x2e869c.error); 82 | } else { 83 | _0x393f08("❌ Failed to retrieve pairing code. Please try again later."); 84 | } 85 | } catch (_0x43d09a) { 86 | console.error("Error processing pair command:", _0x43d09a); 87 | _0x393f08("❌ An error occurred: " + _0x43d09a.message); 88 | } 89 | }); 90 | cmd({ 91 | 'pattern': "pair2", 92 | 'alias': ['getpair2', "clonebot"], 93 | 'react': '🎉', 94 | 'desc': "Pairing code", 95 | 'category': "download", 96 | 'use': ".pair +254700143167", 97 | 'filename': __filename 98 | }, async (_0x164b72, _0x230a02, _0x1c5313, { 99 | from: _0x451058, 100 | prefix: _0x363a9d, 101 | quoted: _0x43e02b, 102 | q: _0x4de0bb, 103 | reply: _0x50e2bb 104 | }) => { 105 | try { 106 | const _0x566978 = _0xf64dd8 => new Promise(_0x1495bd => setTimeout(_0x1495bd, _0xf64dd8)); 107 | if (!_0x4de0bb) { 108 | return await _0x50e2bb("*Example -* .pair 254700143167"); 109 | } 110 | const _0x5aa4f0 = require('node-fetch'); 111 | const _0x3a87c7 = await _0x5aa4f0('https://session-id.silvatechinc.my.id/pair?phone=' + _0x4de0bb); 112 | const _0x15aa92 = await _0x3a87c7.json(); 113 | if (!_0x15aa92 || !_0x15aa92.code) { 114 | return await _0x50e2bb("Failed to retrieve pairing code. Please check the phone number and try again."); 115 | } 116 | const _0x27dff2 = _0x15aa92.code; 117 | await _0x50e2bb("> *Silva Spark MD PAIR COMPLETED*\n\n*Your pairing code is:* " + _0x27dff2); 118 | await _0x566978(0x7d0); 119 | await _0x50e2bb('' + _0x27dff2); 120 | } catch (_0x53bf58) { 121 | console.error(_0x53bf58); 122 | await _0x50e2bb("An error occurred. Please try again later."); 123 | } 124 | }); 125 | -------------------------------------------------------------------------------- /plugins/gpass.js: -------------------------------------------------------------------------------- 1 | const crypto = require("crypto"); 2 | const { 3 | cmd 4 | } = require("../command"); 5 | cmd({ 6 | 'pattern': "gpass", 7 | 'desc': "Generate a strong password.", 8 | 'category': "other", 9 | 'react': '🔐', 10 | 'filename': __filename 11 | }, async (_0x1f40d4, _0x2b6900, _0x2e4aeb, { 12 | from: _0x329458, 13 | quoted: _0x395d6a, 14 | body: _0x40458f, 15 | isCmd: _0x214376, 16 | command: _0x502a1e, 17 | args: _0x982de, 18 | q: _0x124c0e, 19 | isGroup: _0x21418c, 20 | sender: _0x140496, 21 | senderNumber: _0xaf3ea1, 22 | botNumber2: _0x581460, 23 | botNumber: _0x1c011c, 24 | pushname: _0xde7eef, 25 | isMe: _0x562b47, 26 | isOwner: _0x4d7c68, 27 | groupMetadata: _0xf724fb, 28 | groupName: _0x4c678f, 29 | participants: _0x3e2c97, 30 | groupAdmins: _0x17576f, 31 | isBotAdmins: _0x176f78, 32 | isAdmins: _0x194d52, 33 | reply: _0x1bb557 34 | }) => { 35 | try { 36 | const _0x1fe8bf = _0x982de[0x0] ? parseInt(_0x982de[0x0]) : 0xc; 37 | if (isNaN(_0x1fe8bf) || _0x1fe8bf < 0x8) { 38 | return _0x1bb557("Please provide a valid length for the password (Minimum 08 Characters💦)."); 39 | } 40 | const _0x571dd4 = _0xf0eba7 => { 41 | let _0x56fb57 = ''; 42 | for (let _0x3ea116 = 0x0; _0x3ea116 < _0xf0eba7; _0x3ea116++) { 43 | const _0x119792 = crypto.randomInt(0x0, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+[]{}|;:,.<>?".length); 44 | _0x56fb57 += 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+[]{}|;:,.<>?'[_0x119792]; 45 | } 46 | return _0x56fb57; 47 | }; 48 | const _0x51f475 = _0x571dd4(_0x1fe8bf); 49 | await _0x1f40d4.sendMessage(_0x329458, { 50 | 'text': "🔐 *Your Strong Password* 🔐\n\nPlease find your generated password below:\n\n *𝒮𝒾𝓁𝓋𝒶 𝒮𝓅𝒶𝓇𝓀 𝑀𝒟*" 51 | }, { 52 | 'quoted': _0x2b6900 53 | }); 54 | await _0x1f40d4.sendMessage(_0x329458, { 55 | 'text': _0x51f475 56 | }, { 57 | 'quoted': _0x2b6900 58 | }); 59 | } catch (_0x1ad7bb) { 60 | console.log(_0x1ad7bb); 61 | _0x1bb557("❌𝒮𝒾𝓁𝓋𝒶 𝒮𝓅𝒶𝓇𝓀 𝑀𝒟 Error generating password🤕: " + _0x1ad7bb.message); 62 | } 63 | }); 64 | -------------------------------------------------------------------------------- /plugins/img.js: -------------------------------------------------------------------------------- 1 | const { cmd, commands } = require("../command"); 2 | const axios = require("axios"); 3 | 4 | cmd({ 5 | pattern: "img", 6 | alias: ["pinterest", "image", "searchpin"], 7 | react: "🔍", 8 | desc: "Search and download Pinterest images using the API.", 9 | category: "fun", 10 | use: ".pin ", 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.*"); 17 | } 18 | 19 | // Notify user that the request is being processed 20 | await reply(`*🔎 Searching and downloading images for:* ${query}...`); 21 | 22 | const apiUrl = `https://silva-api.vercel.app/download/wallpaper?text=${encodeURIComponent(query)}`; 23 | const response = await axios.get(apiUrl); 24 | 25 | // Validate the response and ensure results exist 26 | if (!response.data || !response.data.result || response.data.result.length === 0) { 27 | return reply("*⚠️ No results found. Please try using different keywords.*"); 28 | } 29 | 30 | const results = response.data.result; 31 | 32 | // Randomly select up to 5 images from the results 33 | const selectedImages = results.sort(() => 0.5 - Math.random()).slice(0, 5); 34 | 35 | // Send each selected image to the user 36 | for (const image of selectedImages) { 37 | await conn.sendMessage( 38 | from, 39 | { 40 | image: { url: image.src }, 41 | caption: `*🔎 Results for:* ${query}\n\n> *Powered by Silva Spark MD ✨*` 42 | }, 43 | { quoted: mek } 44 | ); 45 | } 46 | } catch (error) { 47 | console.error(error); 48 | reply("*❌ An error occurred while processing your request. Please try again later.*"); 49 | } 50 | }); 51 | -------------------------------------------------------------------------------- /plugins/jid.js: -------------------------------------------------------------------------------- 1 | const { cmd } = require('../command'); 2 | 3 | cmd({ 4 | pattern: "jid1", 5 | desc: "Get the JID of the user or group.", 6 | react: "📍", 7 | category: "group", 8 | filename: __filename, 9 | }, 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 }) => { 10 | try { 11 | // Check if the user has the necessary permissions (Owner or Admin) 12 | if (!isGroup && !isOwner) { 13 | return reply("⚠️ Only the bot owner or group admins can use this command."); 14 | } 15 | 16 | // If it's a group, reply with the group JID 17 | if (isGroup) { 18 | return reply(`Group JID: *${from}@g.us*`); 19 | } 20 | 21 | // If it's a personal chat, reply with the user's JID 22 | if (!isGroup) { 23 | return reply(`User JID: *${sender}@s.whatsapp.net*`); 24 | } 25 | 26 | } catch (e) { 27 | console.error("Error:", e); 28 | reply(`❌ An error occurred: ${e.message}`); 29 | } 30 | }); 31 | 32 | 33 | // jid2 34 | 35 | cmd({ 36 | pattern: "jid2", 37 | desc: "Get the JID of the user or group.", 38 | react: "📍", 39 | category: "group", 40 | filename: __filename, 41 | }, 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 }) => { 42 | try { 43 | // Ensure the command is being used in a group or personal chat and the user has necessary permissions 44 | if (!isGroup && !isOwner) { 45 | return reply("⚠️ Only the bot owner or group admins can use this command."); 46 | } 47 | 48 | // If the message is from a group 49 | if (isGroup) { 50 | // Respond with the group JID 51 | return reply(`Group JID: *${from}@g.us*`); 52 | } 53 | 54 | // If it's a personal chat, respond with the user's JID 55 | if (!isGroup) { 56 | return reply(`User JID: *${sender}@s.whatsapp.net*`); 57 | } 58 | 59 | } catch (e) { 60 | console.error("Error:", e); 61 | reply(`❌ An error occurred: ${e.message}`); 62 | } 63 | }); 64 | -------------------------------------------------------------------------------- /plugins/linksdel.js: -------------------------------------------------------------------------------- 1 | const { 2 | cmd 3 | } = require('../command'); 4 | const config = require('../config'); 5 | const linkPatterns = [/https?:\/\/(?:chat\.whatsapp\.com|wa\.me)\/\S+/gi, /^https?:\/\/(www\.)?whatsapp\.com\/channel\/([a-zA-Z0-9_-]+)$/, /wa\.me\/\S+/gi, /https?:\/\/(?:t\.me|telegram\.me)\/\S+/gi, /https?:\/\/(?:www\.)?youtube\.com\/\S+/gi, /https?:\/\/youtu\.be\/\S+/gi, /https?:\/\/(?:www\.)?facebook\.com\/\S+/gi, /https?:\/\/fb\.me\/\S+/gi, /https?:\/\/(?:www\.)?instagram\.com\/\S+/gi, /https?:\/\/(?:www\.)?twitter\.com\/\S+/gi, /https?:\/\/(?:www\.)?tiktok\.com\/\S+/gi, /https?:\/\/(?:www\.)?linkedin\.com\/\S+/gi, /https?:\/\/(?:www\.)?snapchat\.com\/\S+/gi, /https?:\/\/(?:www\.)?pinterest\.com\/\S+/gi, /https?:\/\/(?:www\.)?reddit\.com\/\S+/gi, /https?:\/\/ngl\/\S+/gi, /https?:\/\/(?:www\.)?discord\.com\/\S+/gi, /https?:\/\/(?:www\.)?twitch\.tv\/\S+/gi, /https?:\/\/(?:www\.)?vimeo\.com\/\S+/gi, /https?:\/\/(?:www\.)?dailymotion\.com\/\S+/gi, /https?:\/\/(?:www\.)?medium\.com\/\S+/gi]; 6 | cmd({ 7 | 'on': 'body' 8 | }, async (_0x3d156a, _0x48fdd7, _0xad4cb9, { 9 | from: _0x88cc2a, 10 | body: _0x4e3943, 11 | sender: _0x19c980, 12 | isGroup: _0x272e89, 13 | isAdmins: _0x1f1aa5, 14 | isBotAdmins: _0xece72d 15 | }) => { 16 | try { 17 | if (!_0x272e89 || _0x1f1aa5 || !_0xece72d) { 18 | return; 19 | } 20 | const _0x1f0910 = linkPatterns.some(_0x962f67 => _0x962f67.test(_0x4e3943)); 21 | if (_0x1f0910 && config.DELETE_LINKS === 'true') { 22 | await _0x3d156a.sendMessage(_0x88cc2a, { 23 | 'delete': _0x48fdd7.key 24 | }, { 25 | 'quoted': _0x48fdd7 26 | }); 27 | } 28 | } catch (_0x478f90) { 29 | console.error(_0x478f90); 30 | } 31 | }); 32 | -------------------------------------------------------------------------------- /plugins/listcmd.js: -------------------------------------------------------------------------------- 1 | const config = require('../config') 2 | const { cmd, commands } = require('../command'); 3 | 4 | cmd({ 5 | pattern: "list", 6 | alias: ["listcmd","commands"], 7 | desc: "menu the bot", 8 | category: "menu", 9 | react: "⚡", 10 | filename: __filename 11 | }, 12 | 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 }) => { 13 | try { 14 | let dec = `╭━❮ *DOWNLOAD CMD* ❯━┈⊷ 15 | ┃▸ 16 | ┃▸📄 COMMAND: .play 17 | ┃▸❕ Download Audio from yt 18 | ┃▸ 19 | ┃▸📄 COMMAND: .song 20 | ┃▸❕ Download song from yt 21 | ┃▸ 22 | ┃▸📄 COMMAND: .apk 23 | ┃▸❕ Download apk from playstore 24 | ┃▸ 25 | ┃▸📄 COMMAND: .video 26 | ┃▸❕ Download video from yt 27 | ┃▸ 28 | ┃▸📄 COMMAND: .fb 29 | ┃▸❕ Download video from fb 30 | ┃▸ 31 | ┃▸📄 COMMAND: .tk 32 | ┃▸❕ Download video from tiktok 33 | ┃▸ 34 | ┃▸📄 COMMAND: .ig 35 | ┃▸❕ Download video from ig 36 | ┃▸ 37 | ┃▸📄 COMMAND: .gdrive 38 | ┃▸❕ Download drive files 39 | ┃▸ 40 | ┃▸📄 COMMAND: .twitter 41 | ┃▸❕ Download video from Twitter 42 | ┃▸ 43 | ┃▸📄 COMMAND: .img 44 | ┃▸❕ Download image 45 | ┃▸ 46 | ┃▸📄 COMMAND: .darama 47 | ┃▸❕ Download full episode video 48 | ┃▸ 49 | ┃▸📄 COMMAND: .play2 50 | ┃▸❕ Download Audio from yt 51 | ┃▸ 52 | ┃▸📄 COMMAND: .video2 53 | ┃▸❕ Download video from yt 54 | ┃▸ 55 | ┃▸📄 COMMAND: .baiscope 56 | ┃▸❕ Download video from baiscope 57 | ┃▸ 58 | ┃▸📄 COMMAND: .mfire 59 | ┃▸❕ Download mediafire files 60 | ╰━━━━━━━━━━━━⪼ 61 | 62 | ╭━❮ *ANMIE CMD* ❯━┈⊷ 63 | ┃▸ 64 | ┃▸📄 COMMAND: .yts 65 | ┃▸❕ Serch videos from yt 66 | ┃▸ 67 | ┃▸📄 COMMAND: .king 68 | ┃▸❕ get king about 69 | ┃▸ 70 | ┃▸📄 COMMAND: .dog 71 | ┃▸❕ get random dog imgs 72 | ┃▸ 73 | ┃▸📄 COMMAND: .anime 74 | ┃▸❕ get anime pics 75 | ┃▸ 76 | ┃▸📄 COMMAND: .animegirl 77 | ┃▸❕ get animegirl pics 78 | ┃▸ 79 | ┃▸📄 COMMAND: .loli 80 | ┃▸❕ get romantic anime pics 81 | ╰━━━━━━━━━━━━⪼ 82 | 83 | ╭━❮‍ *INFO CMD* ❯━┈⊷ 84 | ┃▸ 85 | ┃▸📄 COMMAND: .alive 86 | ┃▸❕ Check online or not 87 | ┃▸ 88 | ┃▸📄 COMMAND: .ping 89 | ┃▸❕ Check bot speed 90 | ┃▸ 91 | ┃▸📄 COMMAND: .menu 92 | ┃▸❕ Nero main menu 93 | ┃▸ 94 | ┃▸📄 COMMAND: .menu2 95 | ┃▸❕ Nero main menu2 96 | ┃▸ 97 | ┃▸📄 COMMAND: .ai 98 | ┃▸❕ chat with ai bot 99 | ┃▸ 100 | ┃▸📄 COMMAND: .system 101 | ┃▸❕ check bot systems 102 | ┃▸ 103 | ┃▸📄 COMMAND: .owner 104 | ┃▸❕ get owner info 105 | ┃▸ 106 | ┃▸📄 COMMAND: .status 107 | ┃▸❕ check bot runtime 108 | ┃▸ 109 | ┃▸📄 COMMAND: .about 110 | ┃▸❕ get about bot 111 | ┃▸ 112 | ┃▸📄 COMMAND: .list 113 | ┃▸❕ get bot command list 114 | ┃▸ 115 | ┃▸📄 COMMAND: .script 116 | ┃▸❕ get bot repository 117 | ╰━━━━━━━━━━━━⪼ 118 | 119 | ╭━❮ *OTHER CMD* ❯━┈⊷ 120 | ┃▸ 121 | ┃▸📄 COMMAND: .joke 122 | ┃▸❕ Get Rendom joke 123 | ┃▸ 124 | ┃▸📄 COMMAND: .fact 125 | ┃▸❕ Get Rendom fact 126 | ┃▸ 127 | ┃▸📄 COMMAND: .githubstalk 128 | ┃▸❕ Get github data any user 129 | ┃▸ 130 | ┃▸📄 COMMAND: .gpass 131 | ┃▸❕ Get a strong password 132 | ┃▸ 133 | ┃▸📄 COMMAND: .hack 134 | ┃▸❕ prank with friends 135 | ┃▸ 136 | ┃▸📄 COMMAND: .srepo 137 | ┃▸❕ serch repository 138 | ┃▸ 139 | ┃▸📄 COMMAND: .define 140 | ┃▸❕ serch any words 141 | ╰━━━━━━━━━━━━⪼ 142 | 143 | ╭━❮ *GROUP CMD* ❯━┈⊷ 144 | ┃▸ 145 | ┃▸📄 COMMAND: .mute 146 | ┃▸❕ Mute group 147 | ┃▸ 148 | ┃▸📄 COMMAND: .unmute 149 | ┃▸❕ Unmute group 150 | ┃▸ 151 | ┃▸📄 COMMAND: .left 152 | ┃▸❕ left group 153 | ┃▸ 154 | ┃▸📄 COMMAND: .jid 155 | ┃▸❕ group jid 156 | ┃▸ 157 | ┃▸📄 COMMAND: .remove 158 | ┃▸❕ remove member from group 159 | ┃▸ 160 | ┃▸📄 COMMAND: .delete 161 | ┃▸❕ remove sms from group 162 | ┃▸ 163 | ┃▸📄 COMMAND: .add 164 | ┃▸❕ add members in group 165 | ┃▸ 166 | ┃▸📄 COMMAND: .kick 167 | ┃▸❕ kick any user 168 | ┃▸ 169 | ┃▸📄 COMMAND: .kickall 170 | ┃▸❕ remove all members from group 171 | ┃▸ 172 | ┃▸📄 COMMAND: .setgoodbye 173 | ┃▸❕ set member leave sms 174 | ┃▸ 175 | ┃▸📄 COMMAND: .setwelcome 176 | ┃▸❕ set member welcome sms 177 | ┃▸ 178 | ┃▸📄 COMMAND: promote 179 | ┃▸❕ make group admin 180 | ┃▸ 181 | ┃▸📄 COMMAND: .demote 182 | ┃▸❕ dissmis any admin 183 | ┃▸ 184 | ┃▸📄 COMMAND: .tagall 185 | ┃▸❕ mention group all members 186 | ┃▸ 187 | ┃▸📄 COMMAND: .getpic 188 | ┃▸❕ get group profile 189 | ┃▸ 190 | ┃▸📄 COMMAND: .invite 191 | ┃▸❕ get group invite link 192 | ┃▸ 193 | ┃▸📄 COMMAND: .revoke 194 | ┃▸❕ reset group link 195 | ┃▸ 196 | ┃▸📄 COMMAND: .joinrequests 197 | ┃▸❕ cheack group panding members 198 | ┃▸ 199 | ┃▸📄 COMMAND: .allreq 200 | ┃▸❕ add group panding members 201 | ┃▸ 202 | ┃▸📄 COMMAND: .lockgc 203 | ┃▸❕ lock group private 204 | ┃▸ 205 | ┃▸📄 COMMAND: .unlockgc 206 | ┃▸❕ unlock group all 207 | ┃▸ 208 | ┃▸📄 COMMAND: .leave 209 | ┃▸❕ left any group 210 | ┃▸ 211 | ┃▸📄 COMMAND: .updategname 212 | ┃▸❕ set group name 213 | ┃▸ 214 | ┃▸📄 COMMAND: .updategdesc 215 | ┃▸❕ set group description 216 | ┃▸ 217 | ┃▸📄 COMMAND: .joim 218 | ┃▸❕ join invite link 219 | ┃▸ 220 | ┃▸📄 COMMAND: .hidetag 221 | ┃▸❕ mention any user hide 222 | ┃▸ 223 | ┃▸📄 COMMAND: .ginfo 224 | ┃▸❕ get group information 225 | ┃▸ 226 | ┃▸📄 COMMAND: .disappear on 227 | ┃▸❕ on disappear sms in group 228 | ┃▸ 229 | ┃▸📄 COMMAND: .disappear off 230 | ┃▸❕ off disappear sms in group 231 | ┃▸ 232 | ┃▸📄 COMMAND: .senddm 233 | ┃▸❕ send disappear sms in group 234 | ┃▸ 235 | ┃▸📄 COMMAND: .disappear 7d 24h 90d 236 | ┃▸❕ set time to disappear sms 237 | ╰━━━━━━━━━━━━⪼ 238 | 239 | ╭━❮ *OWNER CMD* ❯━┈⊷ 240 | ┃▸ 241 | ┃▸📄 COMMAND: .update 242 | ┃▸❕ update bot velue 243 | ┃▸ 244 | ┃▸📄 COMMAND: .restart 245 | ┃▸❕ restart your bot 246 | ┃▸ 247 | ┃▸📄 COMMAND: .settings 248 | ┃▸❕ see bot settings 249 | ┃▸ 250 | ┃▸📄 COMMAND: .owner 251 | ┃▸❕ get owner number 252 | ┃▸ 253 | ┃▸📄 COMMAND: .repo 254 | ┃▸❕ get bot repository 255 | ┃▸ 256 | ┃▸📄 COMMAND: .system 257 | ┃▸❕ check bot systems 258 | ┃▸ 259 | ┃▸📄 COMMAND: .block 260 | ┃▸❕ block any user 261 | ┃▸ 262 | ┃▸📄 COMMAND: .unblock 263 | ┃▸❕ unblock any user 264 | ┃▸ 265 | ┃▸📄 COMMAND: .shutdown 266 | ┃▸❕ logout your bot 267 | ┃▸ 268 | ┃▸📄 COMMAND: .clearchats 269 | ┃▸❕ clearchats from ib 270 | ┃▸ 271 | ┃▸📄 COMMAND: .setpp 272 | ┃▸❕ update profile pic 273 | ┃▸ 274 | ┃▸📄 COMMAND: .broadcast 275 | ┃▸❕ creat broadcast 276 | ┃▸ 277 | ┃▸📄 COMMAND: .jid 278 | ┃▸❕ get jid any user 279 | ┃▸ 280 | ┃▸📄 COMMAND: .gjid 281 | ┃▸❕ get group jid 282 | ╰━━━━━━━━━━━━⪼ 283 | 284 | ╭━❮ *CONVERT CMD* ❯━┈⊷ 285 | ┃▸ 286 | ┃▸📄 COMMAND: .sticker 287 | ┃▸❕ convert photo to sticker 288 | ┃▸ 289 | ┃▸📄 COMMAND: .tts 290 | ┃▸❕ change text to voice 291 | ┃▸ 292 | ┃▸📄 COMMAND: .trt 293 | ┃▸❕ change languages 294 | ╰━━━━━━━━━━━━⪼ 295 | > ${config.DESCRIPTION}`; 296 | 297 | await conn.sendMessage( 298 | from, 299 | { 300 | image: { url: `https://files.catbox.moe/0vldgh.jpeg` }, 301 | caption: dec, 302 | contextInfo: { 303 | mentionedJid: [m.sender], 304 | forwardingScore: 999, 305 | isForwarded: true, 306 | forwardedNewsletterMessageInfo: { 307 | newsletterJid: '120363200367779016@newsletter', 308 | newsletterName: 'SILVA TECH INC🥰🦄', 309 | serverMessageId: 143 310 | } 311 | } 312 | }, 313 | { quoted: mek } 314 | ); 315 | 316 | // Send audio 317 | await conn.sendMessage(from, { 318 | audio: { url: 'https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/sigma.m4a' }, 319 | mimetype: 'audio/mp4', 320 | ptt: true 321 | }, { quoted: mek }); 322 | 323 | } catch (e) { 324 | console.log(e); 325 | reply(`${e}`); 326 | } 327 | }); 328 | -------------------------------------------------------------------------------- /plugins/main.js: -------------------------------------------------------------------------------- 1 | const config = require('../config') 2 | const { cmd, commands } = require('../command'); 3 | const os = require("os") 4 | const {runtime} = require('../lib/functions') 5 | const axios = require('axios') 6 | 7 | cmd({ 8 | pattern: "menu2", 9 | alias: "allmenu", 10 | desc: "menu the bot", 11 | category: "menu", 12 | react: "⚡", 13 | filename: __filename 14 | }, 15 | 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 }) => { 16 | try { 17 | let dec = `╭━━━〔 *${config.BOT_NAME}* 〕━━━┈⊷ 18 | ┃★╭────────────── 19 | ┃★│ Owner : *${config.OWNER_NAME}* 20 | ┃★│ Baileys : *Multi Device* 21 | ┃★│ Type : *NodeJs* 22 | ┃★│ Platform : *Heroku* 23 | ┃★│ Mode : *[${config.MODE}]* 24 | ┃★│ Prifix : *[${config.PREFIX}]* 25 | ┃★│ Version : *1.0.0* 26 | ┃★╰────────────── 27 | ╰━━━━━━━━━━━━━━━┈⊷ 28 | ╭━━〔 *Download Menu* 〕━━┈⊷ 29 | ┃◈╭─────────────·๏ 30 | ┃◈┃• facebook 31 | ┃◈┃• mediafire 32 | ┃◈┃• tiktok 33 | ┃◈┃• twitter 34 | ┃◈┃• Insta 35 | ┃◈┃• apk 36 | ┃◈┃• img 37 | ┃◈┃• tt2 38 | ┃◈┃• git 39 | ┃◈┃• spotify 40 | ┃◈┃• play 41 | ┃◈┃• play2 42 | ┃◈┃• play3 43 | ┃◈┃• audio 44 | ┃◈┃• video 45 | ┃◈┃• video2 46 | ┃◈┃• ytmp3 47 | ┃◈┃• ytmp4 48 | ┃◈┃• song 49 | ┃◈┃• darama 50 | ┃◈┃• gdrive 51 | ┃◈┃• smovie 52 | ┃◈┃• baiscope 53 | ┃◈┃• ginisilia 54 | ┃◈└───────────┈⊷ 55 | ╰──────────────┈⊷ 56 | ╭━━〔 *Group Menu* 〕━━┈⊷ 57 | ┃◈╭─────────────·๏ 58 | ┃◈┃• grouplink 59 | ┃◈┃• kickall 60 | ┃◈┃• kickall2 61 | ┃◈┃• kickall3 62 | ┃◈┃• add 63 | ┃◈┃• remove 64 | ┃◈┃• kick 65 | ┃◈┃• promote 66 | ┃◈┃• demote 67 | ┃◈┃• dismiss 68 | ┃◈┃• revoke 69 | ┃◈┃• setgoodbye 70 | ┃◈┃• setwelcome 71 | ┃◈┃• delete 72 | ┃◈┃• getpic 73 | ┃◈┃• ginfo 74 | ┃◈┃• delete 75 | ┃◈┃• disappear on 76 | ┃◈┃• disappear off 77 | ┃◈┃• disappear 7D,24H 78 | ┃◈┃• allreq 79 | ┃◈┃• updategname 80 | ┃◈┃• updategdesc 81 | ┃◈┃• joinrequests 82 | ┃◈┃• senddm 83 | ┃◈┃• nikal 84 | ┃◈┃• mute 85 | ┃◈┃• unmute 86 | ┃◈┃• lockgc 87 | ┃◈┃• unlockgc 88 | ┃◈┃• invite 89 | ┃◈┃• tag 90 | ┃◈┃• hidetag 91 | ┃◈┃• tagall 92 | ┃◈┃• tagadmins 93 | ┃◈└───────────┈⊷ 94 | ╰──────────────┈⊷ 95 | ╭━━〔 *Owner Menu* 〕━━┈⊷ 96 | ┃◈╭─────────────·๏ 97 | ┃◈┃• owner 98 | ┃◈┃• menu 99 | ┃◈┃• menu2 100 | ┃◈┃• vv 101 | ┃◈┃• listcmd 102 | ┃◈┃• allmenu 103 | ┃◈┃• repo 104 | ┃◈┃• block 105 | ┃◈┃• unblock 106 | ┃◈┃• fullpp 107 | ┃◈┃• setpp 108 | ┃◈┃• restart 109 | ┃◈┃• shutdown 110 | ┃◈┃• updatecmd 111 | ┃◈┃• alive 112 | ┃◈┃• ping 113 | ┃◈┃• gjid 114 | ┃◈┃• jid 115 | ┃◈└───────────┈⊷ 116 | ╰──────────────┈⊷ 117 | ╭━━〔 *Fun Menu* 〕━━┈⊷ 118 | ┃◈╭─────────────·๏ 119 | ┃◈┃• insult 120 | ┃◈┃• hack 121 | ┃◈┃• ship 122 | ┃◈┃• character 123 | ┃◈┃• pickup 124 | ┃◈┃• joke 125 | ┃◈┃• hrt 126 | ┃◈┃• hpy 127 | ┃◈┃• syd 128 | ┃◈┃• anger 129 | ┃◈┃• shy 130 | ┃◈┃• kiss 131 | ┃◈┃• mon 132 | ┃◈┃• cunfuzed 133 | ┃◈┃• setpp 134 | ┃◈┃• hand 135 | ┃◈┃• nikal 136 | ┃◈┃• hold 137 | ┃◈┃• hug 138 | ┃◈┃• nikal 139 | ┃◈┃• hifi 140 | ┃◈┃• poke 141 | ┃◈└───────────┈⊷ 142 | ╰──────────────┈⊷ 143 | ╭━━〔 *Convert Menu* 〕━━┈⊷ 144 | ┃◈╭─────────────·๏ 145 | ┃◈┃• sticker 146 | ┃◈┃• sticker2 147 | ┃◈┃• fancy 148 | ┃◈┃• take 149 | ┃◈┃• tomp3 150 | ┃◈┃• tts 151 | ┃◈┃• trt 152 | ┃◈└───────────┈⊷ 153 | ╰──────────────┈⊷ 154 | ╭━━〔 *Ai Menu* 〕━━┈⊷ 155 | ┃◈╭─────────────·๏ 156 | ┃◈┃• ai 157 | ┃◈┃• gpt 158 | ┃◈┃• meta 159 | ┃◈┃• blackbox 160 | ┃◈┃• gpt4 161 | ┃◈┃• bing 162 | ┃◈┃• copilot 163 | ┃◈└───────────┈⊷ 164 | ╰──────────────┈⊷ 165 | ╭━━〔 *Main Menu* 〕━━┈⊷ 166 | ┃◈╭─────────────·๏ 167 | ┃◈┃• ping 168 | ┃◈┃• ping2 169 | ┃◈┃• speed 170 | ┃◈┃• live 171 | ┃◈┃• alive 172 | ┃◈┃• runtime 173 | ┃◈┃• uptime 174 | ┃◈┃• repo 175 | ┃◈┃• owner 176 | ┃◈┃• menu 177 | ┃◈┃• menu2 178 | ┃◈┃• restart 179 | ┃◈└───────────┈⊷ 180 | ╰──────────────┈⊷ 181 | ╭━━〔 *Anime Menu* 〕━━┈⊷ 182 | ┃◈╭─────────────·๏ 183 | ┃◈┃• fack 184 | ┃◈┃• dog 185 | ┃◈┃• awoo 186 | ┃◈┃• garl 187 | ┃◈┃• waifu 188 | ┃◈┃• neko 189 | ┃◈┃• megnumin 190 | ┃◈┃• neko 191 | ┃◈┃• maid 192 | ┃◈┃• loli 193 | ┃◈┃• animegirl 194 | ┃◈┃• animegirl 195 | ┃◈┃• animegirl1 196 | ┃◈┃• animegirl2 197 | ┃◈┃• animegirl3 198 | ┃◈┃• animegirl4 199 | ┃◈┃• animegirl5 200 | ┃◈┃• anime1 201 | ┃◈┃• anime1 202 | ┃◈┃• anime2 203 | ┃◈┃• anime3 204 | ┃◈┃• anime4 205 | ┃◈┃• anime5 206 | ┃◈┃• animenews 207 | ┃◈┃• foxgirl 208 | ┃◈┃• naruto 209 | ┃◈└───────────┈⊷ 210 | ╰──────────────┈⊷ 211 | ╭━━〔 *Other Menu* 〕━━┈⊷ 212 | ┃◈╭─────────────·๏ 213 | ┃◈┃• fact 214 | ┃◈┃• pair 215 | ┃◈┃• pair2 216 | ┃◈┃• fancy 217 | ┃◈┃• logo 218 | ┃◈┃• define 219 | ┃◈┃• news 220 | ┃◈┃• movie 221 | ┃◈┃• weather 222 | ┃◈┃• srepo 223 | ┃◈┃• insult 224 | ┃◈┃• save 225 | ┃◈┃• wikipedia 226 | ┃◈┃• gpass 227 | ┃◈┃• githubstalk 228 | ┃◈┃• yts 229 | ┃◈┃• ytv 230 | ┃◈└───────────┈⊷ 231 | ╰──────────────┈⊷ 232 | > ${config.DESCRIPTION}`; 233 | 234 | await conn.sendMessage( 235 | from, 236 | { 237 | image: { url: `https://i.imgur.com/PEZ5QL2.jpeg` }, 238 | caption: dec, 239 | contextInfo: { 240 | mentionedJid: [m.sender], 241 | forwardingScore: 999, 242 | isForwarded: true, 243 | forwardedNewsletterMessageInfo: { 244 | newsletterJid: '120363200367779016@newsletter', 245 | newsletterName: 'SILVA SPARK MD 💖🦄', 246 | serverMessageId: 143 247 | } 248 | } 249 | }, 250 | { quoted: mek } 251 | ); 252 | 253 | // Send audio 254 | await conn.sendMessage(from, { 255 | audio: { url: 'https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/sigma.m4a' }, 256 | mimetype: 'audio/mp4', 257 | ptt: true 258 | }, { quoted: mek }); 259 | 260 | } catch (e) { 261 | console.log(e); 262 | reply(`${e}`); 263 | } 264 | }); 265 | -------------------------------------------------------------------------------- /plugins/menu.js: -------------------------------------------------------------------------------- 1 | const config = require('../config'); 2 | const { cmd, commands } = require('../command'); 3 | const os = require("os"); 4 | const { runtime } = require('../lib/functions'); 5 | const axios = require('axios'); 6 | 7 | // Visual Elements 8 | const rainbow = ['💥', '💥']; 9 | const emojis = ['✨', '⚡', '🌟', '💫', '🎀', '🧿', '💠', '🔮', '🌈']; 10 | 11 | const randomEmoji = () => emojis.sort(() => 0.5 - Math.random()).slice(0, 3).join(''); 12 | const divider = (length = 20, char = '─') => char.repeat(length); 13 | 14 | // Helper function for sending messages 15 | async function sendMenu(conn, from, mek, sender, text, title, sendAudio = false) { 16 | try { 17 | await conn.sendMessage(from, { 18 | image: { url: `https://files.catbox.moe/0vldgh.jpeg` }, 19 | caption: text, 20 | contextInfo: { 21 | mentionedJid: [sender], 22 | forwardingScore: 999, 23 | isForwarded: true, 24 | forwardedNewsletterMessageInfo: { 25 | newsletterJid: '120363200367779016@newsletter', 26 | newsletterName: 'SILVA SPARK MD 💖🦄', 27 | serverMessageId: 143 28 | } 29 | } 30 | }, { quoted: mek }); 31 | 32 | if (sendAudio) { 33 | await conn.sendMessage(from, { 34 | audio: { url: 'https://files.catbox.moe/a1sh4u.mp3' }, 35 | mimetype: 'audio/mp4', 36 | ptt: true 37 | }, { quoted: mek }); 38 | } 39 | } catch (e) { 40 | console.error(`Menu Error (${title}):`, e); 41 | throw e; 42 | } 43 | } 44 | 45 | // Main Menu 46 | cmd({ 47 | pattern: "menu", 48 | desc: "Display all bot commands", 49 | category: "menu", 50 | react: "💖", 51 | filename: __filename 52 | }, async (conn, mek, m, { from, reply }) => { 53 | try { 54 | const menuText = ` 55 | ╭━━━━━━━━━━━━━━━━━━━━╮ 56 | ✨ SILVA SPARK MD ✨ 57 | ╰━━━━━━━━━━━━━━━━━━━━╯ 58 | 59 | ${rainbow.join('')} BOT INFORMATION ${rainbow.reverse().join('')} 60 | 👑 Owner » ${config.OWNER_NAME} 61 | 📱 Version » 1.0.0 62 | ⚙️ Mode » ${config.MODE.toUpperCase()} 63 | 🔣 Prefix » [${config.PREFIX}] 64 | ⏳ Runtime » ${runtime(process.uptime())} 65 | ${divider(30)} 66 | 67 | ${rainbow.join('')} COMMAND CATEGORIES ${rainbow.reverse().join('')} 68 | ${randomEmoji()} » ${config.PREFIX}aimenu (AI Tools) 69 | ${randomEmoji()} » ${config.PREFIX}animemenu (Anime) 70 | ${randomEmoji()} » ${config.PREFIX}convertmenu (Converters) 71 | ${randomEmoji()} » ${config.PREFIX}funmenu (Fun) 72 | ${randomEmoji()} » ${config.PREFIX}dlmenu (Downloads) 73 | ${randomEmoji()} » ${config.PREFIX}groupmenu (Group) 74 | ${randomEmoji()} » ${config.PREFIX}ownermenu (Owner) 75 | ${randomEmoji()} » ${config.PREFIX}othermenu (Utilities) 76 | ${divider(30)} 77 | 78 | 💡 Type ${config.PREFIX} to use 79 | ${config.DESCRIPTION} 80 | `; 81 | 82 | await sendMenu(conn, from, mek, m.sender, menuText, 'Main Menu', true); 83 | } catch (e) { 84 | reply(`❌ Error: ${e.message}`); 85 | } 86 | }); 87 | 88 | // AI Menu 89 | cmd({ 90 | pattern: "aimenu", 91 | desc: "AI commands menu", 92 | category: "menu", 93 | react: "🤖", 94 | filename: __filename 95 | }, async (conn, mek, m, { from, reply }) => { 96 | try { 97 | const aiMenu = ` 98 | ╭━━━━━━━━━━━━━━━━━━━━╮ 99 | 🧠 AI POWER MENU 🧠 100 | ╰━━━━━━━━━━━━━━━━━━━━╯ 101 | 102 | ${rainbow.join('')} AI CHATBOTS ${rainbow.reverse().join('')} 103 | • ai » General AI assistant 104 | • gpt » ChatGPT interaction 105 | • gpt4 » GPT-4 model 106 | • meta » Meta AI 107 | • bing » Microsoft Bing AI 108 | • copilot » GitHub Copilot 109 | • blackbox » Code specialist 110 | 111 | ${rainbow.join('')} TOOLS ${rainbow.reverse().join('')} 112 | • tts » Text to speech 113 | • trt » Translate text 114 | • fancy » Fancy text generator 115 | 116 | ${divider(30)} 117 | 💡 Example: ${config.PREFIX}gpt How does AI work? 118 | `; 119 | 120 | await sendMenu(conn, from, mek, m.sender, aiMenu, 'AI Menu'); 121 | } catch (e) { 122 | reply(`❌ Error: ${e.message}`); 123 | } 124 | }); 125 | 126 | // Anime Menu 127 | cmd({ 128 | pattern: "animemenu", 129 | desc: "Anime commands menu", 130 | category: "menu", 131 | react: "🧚", 132 | filename: __filename 133 | }, async (conn, mek, m, { from, reply }) => { 134 | try { 135 | const animeMenu = ` 136 | ╭━━━━━━━━━━━━━━━━━━━━╮ 137 | 🎌 ANIME WORLD 🎌 138 | ╰━━━━━━━━━━━━━━━━━━━━╯ 139 | 140 | ${rainbow.join('')} CHARACTERS ${rainbow.reverse().join('')} 141 | • waifu » Random waifu 142 | • neko » Cute neko girl 143 | • maid » Anime maid 144 | • loli » Loli character 145 | • foxgirl » Fox girl 146 | • naruto » Naruto character 147 | 148 | ${rainbow.join('')} CONTENT ${rainbow.reverse().join('')} 149 | • animenews » Latest news 150 | • animegirl » Random girl 151 | • anime1-5 » Different styles 152 | • fack » Anime facts 153 | • dog » Anime dogs 154 | 155 | ${rainbow.join('')} REACTIONS ${rainbow.reverse().join('')} 156 | • hug » Anime hug gif 157 | • kiss » Anime kiss gif 158 | • poke » Anime poke gif 159 | 160 | ${divider(30)} 161 | 🎀 Enjoy anime content! 162 | `; 163 | 164 | await sendMenu(conn, from, mek, m.sender, animeMenu, 'Anime Menu'); 165 | } catch (e) { 166 | reply(`❌ Error: ${e.message}`); 167 | } 168 | }); 169 | 170 | // Download Menu 171 | cmd({ 172 | pattern: "dlmenu", 173 | desc: "Download commands menu", 174 | category: "menu", 175 | react: "💚", 176 | filename: __filename 177 | }, async (conn, mek, m, { from, reply }) => { 178 | try { 179 | const dlMenu = ` 180 | ╭━━━━━━━━━━━━━━━━━━━━╮ 181 | 📥 DOWNLOAD CENTER 📥 182 | ╰━━━━━━━━━━━━━━━━━━━━╯ 183 | 184 | ${rainbow.join('')} SOCIAL MEDIA ${rainbow.reverse().join('')} 185 | • facebook » FB video 186 | • tiktok » TikTok video 187 | • twitter » X/Twitter video 188 | • insta » Instagram media 189 | 190 | ${rainbow.join('')} MUSIC/VIDEO ${rainbow.reverse().join('')} 191 | • play » YT audio 192 | • ytmp3 » YT to MP3 193 | • ytmp4 » YT to MP4 194 | • spotify » Track download 195 | • audio » Audio extractor 196 | • video » Video downloader 197 | 198 | ${rainbow.join('')} FILES ${rainbow.reverse().join('')} 199 | • mediafire » MediaFire 200 | • apk » APK files 201 | • git » GitHub repos 202 | • gdrive » Google Drive 203 | 204 | ${divider(30)} 205 | 🔍 Usage: ${config.PREFIX}command 206 | `; 207 | 208 | await sendMenu(conn, from, mek, m.sender, dlMenu, 'Download Menu'); 209 | } catch (e) { 210 | reply(`❌ Error: ${e.message}`); 211 | } 212 | }); 213 | 214 | // Group Menu 215 | cmd({ 216 | pattern: "groupmenu", 217 | desc: "Group commands menu", 218 | category: "menu", 219 | react: "🥰", 220 | filename: __filename 221 | }, async (conn, mek, m, { from, reply }) => { 222 | try { 223 | const groupMenu = ` 224 | ╭━━━━━━━━━━━━━━━━━━━━╮ 225 | 🧑‍🤝‍🧑 GROUP MANAGER 🧑‍🤝‍🧑 226 | ╰━━━━━━━━━━━━━━━━━━━━╯ 227 | 228 | ${rainbow.join('')} ADMIN TOOLS ${rainbow.reverse().join('')} 229 | • add » Add members 230 | • kick » Remove member 231 | • promote » Make admin 232 | • demote » Remove admin 233 | • grouplink » Get invite 234 | • revoke » Reset link 235 | 236 | ${rainbow.join('')} SETTINGS ${rainbow.reverse().join('')} 237 | • setwelcome » Welcome msg 238 | • setgoodbye » Goodbye msg 239 | • updategname » Change name 240 | • updategdesc » Change desc 241 | • lockgc » Lock group 242 | • unlockgc » Unlock group 243 | 244 | ${rainbow.join('')} UTILITIES ${rainbow.reverse().join('')} 245 | • tagall » Mention all 246 | • hidetag » Hidden mention 247 | • getpic » Get group icon 248 | • ginfo » Group info 249 | 250 | ${divider(30)} 251 | ⚠️ Admin privileges required 252 | `; 253 | 254 | await sendMenu(conn, from, mek, m.sender, groupMenu, 'Group Menu'); 255 | } catch (e) { 256 | reply(`❌ Error: ${e.message}`); 257 | } 258 | }); 259 | 260 | // Fun Menu 261 | cmd({ 262 | pattern: "funmenu", 263 | desc: "Fun commands menu", 264 | category: "menu", 265 | react: "😎", 266 | filename: __filename 267 | }, async (conn, mek, m, { from, reply }) => { 268 | try { 269 | const funMenu = ` 270 | ╭━━━━━━━━━━━━━━━━━━━━╮ 271 | 🎉 FUN & GAMES 🎉 272 | ╰━━━━━━━━━━━━━━━━━━━━╯ 273 | 274 | ${rainbow.join('')} INTERACTIVE ${rainbow.reverse().join('')} 275 | • ship » Ship two users 276 | • character » Create avatar 277 | • hack » Fake hack 278 | • joke » Random joke 279 | • insult » Funny roast 280 | • pickup » Pickup lines 281 | 282 | ${rainbow.join('')} REACTIONS ${rainbow.reverse().join('')} 283 | • hug » Send hug 284 | • kiss » Send kiss 285 | • poke » Poke someone 286 | • slap » Slap someone 287 | • pat » Head pats 288 | 289 | ${rainbow.join('')} EXPRESSIONS ${rainbow.reverse().join('')} 290 | • hrt » Heart eyes 291 | • hpy » Happy face 292 | • anger » Angry face 293 | • shy » Shy reaction 294 | 295 | ${divider(30)} 296 | 🎲 Try them all for fun! 297 | `; 298 | 299 | await sendMenu(conn, from, mek, m.sender, funMenu, 'Fun Menu'); 300 | } catch (e) { 301 | reply(`❌ Error: ${e.message}`); 302 | } 303 | }); 304 | 305 | // Owner Menu 306 | cmd({ 307 | pattern: "ownermenu", 308 | desc: "Owner commands menu", 309 | category: "menu", 310 | react: "🔰", 311 | filename: __filename 312 | }, async (conn, mek, m, { from, reply }) => { 313 | try { 314 | const ownerMenu = ` 315 | ╭━━━━━━━━━━━━━━━━━━━━╮ 316 | 👑 OWNER COMMANDS 👑 317 | ╰━━━━━━━━━━━━━━━━━━━━╯ 318 | 319 | ${rainbow.join('')} BOT CONTROL ${rainbow.reverse().join('')} 320 | • restart » Restart bot 321 | • shutdown » Stop bot 322 | • updatecmd » Update 323 | • block » Block user 324 | • unblock » Unblock 325 | 326 | ${rainbow.join('')} PROFILE ${rainbow.reverse().join('')} 327 | • setpp » Set profile pic 328 | • fullpp » Full profile 329 | • menu » Show menu 330 | • menu2 » Alternative menu 331 | 332 | ${rainbow.join('')} DEBUGGING ${rainbow.reverse().join('')} 333 | • gjid » Get group JID 334 | • jid » Get user JID 335 | • listcmd » All commands 336 | • allmenu » Complete menu 337 | 338 | ${divider(30)} 339 | 🔒 Restricted to owner only 340 | `; 341 | 342 | await sendMenu(conn, from, mek, m.sender, ownerMenu, 'Owner Menu'); 343 | } catch (e) { 344 | reply(`❌ Error: ${e.message}`); 345 | } 346 | }); 347 | 348 | // Convert Menu 349 | cmd({ 350 | pattern: "convertmenu", 351 | desc: "Conversion commands menu", 352 | category: "menu", 353 | react: "🥀", 354 | filename: __filename 355 | }, async (conn, mek, m, { from, reply }) => { 356 | try { 357 | const convertMenu = ` 358 | ╭━━━━━━━━━━━━━━━━━━━━╮ 359 | 🔄 CONVERTER TOOLS 🔄 360 | ╰━━━━━━━━━━━━━━━━━━━━╯ 361 | 362 | ${rainbow.join('')} MEDIA CONVERSION ${rainbow.reverse().join('')} 363 | • sticker » Image to sticker 364 | • sticker2 » Video to sticker 365 | • tomp3 » Media to audio 366 | • take » Take sticker 367 | 368 | ${rainbow.join('')} TEXT TOOLS ${rainbow.reverse().join('')} 369 | • tts » Text to speech 370 | • trt » Translate text 371 | • fancy » Stylish text 372 | • font » Different fonts 373 | 374 | ${rainbow.join('')} OTHER ${rainbow.reverse().join('')} 375 | • img » Image editor 376 | • vv » View once tools 377 | 378 | ${divider(30)} 379 | 🛠️ Powerful conversion tools 380 | `; 381 | 382 | await sendMenu(conn, from, mek, m.sender, convertMenu, 'Convert Menu'); 383 | } catch (e) { 384 | reply(`❌ Error: ${e.message}`); 385 | } 386 | }); 387 | 388 | // Other Menu 389 | cmd({ 390 | pattern: "othermenu", 391 | desc: "Utility commands menu", 392 | category: "menu", 393 | react: "🤖", 394 | filename: __filename 395 | }, async (conn, mek, m, { from, reply }) => { 396 | try { 397 | const otherMenu = ` 398 | ╭━━━━━━━━━━━━━━━━━━━━╮ 399 | 🛠️ UTILITY TOOLS 🛠️ 400 | ╰━━━━━━━━━━━━━━━━━━━━╯ 401 | 402 | ${rainbow.join('')} INFORMATION ${rainbow.reverse().join('')} 403 | • weather » Weather report 404 | • news » Latest news 405 | • movie » Movie info 406 | • define » Dictionary 407 | • wikipedia » Wiki search 408 | • fact » Interesting facts 409 | 410 | ${rainbow.join('')} SOCIAL ${rainbow.reverse().join('')} 411 | • githubstalk » GitHub info 412 | • pair » Match users 413 | • pair2 » Alternative match 414 | • vv » View once tools 415 | 416 | ${rainbow.join('')} DEVELOPER ${rainbow.reverse().join('')} 417 | • srepo » Search repos 418 | • gpass » Generate password 419 | • yts » YT search 420 | • ytv » YT video search 421 | 422 | ${divider(30)} 423 | 🔧 Useful everyday tools 424 | `; 425 | 426 | await sendMenu(conn, from, mek, m.sender, otherMenu, 'Utility Menu'); 427 | } catch (e) { 428 | reply(`❌ Error: ${e.message}`); 429 | } 430 | }); -------------------------------------------------------------------------------- /plugins/movie.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const { cmd } = require('../command'); 3 | const config = require('../config'); // Ensure your API key is in config 4 | 5 | cmd({ 6 | pattern: "movie", 7 | desc: "Fetch detailed information about a movie.", 8 | category: "utility", 9 | react: "🎬", 10 | filename: __filename 11 | }, 12 | 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 }) => { 13 | try { 14 | const movieName = args.join(' '); 15 | if (!movieName) { 16 | return reply("📽️ Please provide the name of the movie."); 17 | } 18 | 19 | const apiUrl = `http://www.omdbapi.com/?t=${encodeURIComponent(movieName)}&apikey=${config.OMDB_API_KEY}`; 20 | const response = await axios.get(apiUrl); 21 | 22 | const data = response.data; 23 | if (data.Response === "False") { 24 | return reply("🚫 Movie not found."); 25 | } 26 | 27 | const movieInfo = ` 28 | 🎬 *Silva Spark Movie Information* 🎬 29 | 30 | 🎥 *Title:* ${data.Title} 31 | 📅 *Year:* ${data.Year} 32 | 🌟 *Rated:* ${data.Rated} 33 | 📆 *Released:* ${data.Released} 34 | ⏳ *Runtime:* ${data.Runtime} 35 | 🎭 *Genre:* ${data.Genre} 36 | 🎬 *Director:* ${data.Director} 37 | ✍️ *Writer:* ${data.Writer} 38 | 🎭 *Actors:* ${data.Actors} 39 | 📝 *Plot:* ${data.Plot} 40 | 🌍 *Language:* ${data.Language} 41 | 🇺🇸 *Country:* ${data.Country} 42 | 🏆 *Awards:* ${data.Awards} 43 | ⭐ *IMDB Rating:* ${data.imdbRating} 44 | 🗳️ *IMDB Votes:* ${data.imdbVotes} 45 | `; 46 | 47 | // Define the image URL 48 | const imageUrl = data.Poster && data.Poster !== 'N/A' ? data.Poster : config.ALIVE_IMG; 49 | 50 | // Send the movie information along with the poster image 51 | await conn.sendMessage(from, { 52 | image: { url: imageUrl }, 53 | caption: `${movieInfo}\n> ©ᴘᴏᴡᴇʀᴇᴅ ʙʏ Jᴀᴡᴀᴅ TᴇᴄʜX` 54 | }, { quoted: mek }); 55 | } catch (e) { 56 | console.log(e); 57 | reply(`❌ Error: ${e.message}`); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /plugins/music.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const ytSearch = require("yt-search"); 3 | const { cmd } = require("../command"); 4 | 5 | cmd({ 6 | pattern: "audio3", 7 | alias: ["spotify", "ytmusic", "play"], 8 | react: "🎵", 9 | desc: "Fetch audio from Spotify or YouTube", 10 | category: "media", 11 | filename: __filename 12 | }, async (client, message, details, context) => { 13 | const { from, q, reply } = context; 14 | 15 | if (!q) return reply("❌ What song do you want to download?"); 16 | reply("🔄 *Silva Spark Bot fetching your audio...*\n\n*Please wait...* 🎧"); 17 | 18 | try { 19 | let search = await ytSearch(q); 20 | let video = search.videos[0]; 21 | if (!video) return reply("❌ No results found. Please refine your search."); 22 | 23 | let link = video.url; 24 | let apis = [ 25 | `https://apis.davidcyriltech.my.id/youtube/mp3?url=${link}`, 26 | `https://api.ryzendesu.vip/api/downloader/ytmp3?url=${link}` 27 | ]; 28 | 29 | for (const api of apis) { 30 | try { 31 | let { data } = await axios.get(api); 32 | if (data.status === 200 || data.success) { 33 | let audioUrl = data.result?.downloadUrl || data.url; 34 | let songData = { 35 | title: data.result?.title || video.title, 36 | artist: data.result?.author || video.author.name, 37 | thumbnail: data.result?.image || video.thumbnail, 38 | videoUrl: link 39 | }; 40 | 41 | await client.sendMessage(from, { 42 | image: { url: songData.thumbnail }, 43 | caption: `SYLIVANUS THE SILVA SPARK BOT\n╭═════════════════⊷\n║ 🎶 *Title:* ${songData.title}\n║ 🎤 *Artist:* ${songData.artist}\n║ 🔗 *No URL Sharing*\n╰═════════════════⊷\n*Powered by SILVA SPARK BOT*` 44 | }); 45 | 46 | reply("📤 *Sending your audio...* 🎼"); 47 | 48 | await client.sendMessage(from, { 49 | audio: { url: audioUrl }, 50 | mimetype: "audio/mp4" 51 | }); 52 | 53 | reply("📤 *Sending your MP3 file...* 🎶"); 54 | 55 | await client.sendMessage(from, { 56 | document: { url: audioUrl }, 57 | mimetype: "audio/mp3", 58 | fileName: `${songData.title.replace(/[^a-zA-Z0-9 ]/g, "")}.mp3` 59 | }); 60 | 61 | reply("✅ *Silva Spark – World-class bot just successfully sent you what you requested! 🎶*"); 62 | return; 63 | } 64 | } catch (e) { 65 | console.error(`API Error (${api}):`, e.message); 66 | continue; 67 | } 68 | } 69 | 70 | reply("⚠️ An error occurred. All APIs might be down or unable to process the request."); 71 | } catch (error) { 72 | reply("❌ Download failed\n" + error.message); 73 | } 74 | }); -------------------------------------------------------------------------------- /plugins/news.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const { cmd } = require('../command'); 3 | 4 | cmd({ 5 | pattern: "news", 6 | desc: "Get the latest news headlines.", 7 | category: "news", 8 | react: "📰", 9 | filename: __filename 10 | }, 11 | async (conn, mek, m, { from, reply }) => { 12 | try { 13 | const apiKey="0f2c43ab11324578a7b1709651736382"; 14 | const response = await axios.get(`https://newsapi.org/v2/top-headlines?country=ke&apiKey=${apiKey}`); 15 | const articles = response.data.articles; 16 | 17 | if (!articles.length) return reply("No news articles found."); 18 | 19 | // Send each article as a separate message with image and title 20 | for (let i = 0; i < Math.min(articles.length, 5); i++) { 21 | const article = articles[i]; 22 | let message = ` 23 | 📰 *${article.title}* 24 | ⚠️ _${article.description}_ 25 | 🔗 _${article.url}_ 26 | 27 | ©⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈ 28 | `; 29 | 30 | console.log('Article URL:', article.urlToImage); // Log image URL for debugging 31 | 32 | if (article.urlToImage) { 33 | // Send image with caption 34 | await conn.sendMessage(from, { image: { url: article.urlToImage }, caption: message }); 35 | } else { 36 | // Send text message if no image is available 37 | await conn.sendMessage(from, { text: message }); 38 | } 39 | }; 40 | } catch (e) { 41 | console.error("Error fetching news:", e); 42 | reply("Could not fetch news. Please try again later."); 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /plugins/owner.js: -------------------------------------------------------------------------------- 1 | const { cmd } = require('../command'); 2 | const config = require('../config'); 3 | 4 | cmd({ 5 | pattern: "owner", 6 | react: "🦋", 7 | desc: "Get owner number", 8 | category: "main", 9 | filename: __filename 10 | }, 11 | async (conn, mek, m, { from }) => { 12 | try { 13 | const ownerNumber = config.OWNER_NUMBER; // Fetch owner number from config 14 | const ownerName = config.OWNER_NAME; // Fetch owner name from config 15 | 16 | const vcard = 'BEGIN:VCARD\n' + 17 | 'VERSION:3.0\n' + 18 | `FN:${ownerName}\n` + 19 | `TEL;type=CELL;type=VOICE;waid=${ownerNumber.replace('+', '')}:${ownerNumber}\n` + 20 | 'END:VCARD'; 21 | 22 | // Send the vCard 23 | const sentVCard = await conn.sendMessage(from, { 24 | contacts: { 25 | displayName: ownerName, 26 | contacts: [{ vcard }] 27 | } 28 | }); 29 | 30 | // Send the owner contact message with image and audio 31 | await conn.sendMessage(from, { 32 | image: { url: 'https://files.catbox.moe/0vldgh.jpeg' }, // Image URL from your request 33 | caption: `╭━━〔 *⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈* 〕━━┈⊷ 34 | ┃◈╭─────────────·๏ 35 | ┃◈┃• *Here is the owner details* 36 | ┃◈┃• *Name* - ${ownerName} 37 | ┃◈┃• *Number* ${ownerNumber} 38 | ┃◈┃• *Version*: 2.0.1 39 | ┃◈└───────────┈⊷ 40 | ╰──────────────┈⊷ 41 | > ©⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈`, // Display the owner's details 42 | contextInfo: { 43 | mentionedJid: [`${ownerNumber.replace('+', '')}@s.whatsapp.net`], 44 | forwardingScore: 999, 45 | isForwarded: true, 46 | forwardedNewsletterMessageInfo: { 47 | newsletterJid: '120363200367779016@newsletter', 48 | newsletterName: 'SILVA DEVELOPERS🥰💖🥰', 49 | serverMessageId: 143 50 | } 51 | } 52 | }, { quoted: mek }); 53 | 54 | // Send audio as per your request 55 | await conn.sendMessage(from, { 56 | audio: { url: 'https://github.com/JawadYTX/KHAN-DATA/raw/refs/heads/main/autovoice/contact.m4a' }, // Audio URL 57 | mimetype: 'audio/mp4', 58 | ptt: true 59 | }, { quoted: mek }); 60 | 61 | } catch (error) { 62 | console.error(error); 63 | reply(`An error occurred: ${error.message}`); 64 | } 65 | }); 66 | -------------------------------------------------------------------------------- /plugins/ownermsg.js: -------------------------------------------------------------------------------- 1 | const { cmd ,commands } = require('../command'); 2 | const { exec } = require('child_process'); 3 | const config = require('../config'); 4 | const {sleep} = require('../lib/functions') 5 | // 1. Shutdown Bot 6 | cmd({ 7 | pattern: "shutdown", 8 | desc: "Shutdown the bot.", 9 | category: "owner", 10 | react: "🛑", 11 | filename: __filename 12 | }, 13 | async (conn, mek, m, { from, isOwner, reply }) => { 14 | if (!isOwner) return reply("❌ You are not the owner!"); 15 | reply("🛑 Shutting down...").then(() => process.exit()); 16 | }); 17 | // 2. Broadcast Message to All Groups 18 | cmd({ 19 | pattern: "broadcast", 20 | desc: "Broadcast a message to all groups.", 21 | category: "owner", 22 | react: "📢", 23 | filename: __filename 24 | }, 25 | async (conn, mek, m, { from, isOwner, args, reply }) => { 26 | if (!isOwner) return reply("❌ You are not the owner!"); 27 | if (args.length === 0) return reply("📢 Please provide a message to broadcast."); 28 | const message = args.join(' '); 29 | const groups = Object.keys(await conn.groupFetchAllParticipating()); 30 | for (const groupId of groups) { 31 | await conn.sendMessage(groupId, { text: message }, { quoted: mek }); 32 | } 33 | reply("📢 Message broadcasted to all groups."); 34 | }); 35 | // 3. Set Profile Picture 36 | cmd({ 37 | pattern: "setpp", 38 | desc: "Set bot profile picture.", 39 | category: "owner", 40 | react: "🖼️", 41 | filename: __filename 42 | }, 43 | async (conn, mek, m, { from, isOwner, quoted, reply }) => { 44 | if (!isOwner) return reply("❌ You are not the owner!"); 45 | if (!quoted || !quoted.message.imageMessage) return reply("❌ Please reply to an image."); 46 | try { 47 | const media = await conn.downloadMediaMessage(quoted); 48 | await conn.updateProfilePicture(conn.user.jid, { url: media }); 49 | reply("🖼️ Profile picture updated successfully!"); 50 | } catch (error) { 51 | reply(`❌ Error updating profile picture: ${error.message}`); 52 | } 53 | }); 54 | 55 | // 6. Clear All Chats 56 | cmd({ 57 | pattern: "clearchats", 58 | desc: "Clear all chats from the bot.", 59 | category: "owner", 60 | react: "🧹", 61 | filename: __filename 62 | }, 63 | async (conn, mek, m, { from, isOwner, reply }) => { 64 | if (!isOwner) return reply("❌ You are not the owner!"); 65 | try { 66 | const chats = conn.chats.all(); 67 | for (const chat of chats) { 68 | await conn.modifyChat(chat.jid, 'delete'); 69 | } 70 | reply("🧹 All chats cleared successfully!"); 71 | } catch (error) { 72 | reply(`❌ Error clearing chats: ${error.message}`); 73 | } 74 | }); 75 | 76 | cmd({ 77 | pattern: "jid", 78 | desc: "Get the bot's JID.", 79 | category: "owner", 80 | react: "🤖", 81 | filename: __filename 82 | }, 83 | async (conn, mek, m, { from, isOwner, reply }) => { 84 | if (!isOwner) return reply("❌ You are not the owner!"); 85 | reply(`🤖 *Bot JID:* ${conn.user.jid}`); 86 | }); 87 | // 8. Group JIDs List 88 | cmd({ 89 | pattern: "gjid", 90 | desc: "Get the list of JIDs for all groups the bot is part of.", 91 | category: "owner", 92 | react: "📝", 93 | filename: __filename 94 | }, 95 | async (conn, mek, m, { from, isOwner, reply }) => { 96 | if (!isOwner) return reply("❌ You are not the owner!"); 97 | const groups = await conn.groupFetchAllParticipating(); 98 | const groupJids = Object.keys(groups).join('\n'); 99 | reply(`📝 *Group JIDs:*\n\n${groupJids}`); 100 | }); 101 | 102 | 103 | // block 104 | 105 | cmd({ 106 | pattern: "block", 107 | desc: "Block a user.", 108 | category: "owner", 109 | react: "🚫", 110 | filename: __filename 111 | }, 112 | async (conn, mek, m, { from, isOwner, quoted, reply }) => { 113 | if (!isOwner) return reply("❌ You are not the owner!"); 114 | if (!quoted) return reply("❌ Please reply to the user you want to block."); 115 | const user = quoted.sender; 116 | try { 117 | await conn.updateBlockStatus(user, 'block'); 118 | reply(`🚫 User ${user} blocked successfully.`); 119 | } catch (error) { 120 | reply(`❌ Error blocking user: ${error.message}`); 121 | } 122 | }); 123 | // 5. Unblock User 124 | cmd({ 125 | pattern: "unblock", 126 | desc: "Unblock a user.", 127 | category: "owner", 128 | react: "✅", 129 | filename: __filename 130 | }, 131 | async (conn, mek, m, { from, isOwner, quoted, reply }) => { 132 | if (!isOwner) return reply("❌ You are not the owner!"); 133 | if (!quoted) return reply("❌ Please reply to the user you want to unblock."); 134 | const user = quoted.sender; 135 | try { 136 | await conn.updateBlockStatus(user, 'unblock'); 137 | reply(`✅⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈ User ${user} unblocked successfully.`); 138 | } catch (error) { 139 | reply(`❌ Error unblocking user: ${error.message}`); 140 | } 141 | }); 142 | -------------------------------------------------------------------------------- /plugins/ping.js: -------------------------------------------------------------------------------- 1 | const config = require('../config'); 2 | const { cmd, commands } = require('../command'); 3 | 4 | cmd({ 5 | pattern: "ping", 6 | alias: "speed", 7 | desc: "Check bot's response time.", 8 | category: "main", 9 | react: "🌏", 10 | filename: __filename 11 | }, 12 | async (conn, mek, m, { from, quoted, reply }) => { 13 | try { 14 | const startTime = Date.now(); 15 | 16 | // Add a short delay 17 | await new Promise(resolve => setTimeout(resolve, 100)); // 100ms delay 18 | 19 | const endTime = Date.now(); 20 | const ping = endTime - startTime; 21 | 22 | // Send the ping result 23 | await conn.sendMessage(from, { 24 | text: `*SILVA SPARK 🥰🥰 SPARKING: ${ping}ms*`, 25 | contextInfo: { 26 | mentionedJid: [m.sender], 27 | forwardingScore: 999, 28 | isForwarded: true, 29 | forwardedNewsletterMessageInfo: { 30 | newsletterJid: '120363200367779016@newsletter', 31 | newsletterName: 'SILVA SPARKING SPEED 🥰🥰', 32 | serverMessageId: 143 33 | } 34 | } 35 | }, { quoted: mek }); 36 | } catch (e) { 37 | console.error(e); 38 | reply(`An error occurred: ${e.message}`); 39 | } 40 | }); 41 | 42 | // ping2 43 | 44 | cmd({ 45 | pattern: "ping2", 46 | desc: "Check bot's response time.", 47 | category: "main", 48 | react: "💀", 49 | filename: __filename 50 | }, 51 | 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 }) => { 52 | try { 53 | const startTime = Date.now() 54 | const message = await conn.sendMessage(from, { text: '> *SPARKING...*' }) 55 | const endTime = Date.now() 56 | const ping = endTime - startTime 57 | await conn.sendMessage(from, { text: `*SILVA SPARK 🥰🥰 SPARKING : ${ping}ms*` }, { quoted: message }) 58 | } catch (e) { 59 | console.log(e) 60 | reply(`${e}`) 61 | } 62 | }) 63 | -------------------------------------------------------------------------------- /plugins/play.js: -------------------------------------------------------------------------------- 1 | const {cmd , commands} = require('../command') 2 | const fg = require('api-dylux') 3 | const yts = require('yt-search') 4 | 5 | cmd({ 6 | pattern: "play2", 7 | alias: ["ytmp3","audio"], 8 | desc: "download songs", 9 | category: "download", 10 | react: "🎵", 11 | filename: __filename 12 | }, 13 | 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}) => { 14 | try{ 15 | if(!q) return reply("*Please provide a link or a name 🔎...*") 16 | const search = await yts(q) 17 | const data = search.videos[0] 18 | const url = data.url 19 | 20 | let desc = `╭━━━〔 *⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈* 〕━━━┈⊷ 21 | ┃▸┃๏ *MUSIC DOWNLOADER* 22 | ╭━❮ *Download Audio* ❯━┈⊷ 23 | ┃▸╭─────────────·๏ 24 | ┃▸┃๏ *Tital* - ${data.title} 25 | ┃▸┃๏ *Views* - ${data.views} 26 | ┃▸┃๏ *Description* - ${data.description} 27 | ┃▸┃๏ *Duration:* ${data.timestamp}} 28 | ┃▸┃๏ *Link* - ${data.url} 29 | ┃▸┃๏ *Ago* - ${data.ago} 30 | ┃▸└────────────┈⊷ 31 | ╰━━━━━━━━━━━━━━━⪼ 32 | > *©⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈ ♡*` 33 | await conn.sendMessage(from,{image:{url: data.thumbnail},caption:desc},{quoted:mek}); 34 | 35 | //download audio 36 | 37 | let down = await fg.yta(url) 38 | let downloadUrl = down.dl_url 39 | 40 | //send audio 41 | await conn.sendMessage(from,{audio:{url: downloadUrl},mimetype:"audio/mpeg"},{quoted:mek}) 42 | await conn.sendMessage(from,{document:{url: downloadUrl},mimetype:"audio/mpeg",fileName:data.title + "mp3",caption:"©⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈"},{quoted:mek}) 43 | }catch(e){ 44 | reply(`${e}`) 45 | } 46 | }) 47 | 48 | //===========darama-dl=========== 49 | 50 | cmd({ 51 | pattern: "darama", 52 | alias: ["video2","ytmp4"], 53 | desc: "download video", 54 | category: "download", 55 | react: "🎥", 56 | filename: __filename 57 | }, 58 | 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}) => { 59 | try{ 60 | if(!q) return reply("*Please provide a link or a name 🔎...*") 61 | const search = await yts(q) 62 | const data = search.videos[0] 63 | const url = data.url 64 | 65 | let des = `╭━━━〔 *⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈* 〕━━━┈⊷ 66 | ┃▸┃๏ *VIDEO DOWNLOADER* 67 | ╭━❮ *Download Audio* ❯━┈⊷ 68 | ┃▸╭─────────────·๏ 69 | ┃▸┃๏ *Tital* - ${data.title} 70 | ┃▸┃๏ *Views* - ${data.views} 71 | ┃▸┃๏ *Description* - ${data.description} 72 | ┃▸┃๏ *Duration:* ${data.timestamp}} 73 | ┃▸┃๏ *Link* - ${data.url} 74 | ┃▸┃๏ *Ago* - ${data.ago} 75 | ┃▸└────────────┈⊷ 76 | ╰━━━━━━━━━━━━━━━⪼ 77 | > *©⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈♡*` 78 | await conn.sendMessage(from,{image:{url: data.thumbnail},caption:des},{quoted:mek}); 79 | 80 | //download video 81 | 82 | let down = await fg.ytv(url) 83 | let downloadUrl = down.dl_url 84 | 85 | //send video 86 | await conn.sendMessage(from,{video:{url: downloadUrl},mimetype:"video/mp4"},{quoted:mek}) 87 | await conn.sendMessage(from,{document:{url: downloadUrl},mimetype:"video/mp4",fileName:data.title + "mp4",caption:"©⎈ Sɪʟᴠᴀ Sᴘᴀʀᴋ мᎠ ⎈"},{quoted:mek}) 88 | 89 | }catch(a){ 90 | reply(`${a}`) 91 | } 92 | }) 93 | -------------------------------------------------------------------------------- /plugins/prank.js: -------------------------------------------------------------------------------- 1 | const { cmd } = require('../command'); 2 | 3 | cmd({ 4 | pattern: "hack", 5 | desc: "Displays a dynamic and playful 'Hacking' simulation message.", 6 | category: "fun", 7 | react: "💻", 8 | filename: __filename 9 | }, 10 | async (conn, mek, m, { from, quoted, reply }) => { 11 | try { 12 | const steps = [ 13 | '💻 *HACKING SEQUENCE INITIATED...* 💻', 14 | '', 15 | '*Loading encryption bypass modules...* 🔐', 16 | '*Establishing secure connection to mainframe...* 🌐', 17 | '*Deploying rootkits...* 🛠️', 18 | '', 19 | '```[▓▓ ] 10%``` ⏳', 20 | '```[▓▓▓▓▓ ] 30%``` ⏳', 21 | '```[▓▓▓▓▓▓▓▓▓ ] 50%``` ⏳', 22 | '```[▓▓▓▓▓▓▓▓▓▓▓▓▓ ] 70%``` ⏳', 23 | '```[▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ] 90%``` ⏳', 24 | '```[▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%``` ✅', 25 | '', 26 | '🔒 *System Breach Successful!* 🔓', 27 | '*Gaining access to server logs...* 🖥️', 28 | '*Extracting sensitive data...* 📂', 29 | '', 30 | '```[DATA CAPTURED: 3.2GB]``` 📡', 31 | '```[TRANSMISSION SECURED]``` 🔒', 32 | '', 33 | '🚀 *Operation Complete!*', 34 | '', 35 | '⚠️ _This is a simulated hacking activity for entertainment purposes._', 36 | '⚠️ _Remember: Ethical hacking ensures safety._', 37 | '', 38 | '> *SILVA SPARK MD: HACKING SIMULATION COMPLETE* ☣' 39 | ]; 40 | 41 | for (const step of steps) { 42 | await conn.sendMessage(from, { text: step }, { quoted: mek }); 43 | await new Promise(resolve => setTimeout(resolve, 1200)); // Adjust delay for realism 44 | } 45 | } catch (error) { 46 | console.error(error); 47 | reply(`❌ *Error:* ${error.message}`); 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /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 | //auto_voice 19 | cmd({ 20 | on: "body" 21 | }, 22 | async (conn, mek, m, { from, body, isOwner }) => { 23 | const filePath = path.join(__dirname, '../data/autovoice.json'); 24 | const data = JSON.parse(fs.readFileSync(filePath, 'utf8')); 25 | for (const text in data) { 26 | if (body.toLowerCase() === text.toLowerCase()) { 27 | 28 | if (config.AUTO_VOICE === 'true') { 29 | //if (isOwner) return; 30 | await conn.sendPresenceUpdate('recording', from); 31 | await conn.sendMessage(from, { audio: { url: data[text] }, mimetype: 'audio/mpeg', ptt: true }, { quoted: mek }); 32 | } 33 | } 34 | } 35 | }); 36 | 37 | //auto sticker 38 | cmd({ 39 | on: "body" 40 | }, 41 | async (conn, mek, m, { from, body, isOwner }) => { 42 | const filePath = path.join(__dirname, '../data/autosticker.json'); 43 | const data = JSON.parse(fs.readFileSync(filePath, 'utf8')); 44 | for (const text in data) { 45 | if (body.toLowerCase() === text.toLowerCase()) { 46 | 47 | if (config.AUTO_STICKER === 'true') { 48 | //if (isOwner) return; 49 | await conn.sendMessage(from,{sticker: { url : data[text]},package: 'silva spark🥰'},{ quoted: mek }) 50 | 51 | } 52 | } 53 | } 54 | }); 55 | 56 | //auto reply 57 | cmd({ 58 | on: "body" 59 | }, 60 | async (conn, mek, m, { from, body, isOwner }) => { 61 | const filePath = path.join(__dirname, '../data/autoreply.json'); 62 | const data = JSON.parse(fs.readFileSync(filePath, 'utf8')); 63 | for (const text in data) { 64 | if (body.toLowerCase() === text.toLowerCase()) { 65 | 66 | if (config.AUTO_REPLY === 'true') { 67 | //if (isOwner) return; 68 | await m.reply(data[text]) 69 | 70 | } 71 | } 72 | } 73 | }); 74 | 75 | // Composing (Auto Typing) 76 | cmd({ 77 | on: "body" 78 | }, 79 | async (conn, mek, m, { from, body, isOwner }) => { 80 | if (config.AUTO_TYPING === 'true') { 81 | await conn.sendPresenceUpdate('composing', from); // send typing 82 | } 83 | }); 84 | 85 | 86 | // Always Online 87 | cmd({ 88 | on: "body" 89 | }, async (conn, mek, m, { from, isOwner }) => { 90 | try { 91 | if (config.ALWAYS_ONLINE === "true") { 92 | // Always Online Mode: Bot always appears online (double tick) 93 | await conn.sendPresenceUpdate("available", from); 94 | } else { 95 | // Dynamic Mode: Adjust presence based on owner's status 96 | if (isOwner) { 97 | // If the owner is online, show as available (double tick) 98 | await conn.sendPresenceUpdate("available", from); 99 | } else { 100 | // If the owner is offline, show as unavailable (single tick) 101 | await conn.sendPresenceUpdate("unavailable", from); 102 | } 103 | } 104 | } catch (e) { 105 | console.log(e); 106 | } 107 | }); 108 | 109 | // Public Mod 110 | cmd({ 111 | on: "body" 112 | }, async (conn, mek, m, { from, isOwner }) => { 113 | try { 114 | if (config.ALWAYS_ONLINE === "true") { 115 | // Public Mode + Always Online: Always show as online 116 | await conn.sendPresenceUpdate("available", from); 117 | } else if (config.PUBLIC_MODE === "true") { 118 | // Public Mode + Dynamic: Respect owner's presence 119 | if (isOwner) { 120 | // If owner is online, show available 121 | await conn.sendPresenceUpdate("available", from); 122 | } else { 123 | // If owner is offline, show unavailable 124 | await conn.sendPresenceUpdate("unavailable", from); 125 | } 126 | } 127 | } catch (e) { 128 | console.log(e); 129 | } 130 | }); 131 | -------------------------------------------------------------------------------- /plugins/quote.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const { 3 | cmd 4 | } = require("../command"); 5 | cmd({ 6 | 'pattern': "quote", 7 | 'desc': "Get a random inspiring quote.", 8 | 'category': "fun", 9 | 'react': '💬', 10 | 'filename': __filename 11 | }, async (_0x237929, _0x10ef1c, _0x304915, { 12 | from: _0x24aa1d, 13 | reply: _0x31a8bd 14 | }) => { 15 | try { 16 | const _0x33914b = await axios.get("https://api.quotable.io/random"); 17 | const _0x26063f = _0x33914b.data; 18 | const _0x25a0d1 = "\n💬 \"" + _0x26063f.content + "\"\n- " + _0x26063f.author + "\n> *QUOTES BY silva spark*\n "; 19 | return _0x31a8bd(_0x25a0d1); 20 | } catch (_0x50410a) { 21 | console.error("Error fetching quote:", _0x50410a); 22 | _0x31a8bd("aby coding ma koi error hai fix kr"); 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /plugins/repo.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const { cmd } = require('../command'); 3 | const fs = require('fs'); 4 | const os = require('os'); 5 | 6 | // Read package version 7 | const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8')); 8 | const version = pkg.version || "1.0.0"; 9 | 10 | // Uptime formatter 11 | function formatUptime(ms) { 12 | let sec = Math.floor((ms / 1000) % 60); 13 | let min = Math.floor((ms / (1000 * 60)) % 60); 14 | let hr = Math.floor((ms / (1000 * 60 * 60)) % 24); 15 | return `${hr}h ${min}m ${sec}s`; 16 | } 17 | 18 | // Count commands (plugin files) 19 | const commandCount = Object.keys(require.cache) 20 | .filter(path => path.includes('/commands/') || path.includes('\\commands\\')) 21 | .length; 22 | 23 | cmd({ 24 | pattern: "repo", 25 | alias: ["sc", "script", "info"], 26 | desc: "Show Silva Spark MD repository details", 27 | category: "main", 28 | react: "👨‍💻", 29 | filename: __filename 30 | }, 31 | async (conn, mek, m, { from, quoted, reply }) => { 32 | try { 33 | // GitHub repo stats 34 | const { data } = await axios.get('https://api.github.com/repos/SilvaTechB/silva-md-bot'); 35 | const { stargazers_count, forks_count } = data; 36 | const users = Math.round((stargazers_count + forks_count) * 5); // ×5 stats 37 | 38 | const uptime = formatUptime(process.uptime() * 1000); 39 | const platform = os.platform().toUpperCase(); 40 | const arch = os.arch().toUpperCase(); 41 | 42 | const msg = ` 43 | ┏━━━『 *👨‍💻 Silva Spark MD Info* 』━━━✦ 44 | ┃ 🔗 *Repo*: 45 | ┃ github.com/SilvaTechB/silva-spark-md 46 | ┃ 47 | ┃ ⭐ *Stars*: ${stargazers_count} 48 | ┃ 🍴 *Forks*: ${forks_count} 49 | ┃ 👥 *Est. Users*: ${users} 50 | ┃ 51 | ┃ ⚙️ *Version*: v${version} 52 | ┃ 📊 *Commands*: ${commandCount} 53 | ┃ 🕓 *Uptime*: ${uptime} 54 | ┃ 💽 *System*: ${platform} (${arch}) 55 | ┗━━━━━━━━━━━━━━━━━━━━━━✦ 56 | 57 | ✨ *Silva Spark MD* – your feature-packed WhatsApp bot for automation, fun, and more! 58 | 59 | 📌 *Main MD Repo*: 60 | https://github.com/SilvaTechB/silva-md-bot 61 | 62 | 💡 *Tip*: Fork & ⭐ to show love! 63 | 💖 Thanks for choosing Silva Spark MD! 64 | `.trim(); 65 | 66 | const contextTag = { 67 | mentionedJid: [m.sender], 68 | forwardingScore: 999, 69 | isForwarded: true, 70 | forwardedNewsletterMessageInfo: { 71 | newsletterJid: '120363200367779016@newsletter', 72 | newsletterName: 'SILVA SPARK MD 💖🦄', 73 | serverMessageId: 143 74 | } 75 | }; 76 | 77 | // Send the repo stats text with forward tag 78 | await conn.sendMessage(from, { 79 | text: msg, 80 | contextInfo: contextTag 81 | }, { quoted: mek }); 82 | 83 | // Send a related image with forward tag 84 | await conn.sendMessage(from, { 85 | image: { url: `https://files.catbox.moe/0vldgh.jpeg` }, 86 | caption: "🌟 *Silva Spark MD: Powering smart chats everywhere!*", 87 | contextInfo: contextTag 88 | }, { quoted: mek }); 89 | 90 | // Send the audio response (voice note) 91 | await conn.sendMessage(from, { 92 | audio: { url: 'https://files.catbox.moe/hpwsi2.mp3' }, 93 | mimetype: 'audio/mp4', 94 | ptt: true 95 | }, { quoted: mek }); 96 | 97 | } catch (err) { 98 | console.error("❌ Repo Fetch Error:", err); 99 | reply(`🚫 *Error fetching repo data:*\n${err.message}`); 100 | } 101 | }); -------------------------------------------------------------------------------- /plugins/restart.js: -------------------------------------------------------------------------------- 1 | const { cmd } = require('../command'); 2 | const { sleep } = require('../lib/functions'); 3 | 4 | cmd({ 5 | pattern: "restart", 6 | desc: "Restart the bot KHAN-AI", 7 | category: "owner", 8 | filename: __filename 9 | }, 10 | async (conn, mek, m, { 11 | from, quoted, body, isCmd, command, args, q, isGroup, senderNumber, reply 12 | }) => { 13 | try { 14 | // Get the bot owner's number dynamically from conn.user.id 15 | const botOwner = conn.user.id.split(":")[0]; // Extract the bot owner's number 16 | if (senderNumber !== botOwner) { 17 | return reply("Only the bot owner can use this command."); 18 | } 19 | 20 | const { exec } = require("child_process"); 21 | reply("Restarting..."); 22 | await sleep(1500); 23 | exec("pm2 restart all"); 24 | } catch (e) { 25 | console.error(e); 26 | reply(`${e}`); 27 | } 28 | }); -------------------------------------------------------------------------------- /plugins/rw.js: -------------------------------------------------------------------------------- 1 | const { 2 | cmd, 3 | commands 4 | } = require("../command"); 5 | const { 6 | getBuffer, 7 | getGroupAdmins, 8 | getRandom, 9 | h2k, 10 | isUrl, 11 | Json, 12 | runtime, 13 | sleep, 14 | fetchJson 15 | } = require("../lib/functions"); 16 | const axios = require("axios"); 17 | cmd({ 18 | 'pattern': 'rw', 19 | 'alias': ["randomwall", "wallpaper"], 20 | 'react': '🌌', 21 | 'desc': "Download random wallpapers based on keywords.", 22 | 'category': 'wallpapers', 23 | 'use': ".rw ", 24 | 'filename': __filename 25 | }, async (_0x4e03bc, _0x345d21, _0x40a30e, { 26 | from: _0x12db73, 27 | args: _0x22efc8, 28 | reply: _0x2f266c 29 | }) => { 30 | try { 31 | const _0x2d400f = _0x22efc8.join(" ") || "random"; 32 | const _0x3ba124 = "https://pikabotzapi.vercel.app/random/randomwall/?apikey=anya-md&query=" + _0x2d400f; 33 | const _0x235f6c = await axios.get(_0x3ba124); 34 | if (_0x235f6c.data.status) { 35 | const _0x3a965b = _0x235f6c.data.imgUrl; 36 | const _0x122bb7 = "🌌 Random Wallpaper: *" + _0x2d400f + "*\n\n> *©SILVA SPARK*"; 37 | await _0x4e03bc.sendMessage(_0x12db73, { 38 | 'image': { 39 | 'url': _0x3a965b 40 | }, 41 | 'caption': _0x122bb7 42 | }, { 43 | 'quoted': _0x345d21 44 | }); 45 | } else { 46 | _0x2f266c("❌ Failed to fetch wallpaper for \"" + _0x2d400f + "\"."); 47 | } 48 | } catch (_0x56a8ca) { 49 | console.error(_0x56a8ca); 50 | _0x2f266c("❌ An error occurred while fetching the wallpaper."); 51 | } 52 | }); 53 | -------------------------------------------------------------------------------- /plugins/saver.js: -------------------------------------------------------------------------------- 1 | const { 2 | cmd, 3 | commands 4 | } = require("../command"); 5 | const path = require('path'); 6 | cmd({ 7 | 'pattern': "save", 8 | 'react': '📁', 9 | 'alias': ["store"], 10 | 'desc': "Save and send back a media file (image, video, or audio).", 11 | 'category': "media", 12 | 'use': ".save ", 13 | 'filename': __filename 14 | }, async (_0x2ecf0f, _0x3c0350, _0x2b9c8c, { 15 | quoted: _0x2103b0, 16 | q: _0x435112, 17 | reply: _0x4f53e2 18 | }) => { 19 | try { 20 | if (!_0x2103b0) { 21 | return _0x4f53e2("❌ Reply to a media message (video, image, or audio) with the `.save` command."); 22 | } 23 | const _0x3debb4 = _0x2103b0.mtype; 24 | let _0x21e1be; 25 | if (/video/.test(_0x3debb4)) { 26 | _0x21e1be = "video"; 27 | } else { 28 | if (/image/.test(_0x3debb4)) { 29 | _0x21e1be = "image"; 30 | } else { 31 | if (/audio/.test(_0x3debb4)) { 32 | _0x21e1be = 'audio'; 33 | } else { 34 | return _0x4f53e2("❌ Only video, image, or audio messages are supported."); 35 | } 36 | } 37 | } 38 | const _0x1a523a = await _0x2ecf0f.downloadAndSaveMediaMessage(_0x2103b0); 39 | const _0x5af1b3 = path.resolve(_0x1a523a); 40 | const _0x4acfdc = { 41 | 'caption': _0x435112 || '' 42 | }; 43 | _0x4acfdc[_0x21e1be] = { 44 | 'url': 'file://' + _0x5af1b3 45 | }; 46 | await _0x2ecf0f.sendMessage(_0x2b9c8c.sender, _0x4acfdc, { 47 | 'quoted': _0x3c0350 48 | }); 49 | await _0x4f53e2("✅ S♥I♥L♥V♥A♥ ♥S♥P♥A♥R♥K Successfully saved and sent the media file."); 50 | } catch (_0x1791ca) { 51 | console.error(_0x1791ca); 52 | _0x4f53e2("❌ Failed to save and send the media. Please try again."); 53 | } 54 | }); 55 | -------------------------------------------------------------------------------- /plugins/silva-channelreact.js: -------------------------------------------------------------------------------- 1 | const config = require('../config'); 2 | const { cmd } = require('../command'); 3 | 4 | const stylizedChars = { 5 | a: '🅐', b: '🅑', c: '🅒', d: '🅓', e: '🅔', f: '🅕', g: '🅖', 6 | h: '🅗', i: '🅘', j: '🅙', k: '🅚', l: '🅛', m: '🅜', n: '🅝', 7 | o: '🅞', p: '🅟', q: '🅠', r: '🅡', s: '🅢', t: '🅣', u: '🅤', 8 | v: '🅥', w: '🅦', x: '🅧', y: '🅨', z: '🅩', 9 | '0': '⓿', '1': '➊', '2': '➋', '3': '➌', '4': '➍', 10 | '5': '➎', '6': '➏', '7': '➐', '8': '➑', '9': '➒' 11 | }; 12 | 13 | cmd({ 14 | pattern: "chr", 15 | alias: ["creact"], 16 | react: "🔤", 17 | desc: "React to channel messages with stylized text", 18 | category: "owner", 19 | use: '.chr ', 20 | filename: __filename 21 | }, 22 | async (conn, mek, m, { from, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isCreator, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isAdmins, reply }) => { 23 | try { 24 | if (!isCreator) return reply("❌ Owner only command"); 25 | if (!q) return reply(`Usage:\n${command} https://whatsapp.com/channel/1234567890 hello`); 26 | 27 | const [link, ...textParts] = q.split(' '); 28 | if (!link.includes("whatsapp.com/channel/")) return reply("Invalid channel link format"); 29 | 30 | const inputText = textParts.join(' ').toLowerCase(); 31 | if (!inputText) return reply("Please provide text to convert"); 32 | 33 | const emoji = inputText 34 | .split('') 35 | .map(char => { 36 | if (char === ' ') return '―'; 37 | return stylizedChars[char] || char; 38 | }) 39 | .join(''); 40 | 41 | const channelId = link.split('/')[4]; 42 | const messageId = link.split('/')[5]; 43 | if (!channelId || !messageId) return reply("Invalid link - missing IDs"); 44 | 45 | const channelMeta = await conn.newsletterMetadata("invite", channelId); 46 | await conn.newsletterReactMessage(channelMeta.id, messageId, emoji); 47 | 48 | return reply(`╭━━━〔 *SPARK* 〕━━━┈⊷ 49 | ┃▸ *Success!* Reaction sent 50 | ┃▸ *Channel:* ${channelMeta.name} 51 | ┃▸ *Reaction:* ${emoji} 52 | ╰────────────────┈⊷ 53 | > *© Pᴏᴡᴇʀᴇᴅ Bʏ SILVA SPARK ♡*`); 54 | } catch (e) { 55 | console.error(e); 56 | reply(`❎ Error: ${e.message || "Failed to send reaction"}`); 57 | } 58 | }); -------------------------------------------------------------------------------- /plugins/silva-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 Silva spark 💥 ✅", 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 | }); -------------------------------------------------------------------------------- /plugins/srepo.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const { cmd, commands } = require("../command"); 3 | 4 | cmd({ 5 | pattern: "srepo", 6 | desc: "Fetch information about a GitHub repository.", 7 | category: "other", 8 | react: "🍃", 9 | filename: __filename 10 | }, async (conn, mek, m, { 11 | from, 12 | quoted, 13 | body, 14 | isCmd, 15 | command, 16 | args, 17 | q, 18 | isGroup, 19 | sender, 20 | senderNumber, 21 | botNumber2, 22 | botNumber, 23 | pushname, 24 | isMe, 25 | isOwner, 26 | groupMetadata, 27 | groupName, 28 | participants, 29 | groupAdmins, 30 | isBotAdmins, 31 | isAdmins, 32 | reply 33 | }) => { 34 | try { 35 | const repoName = args.join(" "); // Combine arguments to form "owner/repo" 36 | if (!repoName) { 37 | return reply("Please provide a GitHub repository name in the format 📌`owner/repo`."); 38 | } 39 | 40 | // Construct GitHub API URL for the repository 41 | const apiUrl = `https://api.github.com/repos/${repoName}`; 42 | const response = await axios.get(apiUrl); // Fetch repository data from GitHub 43 | const repoData = response.data; 44 | 45 | // Prepare repository information message 46 | let repoInfo = "📁_*GITHUB REPO INFO BY SILVA SPARK*_📁\n\n"; 47 | repoInfo += `📌 *Name*: ${repoData.name}\n`; 48 | repoInfo += `🔗 *URL*: ${repoData.html_url}\n`; 49 | repoInfo += `📝 *Description*: ${repoData.description || "No description provided"}\n`; 50 | repoInfo += `⭐ *Stars*: ${repoData.stargazers_count}\n`; 51 | repoInfo += `🍴 *Forks*: ${repoData.forks_count}\n\n`; 52 | repoInfo += "> *© Powered By SILVA SPARK*\n"; 53 | 54 | // Send repository info as a message 55 | await conn.sendMessage(from, { text: repoInfo }, { quoted }); 56 | 57 | } catch (error) { 58 | console.error("Error fetching repository data:", error); 59 | reply(`Error fetching repository data 🤕: ${error.message}`); 60 | } 61 | }); 62 | -------------------------------------------------------------------------------- /plugins/sticker.js: -------------------------------------------------------------------------------- 1 | const config = require('../config'); 2 | const { Sticker, StickerTypes } = require('wa-sticker-formatter'); 3 | const { cmd } = require('../command'); 4 | const { getRandom } = require('../lib/functions'); 5 | 6 | var imgmsg = ''; 7 | if (config.LANG === 'SI') imgmsg = 'Please mention a photo!!'; 8 | else imgmsg = 'ʀᴇᴘʟʏ ᴛᴏ ᴀ ᴘʜᴏᴛᴏ ғᴏʀ sᴛɪᴄᴋᴇʀ!'; 9 | 10 | var descg = ''; 11 | if (config.LANG === 'SI') descg = 'converts the replied photo to a sticker.'; 12 | else descg = 'ɪᴛ ᴄᴏɴᴠᴇʀᴛs ʏᴏᴜʀ ʀᴇᴘʟɪᴇᴅ ᴘʜᴏᴛᴏ ᴛᴏ sᴛɪᴄᴋᴇʀ.'; 13 | 14 | cmd({ 15 | pattern: 'sticker', 16 | react: '🤹‍♀️', 17 | alias: ['s', 'ss', 'stic'], 18 | desc: descg, 19 | category: 'convert', 20 | use: '.sticker ', 21 | filename: __filename 22 | }, async (conn, mek, m, { from, reply, isCmd, command, args, q, isGroup, pushname }) => { 23 | try { 24 | const isQuotedImage = m.quoted && (m.quoted.type === 'imageMessage' || (m.quoted.type === 'viewOnceMessage' && m.quoted.msg.type === 'imageMessage')); 25 | const isQuotedSticker = m.quoted && m.quoted.type === 'stickerMessage'; 26 | 27 | if ((m.type === 'imageMessage') || isQuotedImage) { 28 | const nameJpg = getRandom('.jpg'); 29 | const imageBuffer = isQuotedImage ? await m.quoted.download() : await m.download(); 30 | await require('fs').promises.writeFile(nameJpg, imageBuffer); 31 | 32 | let sticker = new Sticker(nameJpg, { 33 | pack: pushname, // The pack name 34 | author: 'silva spark', // The author name 35 | type: q.includes('--crop') || q.includes('-c') ? StickerTypes.CROPPED : StickerTypes.FULL, 36 | categories: ['🤩', '🎉'], // The sticker category 37 | id: '12345', // The sticker id 38 | quality: 75, // The quality of the output file 39 | background: 'transparent', // The sticker background color (only for full stickers) 40 | }); 41 | 42 | const buffer = await sticker.toBuffer(); 43 | return conn.sendMessage(from, { sticker: buffer }, { quoted: mek }); 44 | } else if (isQuotedSticker) { 45 | const nameWebp = getRandom('.webp'); 46 | const stickerBuffer = await m.quoted.download(); 47 | await require('fs').promises.writeFile(nameWebp, stickerBuffer); 48 | 49 | let sticker = new Sticker(nameWebp, { 50 | pack: pushname, // The pack name 51 | author: 'silva spark', // The author name 52 | type: q.includes('--crop') || q.includes('-c') ? StickerTypes.CROPPED : StickerTypes.FULL, 53 | categories: ['🤩', '🎉'], // The sticker category 54 | id: '12345', // The sticker id 55 | quality: 75, // The quality of the output file 56 | background: 'transparent', // The sticker background color (only for full stickers) 57 | }); 58 | 59 | const buffer = await sticker.toBuffer(); 60 | return conn.sendMessage(from, { sticker: buffer }, { quoted: mek }); 61 | } else { 62 | return await reply(imgmsg); 63 | } 64 | } catch (e) { 65 | reply('Error !!'); 66 | console.error(e); 67 | } 68 | }); 69 | -------------------------------------------------------------------------------- /plugins/store.js: -------------------------------------------------------------------------------- 1 | const { 2 | cmd, 3 | commands 4 | } = require("../command"); 5 | cmd({ 6 | 'pattern': "hand", 7 | 'desc': "Displays a dynamic edit msg for fun.", 8 | 'category': "tools", 9 | 'react': '✊', 10 | 'filename': __filename 11 | }, async (_0x45cd83, _0x286d49, _0x19855e, { 12 | from: _0x96d404, 13 | reply: _0x47c6bc 14 | }) => { 15 | try { 16 | const _0x1d39fa = await _0x45cd83.sendMessage(_0x96d404, { 17 | 'text': "✊🏻 *STARTED...* 💦" 18 | }); 19 | const _0x3eccb1 = ['8✊️===D', "8=✊️==D", "8==✊️=D", "8===✊️D", "8==✊️=D", "8=✊️==D", "8✊️===D", "8=✊️==D", "8==✊️=D", '8===✊️D', "8==✊️=D", "8=✊️==D", '8✊️===D', "8=✊️==D", "8==✊️=D", "8===✊️D", "8==✊️=D", '8=✊️==D', "8✊️===D", '8=✊️==D', "8==✊️=D", "8===✊️D 💦", "8==✊️=D💦 💦", "8=✊️==D 💦💦 💦"]; 20 | for (const _0x406c5e of _0x3eccb1) { 21 | await new Promise(_0x2b41ff => setTimeout(_0x2b41ff, 0x3e8)); 22 | await _0x45cd83.relayMessage(_0x96d404, { 23 | 'protocolMessage': { 24 | 'key': _0x1d39fa.key, 25 | 'type': 0xe, 26 | 'editedMessage': { 27 | 'conversation': _0x406c5e 28 | } 29 | } 30 | }, {}); 31 | } 32 | } catch (_0x57d8ae) { 33 | console.log(_0x57d8ae); 34 | _0x47c6bc("❌ *Error!* " + _0x57d8ae.message); 35 | } 36 | }); 37 | cmd({ 38 | 'pattern': "hpy", 39 | 'desc': "Displays a dynamic edit msg for fun.", 40 | 'category': "tools", 41 | 'react': '😁', 42 | 'filename': __filename 43 | }, async (_0x353111, _0x52aa7e, _0x362309, { 44 | from: _0x3d98dd, 45 | reply: _0x46f413 46 | }) => { 47 | try { 48 | const _0xce6d4d = await _0x353111.sendMessage(_0x3d98dd, { 49 | 'text': '😂' 50 | }); 51 | const _0x47a009 = ['😃', '😄', '😁', '😊', '😎', '🥳', '😸', '😹', '🌞', '🌈', '😃', '😄', '😁', '😊', '😎', '🥳', '😸', '😹', '🌞', '🌈', '😃', '😄', '😁', '😊']; 52 | for (const _0x445d2a of _0x47a009) { 53 | await new Promise(_0x3a1a76 => setTimeout(_0x3a1a76, 0x320)); 54 | await _0x353111.relayMessage(_0x3d98dd, { 55 | 'protocolMessage': { 56 | 'key': _0xce6d4d.key, 57 | 'type': 0xe, 58 | 'editedMessage': { 59 | 'conversation': _0x445d2a 60 | } 61 | } 62 | }, {}); 63 | } 64 | } catch (_0x3d2162) { 65 | console.log(_0x3d2162); 66 | _0x46f413("❌ *Error!* " + _0x3d2162.message); 67 | } 68 | }); 69 | cmd({ 70 | 'pattern': "hrt", 71 | 'desc': "Displays a dynamic edit msg for fun.", 72 | 'category': "tools", 73 | 'react': '🫀', 74 | 'filename': __filename 75 | }, async (_0x468a9f, _0x3a7e90, _0xac39dc, { 76 | from: _0x53a037, 77 | reply: _0x542a66 78 | }) => { 79 | try { 80 | const _0x39d571 = await _0x468a9f.sendMessage(_0x53a037, { 81 | 'text': '❤️' 82 | }); 83 | const _0x52271e = ['💖', '💗', '💕', '❤️', '💛', '💚', '🫀', '💙', '💜', '🖤', '♥️', '🤍', '🤎', '💗', '💞', '💓', '💘', '💝', '♥️', '💟', '🫀', '❤️']; 84 | for (const _0x42a679 of _0x52271e) { 85 | await new Promise(_0xc0ed08 => setTimeout(_0xc0ed08, 0x1f4)); 86 | await _0x468a9f.relayMessage(_0x53a037, { 87 | 'protocolMessage': { 88 | 'key': _0x39d571.key, 89 | 'type': 0xe, 90 | 'editedMessage': { 91 | 'conversation': _0x42a679 92 | } 93 | } 94 | }, {}); 95 | } 96 | } catch (_0x2f7fbb) { 97 | console.log(_0x2f7fbb); 98 | _0x542a66("❌ *Error!* " + _0x2f7fbb.message); 99 | } 100 | }); 101 | cmd({ 102 | 'pattern': "anger", 103 | 'desc': "Displays a dynamic edit msg for fun.", 104 | 'category': "tools", 105 | 'react': '🤡', 106 | 'filename': __filename 107 | }, async (_0x4c63a0, _0x2a2d0f, _0xfd1920, { 108 | from: _0x7c1f05, 109 | reply: _0x2fc617 110 | }) => { 111 | try { 112 | const _0x471762 = await _0x4c63a0.sendMessage(_0x7c1f05, { 113 | 'text': '🤡' 114 | }); 115 | const _0x4383e5 = ['😡', '😠', '🤬', '😤', '😾', '😡', '😠', '🤬', '😤', '😾']; 116 | for (const _0x562bf3 of _0x4383e5) { 117 | await new Promise(_0x2be7c0 => setTimeout(_0x2be7c0, 0x3e8)); 118 | await _0x4c63a0.relayMessage(_0x7c1f05, { 119 | 'protocolMessage': { 120 | 'key': _0x471762.key, 121 | 'type': 0xe, 122 | 'editedMessage': { 123 | 'conversation': _0x562bf3 124 | } 125 | } 126 | }, {}); 127 | } 128 | } catch (_0x44a0c5) { 129 | console.log(_0x44a0c5); 130 | _0x2fc617("❌ *Error!* " + _0x44a0c5.message); 131 | } 132 | }); 133 | cmd({ 134 | 'pattern': "syd", 135 | 'desc': "Displays a dynamic edit msg for fun.", 136 | 'category': "tools", 137 | 'react': '😫', 138 | 'filename': __filename 139 | }, async (_0x33fcee, _0x1876fe, _0xc17cb8, { 140 | from: _0x15bb18, 141 | reply: _0xee066f 142 | }) => { 143 | try { 144 | const _0x4c06fd = await _0x33fcee.sendMessage(_0x15bb18, { 145 | 'text': '😭' 146 | }); 147 | const _0x2d9a88 = ['🥺', '😟', '😕', '😖', '😫', '🙁', '😩', '😥', '😓', '😪', '😢', '😔', '😞', '😭', '💔', '😭', '😿']; 148 | for (const _0x336d71 of _0x2d9a88) { 149 | await new Promise(_0x6eece4 => setTimeout(_0x6eece4, 0x3e8)); 150 | await _0x33fcee.relayMessage(_0x15bb18, { 151 | 'protocolMessage': { 152 | 'key': _0x4c06fd.key, 153 | 'type': 0xe, 154 | 'editedMessage': { 155 | 'conversation': _0x336d71 156 | } 157 | } 158 | }, {}); 159 | } 160 | } catch (_0x345651) { 161 | console.log(_0x345651); 162 | _0xee066f("❌ *Error!* " + _0x345651.message); 163 | } 164 | }); 165 | cmd({ 166 | 'pattern': 'shyy', 167 | 'desc': "Displays a dynamic edit msg for fun.", 168 | 'category': "tools", 169 | 'react': '😳', 170 | 'filename': __filename 171 | }, async (_0x5cfd31, _0x13a257, _0x4fe9cd, { 172 | from: _0x453318, 173 | reply: _0x138a01 174 | }) => { 175 | try { 176 | const _0x361884 = await _0x5cfd31.sendMessage(_0x453318, { 177 | 'text': "> KHANX-AI" 178 | }); 179 | const _0x206081 = ['😳', '😊', '😶', '🙈', '🙊', '😳', '😊', '😶', '🙈', '🙊']; 180 | for (const _0x5ccb6e of _0x206081) { 181 | await new Promise(_0x23b67b => setTimeout(_0x23b67b, 0x3e8)); 182 | await _0x5cfd31.relayMessage(_0x453318, { 183 | 'protocolMessage': { 184 | 'key': _0x361884.key, 185 | 'type': 0xe, 186 | 'editedMessage': { 187 | 'conversation': _0x5ccb6e 188 | } 189 | } 190 | }, {}); 191 | } 192 | } catch (_0x3775a4) { 193 | console.log(_0x3775a4); 194 | _0x138a01("❌ *Error!* " + _0x3775a4.message); 195 | } 196 | }); 197 | cmd({ 198 | 'pattern': "mon", 199 | 'desc': "Displays a dynamic edit msg for fun.", 200 | 'category': 'tools', 201 | 'react': '🌙', 202 | 'filename': __filename 203 | }, async (_0x2adc05, _0x574382, _0xe7924c, { 204 | from: _0x10f877, 205 | reply: _0x1797ef 206 | }) => { 207 | try { 208 | const _0x16fb04 = await _0x2adc05.sendMessage(_0x10f877, { 209 | 'text': '🌙' 210 | }); 211 | const _0x226056 = ['🌗', '🌘', '🌑', '🌒', '🌓', '🌔', '🌕', '🌖', '🌗', '🌘', '🌑', '🌒', '🌓', '🌔', '🌕', '🌖', '🌗', '🌘', '🌑', '🌒', '🌓', '🌔', '🌕', '🌖', '🌗', '🌘', '🌑', '🌒', '🌓', '🌔', '🌕', "🌚🌝"]; 212 | for (const _0x3ad6c8 of _0x226056) { 213 | await new Promise(_0x1eba41 => setTimeout(_0x1eba41, 0x3e8)); 214 | await _0x2adc05.relayMessage(_0x10f877, { 215 | 'protocolMessage': { 216 | 'key': _0x16fb04.key, 217 | 'type': 0xe, 218 | 'editedMessage': { 219 | 'conversation': _0x3ad6c8 220 | } 221 | } 222 | }, {}); 223 | } 224 | } catch (_0x31361e) { 225 | console.log(_0x31361e); 226 | _0x1797ef("❌ *Error!* " + _0x31361e.message); 227 | } 228 | }); 229 | cmd({ 230 | 'pattern': "cunfuzed", 231 | 'desc': "Displays a dynamic edit msg for fun.", 232 | 'category': 'tools', 233 | 'react': '🙀', 234 | 'filename': __filename 235 | }, async (_0x4e5dcf, _0x197ed7, _0x4e6e55, { 236 | from: _0x419892, 237 | reply: _0x1f258d 238 | }) => { 239 | try { 240 | const _0x566b9e = await _0x4e5dcf.sendMessage(_0x419892, { 241 | 'text': '🙀' 242 | }); 243 | const _0x35a517 = ['😕', '😟', '😵', '🤔', '😖', '😲', '😦', '🤷', "🤷‍♂️", '🤷‍♀️']; 244 | for (const _0x177123 of _0x35a517) { 245 | await new Promise(_0x19e7ff => setTimeout(_0x19e7ff, 0x3e8)); 246 | await _0x4e5dcf.relayMessage(_0x419892, { 247 | 'protocolMessage': { 248 | 'key': _0x566b9e.key, 249 | 'type': 0xe, 250 | 'editedMessage': { 251 | 'conversation': _0x177123 252 | } 253 | } 254 | }, {}); 255 | } 256 | } catch (_0x3914f5) { 257 | console.log(_0x3914f5); 258 | _0x1f258d("❌ *Error!* " + _0x3914f5.message); 259 | } 260 | }); 261 | cmd({ 262 | 'pattern': 'kiss', 263 | 'desc': "Displays a dynamic edit msg for fun.", 264 | 'category': "tools", 265 | 'react': '♥️', 266 | 'filename': __filename 267 | }, async (_0x5534d6, _0xea351e, _0x4a659, { 268 | from: _0x3549d3, 269 | reply: _0x38bcdd 270 | }) => { 271 | try { 272 | const _0x3d3056 = await _0x5534d6.sendMessage(_0x3549d3, { 273 | 'text': '♥️' 274 | }); 275 | const _0x548d62 = ['🥵', '❤️', '💋', '😫', '🤤', '😋', '🥵', '🥶', '🙊', '😻', '🙈', '💋', '🫂', '🫀', '👅', '👄', '💋']; 276 | for (const _0x2ae417 of _0x548d62) { 277 | await new Promise(_0x3260b1 => setTimeout(_0x3260b1, 0x3e8)); 278 | await _0x5534d6.relayMessage(_0x3549d3, { 279 | 'protocolMessage': { 280 | 'key': _0x3d3056.key, 281 | 'type': 0xe, 282 | 'editedMessage': { 283 | 'conversation': _0x2ae417 284 | } 285 | } 286 | }, {}); 287 | } 288 | } catch (_0x1763fc) { 289 | console.log(_0x1763fc); 290 | _0x38bcdd("❌ *Error!* " + _0x1763fc.message); 291 | } 292 | }); 293 | cmd({ 294 | 'pattern': 'nikal', 295 | 'desc': "Displays a dynamic edit msg for fun.", 296 | 'category': "tools", 297 | 'react': '🗿', 298 | 'filename': __filename 299 | }, async (_0x125191, _0x3f957c, _0xb9d01a, { 300 | from: _0x3ae285, 301 | reply: _0x30a5f5 302 | }) => { 303 | try { 304 | const _0x19567b = await _0x125191.sendMessage(_0x3ae285, { 305 | 'text': "Silva Spark🗿" 306 | }); 307 | const _0x1c80f3 = ["⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀⢠⠞⠉⠙⠲⡀⠀\n ⠀⣴⠿⠏⠀⠀⠀⠀⠀ ⢳⡀⠀⡏⠀⠀⠀ ⠀ ⢷\n⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀ ⣧⠀⢸⠀⠀⠀ ⠀ ⡇\n⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲ ⣿ ⣸ Nikal ⡇\n ⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀⠀ ⣿ ⢹⠀ ⡇\n ⠙⢿⣯⠄⠀⠀⠀__⠀ ⠀ ⡿ ⠀⡇⠀⠀⠀⠀ ⡼\n⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀⡴⠃⠀ ⠘⠤⣄⣠⠞⠀\n⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀\n⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀\n⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀ ⠀⣄⢸⠀⠀⠀⠀⠀⠀`", "⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀⢠⠞⠉⠙⠲⡀⠀\n ⠀⣴⠿⠏⠀⠀⠀⠀⠀ ⠀ ⢳⡀⠀⡏⠀⠀⠀ ⠀ ⢷\n⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀ ⣧⠀⢸⠀⠀⠀ ⡇\n⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲ ⣿ ⣸ Lavde ⡇\n ⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀⠀ ⣿ ⢹⠀ ⡇\n ⠙⢿⣯⠄⠀⠀|__|⠀⠀ ⡿ ⠀⡇⠀⠀⠀⠀ ⡼\n⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀⡴⠃⠀ ⠘⠤⣄⣠⠞⠀\n⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀\n⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀\n⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀ ⠀⣄⢸⠀⠀⠀⠀⠀⠀`", "⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀⢠⠞⠉⠙⠲⡀⠀\n ⠀⣴⠿⠏⠀⠀ ⠀ ⢳⡀⠀⡏⠀⠀ ⠀ ⢷\n⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀ ⣧⠀⢸⠀⠀⠀⠀ ⡇\n⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲ ⣿ ⣸ Pehli ⡇\n ⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀⠀ ⣿ ⢹⠀ ⡇\n ⠙⢿⣯⠄⠀⠀(P)⠀⠀ ⡿ ⠀⡇⠀⠀⠀⠀ ⡼\n⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀⡴⠃⠀ ⠘⠤⣄⣠⠞⠀\n⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀\n⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀\n⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀ ⠀⣄⢸⠀⠀⠀⠀⠀⠀`", "⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀⢠⠞⠉⠙⠲⡀⠀\n ⠀⣴⠿⠏⠀⠀ ⠀ ⢳⡀⠀⡏⠀⠀ ⠀ ⢷\n⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀ ⣧⠀⢸⠀ ⠀ ⡇\n⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲ ⣿ ⣸ Fursat ⡇\n ⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀ ⣿ ⢹⠀ ⡇\n ⠙⢿⣯⠄⠀⠀⠀__ ⠀ ⠀ ⡿ ⠀⡇⠀⠀⠀⠀ ⡼\n⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀⡴⠃⠀ ⠘⠤⣄⣠⠞⠀\n⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀\n⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀\n⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀ ⠀⣄⢸⠀⠀⠀⠀⠀⠀`", "⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀⢠⠞⠉⠙⠲⡀⠀\n ⠀⣴⠿⠏⠀⠀⠀⠀⠀ ⢳⡀⠀⡏⠀⠀ ⠀ ⢷\n⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀ ⣧⠀⢸⠀⠀ ⠀ ⡇\n⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲ ⣿ ⣸ Meeee ⡇\n ⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀⠀ ⣿ ⢹⠀ ⡇\n ⠙⢿⣯⠄⠀⠀|__| ⠀ ⡿ ⠀⡇⠀⠀⠀⠀ ⡼\n⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀⡴⠃⠀ ⠘⠤⣄⣠⠞⠀\n⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀\n⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀\n⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀ ⠀⣄⢸⠀⠀⠀⠀⠀⠀`", "⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀⢠⠞⠉⠙⠲⡀⠀\n ⠀⣴⠿⠏⠀⠀⠀⠀ ⠀ ⠀⢳⡀⠀⡏⠀⠀ ⢷\n⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀ ⣧⠀⢸⠀ ⠀ ⡇\n⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲ ⣿ ⣸ Nikal ⡇\n ⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀ ⣿ ⢹⠀ ⡇\n ⠙⢿⣯⠄⠀⠀lodu⠀⠀ ⡿ ⠀⡇⠀⠀⠀⠀ ⡼\n⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀ ⡴⠃⠀ ⠘⠤⣄⣠⠞⠀\n⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀\n⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀\n⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀ ⠀⣄⢸⠀"]; 308 | for (const _0x77af75 of _0x1c80f3) { 309 | await new Promise(_0x40d3fb => setTimeout(_0x40d3fb, 0x5dc)); 310 | await _0x125191.relayMessage(_0x3ae285, { 311 | 'protocolMessage': { 312 | 'key': _0x19567b.key, 313 | 'type': 0xe, 314 | 'editedMessage': { 315 | 'conversation': _0x77af75 316 | } 317 | } 318 | }, {}); 319 | } 320 | } catch (_0x61a6ba) { 321 | console.log(_0x61a6ba); 322 | _0x30a5f5("❌ *Error!* " + _0x61a6ba.message); 323 | } 324 | }); 325 | -------------------------------------------------------------------------------- /plugins/system.js: -------------------------------------------------------------------------------- 1 | const config = require('../config') 2 | const {cmd , commands} = require('../command') 3 | cmd({ 4 | pattern: "live", 5 | react: "⤵️", 6 | desc: "Check bot online or no.", 7 | category: "main", 8 | filename: __filename 9 | }, 10 | 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}) => { 11 | try{ 12 | return await conn.sendMessage(from,{image: {url: config.ALIVE_IMG},caption: config.LIVE_MSG},{quoted: mek}) 13 | }catch(e){ 14 | console.log(e) 15 | reply(`${e}`) 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /plugins/tools.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios') 2 | const fetch = require('node-fetch'); 3 | const {cmd , commands} = require('../command') 4 | // ship command 5 | const toM = (a) => '@' + a.split('@')[0]; 6 | cmd({ 7 | pattern: "ship", 8 | alias: ["cup", "love"], 9 | desc: "Randomly pairs the command user with another group member.", 10 | react: "❤️", 11 | category: "fun", 12 | filename: __filename, 13 | }, 14 | async (conn, mek, m, { from, isGroup, groupMetadata, reply }) => { 15 | try { 16 | // Ensure command is used in a group 17 | if (!isGroup) { 18 | return reply("This command can only be used in groups."); 19 | } 20 | 21 | // Get group participants 22 | const participants = groupMetadata.participants.map(p => p.id); 23 | 24 | if (participants.length < 2) { 25 | return reply("Not enough members to pair."); 26 | } 27 | 28 | // Sender of the command 29 | const sender = m.sender; 30 | 31 | // Randomly select another participant 32 | let randomParticipant; 33 | do { 34 | randomParticipant = participants[Math.floor(Math.random() * participants.length)]; 35 | } while (randomParticipant === sender); 36 | 37 | // Pairing message 38 | const message = `${toM(sender)} ❤️ ${toM(randomParticipant)}\nCongratulations 💖🍻`; 39 | 40 | // Send the message with contextInfo 41 | await conn.sendMessage(from, { 42 | text: message, 43 | contextInfo: { 44 | mentionedJid: [sender, randomParticipant], // Mention both users 45 | forwardingScore: 999, 46 | isForwarded: true, 47 | forwardedNewsletterMessageInfo: { 48 | newsletterJid: '120363200367779016@newsletter', 49 | newsletterName: 'SILVA TECH INC', 50 | serverMessageId: 143, 51 | }, 52 | }, 53 | }); 54 | } catch (e) { 55 | console.error("Error in ship command:", e); 56 | reply("An error occurred while processing the command. Please try again."); 57 | } 58 | }); 59 | // Insult 60 | 61 | cmd({ 62 | pattern: 'insult', 63 | desc: 'Get a random insult', 64 | category: "fun", 65 | react: '🤥', 66 | }, 67 | async (Void, citel) => { 68 | try { 69 | let response = await axios.get('https://evilinsult.com/generate_insult.php?lang=en&type=json'); 70 | let data = response.data; 71 | 72 | if (!data || !data.insult) { 73 | return citel.reply('Unable to retrieve an insult. Please try again later.'); 74 | } 75 | 76 | let insult = data.insult; 77 | return citel.reply(`*Insult:* ${insult}`); 78 | } catch (error) { 79 | citel.reply(`Error: ${error.message || error}`); 80 | } 81 | }); 82 | 83 | // joke 84 | 85 | cmd({ 86 | pattern: "joke", 87 | desc: "😂 Get a random joke", 88 | react: "🤣", 89 | category: "fun", 90 | filename: __filename 91 | }, 92 | async (conn, mek, m, { from, q, reply }) => { 93 | try { 94 | const url = 'https://official-joke-api.appspot.com/random_joke'; // API for random jokes 95 | const response = await axios.get(url); 96 | const joke = response.data; 97 | 98 | const jokeMessage = ` 99 | 😂 *Here's a random joke for you!* 😂 100 | 101 | *${joke.setup}* 102 | 103 | ${joke.punchline} 😄 104 | 105 | > *© ᴘᴏᴡᴇʀᴇᴅ ʙʏ SILVA*`; 106 | 107 | return reply(jokeMessage); 108 | } catch (e) { 109 | console.log(e); 110 | return reply("⚠️ En Error Appears."); 111 | } 112 | }); 113 | 114 | // fact 115 | 116 | cmd({ 117 | pattern: "fact", 118 | desc: "🧠 Get a random fun fact", 119 | react: "🧠", 120 | category: "fun", 121 | filename: __filename 122 | }, 123 | async (conn, mek, m, { from, q, reply }) => { 124 | try { 125 | const url = 'https://uselessfacts.jsph.pl/random.json?language=en'; // API for random facts 126 | const response = await axios.get(url); 127 | const fact = response.data.text; 128 | 129 | const funFact = ` 130 | 🧠 *Random Fun Fact* 🧠 131 | 132 | ${fact} 133 | 134 | Isn't that interesting? 😄 135 | `; 136 | 137 | return reply(funFact); 138 | } catch (e) { 139 | console.log(e); 140 | return reply("⚠️ An error occurred while fetching a fun fact. Please try again later."); 141 | } 142 | }); 143 | 144 | 145 | // fancy 146 | 147 | cmd({ 148 | pattern: "fancy", 149 | alias: ['font', "style"], 150 | react: '✍️', 151 | desc: "Convert text into various fonts.", 152 | category: "tools", 153 | filename: __filename 154 | }, async (conn, mek, m, { from, quoted, body, args, q, reply }) => { 155 | try { 156 | if (!q) { 157 | return reply("Please provide text to convert into fonts."); 158 | } 159 | 160 | let response = await axios.get('https://www.dark-yasiya-api.site/other/font?text=' + encodeURIComponent(q)); 161 | let data = response.data; 162 | 163 | if (!data.status) { 164 | return reply("Error fetching fonts. Please try again later."); 165 | } 166 | 167 | let fontResults = data.result.map(font => '*' + font.name + ":*\n" + font.result).join("\n\n"); 168 | 169 | // Message formatting 170 | let message = `*SILVA SPARK FANCY FONTS*:\n\n${fontResults}\n\n> *BY SILVA SPARK*`; 171 | 172 | // Sending the message with context info 173 | await conn.sendMessage( 174 | from, 175 | { 176 | text: message, 177 | contextInfo: { 178 | mentionedJid: [m.sender], 179 | forwardingScore: 999, 180 | isForwarded: true, 181 | forwardedNewsletterMessageInfo: { 182 | newsletterJid: '120363200367779016@newsletter', 183 | newsletterName: 'SILVA SPARK', 184 | serverMessageId: 143 185 | } 186 | } 187 | }, 188 | { quoted: mek } 189 | ); 190 | 191 | } catch (error) { 192 | console.error(error); 193 | reply("An error occurred while fetching fonts."); 194 | } 195 | }); 196 | 197 | // pick-up line 198 | 199 | cmd({ 200 | pattern: "pickupline", 201 | alias: ["pickup"], 202 | desc: "Get a random pickup line from the API.", 203 | react: "💬", 204 | category: "fun", 205 | filename: __filename, 206 | }, 207 | async (conn, mek, m, { from, reply }) => { 208 | try { 209 | // Fetch pickup line from the API 210 | const res = await fetch('https://api.popcat.xyz/pickuplines'); 211 | 212 | if (!res.ok) { 213 | throw new Error(`API request failed with status ${res.status}`); 214 | } 215 | 216 | const json = await res.json(); 217 | 218 | // Log the API response (for debugging purposes) 219 | console.log('JSON response:', json); 220 | 221 | // Format the pickup line message 222 | const pickupLine = `*Here's a pickup line for you:*\n\n"${json.pickupline}"\n\n> *© Powered By Silva*`; 223 | 224 | // Send the pickup line to the chat 225 | await conn.sendMessage(from, { text: pickupLine }, { quoted: m }); 226 | 227 | } catch (error) { 228 | console.error("Error in pickupline command:", error); 229 | reply("Sorry, something went wrong while fetching the pickup line. Please try again later."); 230 | } 231 | }); 232 | 233 | // char 234 | 235 | cmd({ 236 | pattern: "character", 237 | alias: ["char"], 238 | desc: "Check the character of a mentioned user.", 239 | react: "🔥", 240 | category: "fun", 241 | filename: __filename, 242 | }, 243 | async (conn, mek, m, { from, isGroup, text, reply }) => { 244 | try { 245 | // Ensure the command is used in a group 246 | if (!isGroup) { 247 | return reply("This command can only be used in groups."); 248 | } 249 | 250 | // Extract the mentioned user 251 | const mentionedUser = m.message.extendedTextMessage?.contextInfo?.mentionedJid?.[0]; 252 | if (!mentionedUser) { 253 | return reply("Please mention a user whose character you want to check."); 254 | } 255 | 256 | // Define character traits 257 | const userChar = [ 258 | "Sigma", 259 | "Generous", 260 | "Grumpy", 261 | "Overconfident", 262 | "Obedient", 263 | "Good", 264 | "Simp", 265 | "Kind", 266 | "Patient", 267 | "Pervert", 268 | "Cool", 269 | "Helpful", 270 | "Brilliant", 271 | "Sexy", 272 | "Hot", 273 | "Gorgeous", 274 | "Cute", 275 | ]; 276 | 277 | // Randomly select a character trait 278 | const userCharacterSelection = 279 | userChar[Math.floor(Math.random() * userChar.length)]; 280 | 281 | // Message to send 282 | const message = `Character of @${mentionedUser.split("@")[0]} is *${userCharacterSelection}* 🔥⚡`; 283 | 284 | // Send the message with mentions 285 | await conn.sendMessage(from, { 286 | text: message, 287 | mentions: [mentionedUser], 288 | }, { quoted: m }); 289 | 290 | } catch (e) { 291 | console.error("Error in character command:", e); 292 | reply("An error occurred while processing the command. Please try again."); 293 | } 294 | }); 295 | -------------------------------------------------------------------------------- /plugins/tts.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const config = require('../config') 3 | const {cmd , commands} = require('../command') 4 | const googleTTS = require('google-tts-api') 5 | 6 | cmd({ 7 | pattern: "trt", 8 | alias: ["translate"], 9 | desc: "🌍 Translate text between languages", 10 | react: "⚡", 11 | category: "other", 12 | filename: __filename 13 | }, 14 | async (conn, mek, m, { from, q, reply }) => { 15 | try { 16 | const args = q.split(' '); 17 | if (args.length < 2) return reply("❗ Please provide a language code and text. Usage: .translate [language code] [text]"); 18 | 19 | const targetLang = args[0]; 20 | const textToTranslate = args.slice(1).join(' '); 21 | 22 | const url = `https://api.mymemory.translated.net/get?q=${encodeURIComponent(textToTranslate)}&langpair=en|${targetLang}`; 23 | 24 | const response = await axios.get(url); 25 | const translation = response.data.responseData.translatedText; 26 | 27 | const translationMessage = `> *SILVA SPARK TRANSLATION* 28 | 29 | > 🔤 *Original*: ${textToTranslate} 30 | 31 | > 🔠 *Translated*: ${translation} 32 | 33 | > 🌐 *Language*: ${targetLang.toUpperCase()}`; 34 | 35 | return reply(translationMessage); 36 | } catch (e) { 37 | console.log(e); 38 | return reply("⚠️ An error occurred data while translating the your text. Please try again later🤕"); 39 | } 40 | }); 41 | 42 | //____________________________TTS___________________________ 43 | cmd({ 44 | pattern: "tts", 45 | desc: "download songs", 46 | category: "download", 47 | react: "👧", 48 | filename: __filename 49 | }, 50 | 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}) => { 51 | try{ 52 | if(!q) return reply("Need some text.") 53 | const url = googleTTS.getAudioUrl(q, { 54 | lang: 'hi-IN', 55 | slow: false, 56 | host: 'https://translate.google.com', 57 | }) 58 | await conn.sendMessage(from, { audio: { url: url }, mimetype: 'audio/mpeg', ptt: true }, { quoted: mek }) 59 | }catch(a){ 60 | reply(`${a}`) 61 | } 62 | }) 63 | -------------------------------------------------------------------------------- /plugins/unmute.js: -------------------------------------------------------------------------------- 1 | const config = require('../config') 2 | const {cmd , commands} = require('../command') 3 | cmd({ 4 | pattern: "unmute", 5 | alias: ["unlock"], 6 | react: "🔊", 7 | desc: "mute group.", 8 | category: "group", 9 | filename: __filename, 10 | }, 11 | async(conn, mek, m,{from, l, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, isItzcp, groupAdmins, isBotAdmins, isAdmins, reply}) => { 12 | try{ 13 | if (!isOwner || !isAdmins) return; 14 | 15 | 16 | if (!m.isGroup) return reply(mg.onlygroup); 17 | if (!isBotAdmins) return reply(mg.needbotadmins); 18 | 19 | await conn.groupSettingUpdate(m.chat, "not_announcement") 20 | const mass = await conn.sendMessage(m.chat, { text: '*Group chat unmuted SILVA SPARK* 🔊' }, { quoted: mek }); 21 | return await conn.sendMessage(m.chat, { react: { text: '🔊', key: mass.key } }); 22 | } catch(e) { 23 | console.log(e); 24 | reply('*Error !!*') 25 | } 26 | }) 27 | -------------------------------------------------------------------------------- /plugins/updater.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const { exec } = require('child_process'); 3 | const { cmd } = require('../command'); 4 | 5 | cmd({ 6 | pattern: "update", 7 | react: "🦄", 8 | desc: "Update the repository from GitHub", 9 | category: "system", 10 | use: ".update", 11 | filename: __filename, 12 | }, async (conn, mek, m, { from, reply }) => { 13 | try { 14 | const repoUrl = 'https://github.com/SilvaTechB/silva-spark-md.git'; // GitHub repository URL 15 | const targetFolder = 'plugins'; // Local folder for the repo 16 | 17 | // Ensure the target folder exists 18 | if (!fs.existsSync(targetFolder)) { 19 | fs.mkdirSync(targetFolder); // Create folder if it doesn't exist 20 | } 21 | 22 | // Determine the appropriate Git command 23 | const gitCommand = fs.existsSync(`${targetFolder}/.git`) 24 | ? `git -C ${targetFolder} pull` // Pull latest changes if already cloned 25 | : `git clone ${repoUrl} ${targetFolder}`; // Clone repo if not already done 26 | 27 | // Execute the Git command 28 | const output = await new Promise((resolve, reject) => { 29 | exec(gitCommand, (err, stdout, stderr) => { 30 | if (err) { 31 | reject(new Error(`Git command failed: ${stderr.trim()}`)); 32 | } else { 33 | resolve(stdout.trim()); 34 | } 35 | }); 36 | }); 37 | 38 | // Send a success message with the output 39 | await conn.sendMessage( 40 | from, 41 | { text: `*✅ Silva Spark Update completed successfully!*\n\n\`\`\`${output}\`\`\`` }, 42 | { quoted: mek } 43 | ); 44 | } catch (error) { 45 | console.error(error); 46 | reply(`*❌ Error during update:* ${error.message}`); 47 | } 48 | }); 49 | -------------------------------------------------------------------------------- /plugins/updaterold.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | const { cmd, commands } = require('../command'); 4 | 5 | // Define the updatecmd command 6 | cmd({ 7 | pattern: 'updatecmd', 8 | react: '🧞', 9 | desc: 'Update commands.', 10 | category: 'owner', 11 | filename: __filename, 12 | }, async (conn, mek, m, { 13 | from, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, 14 | botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, 15 | participants, groupAdmins, isBotAdmins, isAdmins, reply 16 | }) => { 17 | try { 18 | // Check if the user is the bot owner 19 | if (!isOwner) { 20 | return reply("Only the bot owner can use this command."); 21 | } 22 | 23 | // Define the directory where plugins are located 24 | const pluginDir = path.join(__dirname, "../plugins"); 25 | 26 | // Check if the plugins directory exists 27 | if (!fs.existsSync(pluginDir)) { 28 | return reply("Plugins directory does not exist."); 29 | } 30 | 31 | const pluginFiles = fs.readdirSync(pluginDir); 32 | 33 | // Load each plugin file asynchronously 34 | for (const pluginFile of pluginFiles) { 35 | if (pluginFile.endsWith('.js')) { 36 | const pluginPath = path.join(pluginDir, pluginFile); 37 | 38 | try { 39 | // Dynamically require and load each plugin 40 | require(pluginPath); 41 | console.log(`Successfully loaded plugin: ${pluginFile}`); 42 | } catch (err) { 43 | console.error(`Error loading plugin ${pluginFile}:`, err); 44 | reply(`Error loading plugin ${pluginFile}: ${err.message}`); 45 | } 46 | } 47 | } 48 | 49 | // Send confirmation that commands were updated 50 | reply("Commands updated successfully."); 51 | } catch (error) { 52 | // Log and display any errors 53 | console.error("Error updating commands:", error); 54 | reply("Error updating commands: " + error.message); 55 | } 56 | }); 57 | -------------------------------------------------------------------------------- /plugins/url.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const FormData = require("form-data"); 3 | const fs = require('fs'); 4 | const os = require('os'); 5 | const path = require('path'); 6 | const { cmd } = require("../command"); 7 | 8 | cmd({ 9 | 'pattern': "tourl", 10 | 'alias': ["imgtourl", "img2url", "url"], 11 | 'react': '🖇', 12 | 'desc': "Convert an image to a URL using imgbb.", 13 | 'category': "utility", 14 | 'use': ".tourl", 15 | 'filename': __filename 16 | }, async (_0x2a615f, _0x296ebb, _0x131287, _0x46c0dd) => { 17 | const { from: _0x462e92, quoted: _0x38fbf1, reply: _0x74c833, sender: _0x5931e7 } = _0x46c0dd; 18 | try { 19 | const _0x2fc0f4 = _0x296ebb.quoted ? _0x296ebb.quoted : _0x296ebb; 20 | const _0x4dd0ec = (_0x2fc0f4.msg || _0x2fc0f4).mimetype || ''; 21 | 22 | // Debugging image mime type 23 | console.log("Image mime type: ", _0x4dd0ec); 24 | 25 | if (!_0x4dd0ec || !_0x4dd0ec.startsWith("image")) { 26 | throw "🌻 Please reply to an image."; 27 | } 28 | 29 | // Download the image 30 | const _0x227cf8 = await _0x2fc0f4.download(); 31 | const _0x18c2b8 = path.join(os.tmpdir(), "temp_image"); 32 | fs.writeFileSync(_0x18c2b8, _0x227cf8); 33 | 34 | // Debugging: Check file size and existence 35 | console.log("Temporary file saved at:", _0x18c2b8); 36 | console.log("Image size: ", _0x227cf8.length, "bytes"); 37 | 38 | // Prepare image for upload 39 | const _0x1bf672 = new FormData(); 40 | _0x1bf672.append("image", fs.createReadStream(_0x18c2b8)); 41 | 42 | // Send image to imgbb 43 | const _0x338f64 = await axios.post("https://api.imgbb.com/1/upload?key=06d00f0e4520243a32b58138765a2ecc", _0x1bf672, { 44 | 'headers': { 45 | ..._0x1bf672.getHeaders() 46 | } 47 | }); 48 | 49 | // Debugging API response 50 | console.log("API Response:", _0x338f64.data); 51 | 52 | if (!_0x338f64.data || !_0x338f64.data.data || !_0x338f64.data.data.url) { 53 | throw "❌ Failed to upload the file."; 54 | } 55 | 56 | const _0x2b12b1 = _0x338f64.data.data.url; 57 | 58 | // Clean up the temporary file 59 | fs.unlinkSync(_0x18c2b8); 60 | 61 | const _0x273817 = { 62 | 'mentionedJid': [_0x5931e7], 63 | 'forwardingScore': 0x3e7, 64 | 'isForwarded': true, 65 | 'forwardedNewsletterMessageInfo': { 66 | 'newsletterJid': '120363200367779016@newsletter', 67 | 'newsletterName': "SILVA SPARK 🥰", 68 | 'serverMessageId': 0x8f 69 | } 70 | }; 71 | 72 | // Send the URL as a reply 73 | await _0x2a615f.sendMessage(_0x462e92, { 74 | 'text': `*Image Uploaded Successfully 📸*\nSize: ${_0x227cf8.length} Byte(s)\n*URL:* ${_0x2b12b1}\n\n> ⚖️ Uploaded via SILVA-SPARK`, 75 | 'contextInfo': _0x273817 76 | }); 77 | 78 | } catch (_0x5db687) { 79 | // Handle errors and log them 80 | _0x74c833("Error: " + _0x5db687); 81 | console.error("Error occurred:", _0x5db687); 82 | } 83 | }); 84 | -------------------------------------------------------------------------------- /plugins/weather.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const config = require('../config'); 3 | const { cmd, commands } = require('../command'); 4 | cmd({ 5 | pattern: "weather", 6 | desc: "🌤 Get weather information for a location", 7 | react: "🌤", 8 | category: "other", 9 | filename: __filename 10 | }, 11 | async (conn, mek, m, { from, q, reply }) => { 12 | try { 13 | if (!q) return reply("❗ Please provide a city name. Usage: .weather [city name]"); 14 | const apiKey = '2d61a72574c11c4f36173b627f8cb177'; 15 | const city = q; 16 | const url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}&units=metric`; 17 | const response = await axios.get(url); 18 | const data = response.data; 19 | const weather = ` 20 | > 🌍 *Weather Information for ${data.name}, ${data.sys.country}* 🌍 21 | > 🌡️ *Temperature*: ${data.main.temp}°C 22 | > 🌡️ *Feels Like*: ${data.main.feels_like}°C 23 | > 🌡️ *Min Temp*: ${data.main.temp_min}°C 24 | > 🌡️ *Max Temp*: ${data.main.temp_max}°C 25 | > 💧 *Humidity*: ${data.main.humidity}% 26 | > ☁️ *Weather*: ${data.weather[0].main} 27 | > 🌫️ *Description*: ${data.weather[0].description} 28 | > 💨 *Wind Speed*: ${data.wind.speed} m/s 29 | > 🔽 *Pressure*: ${data.main.pressure} hPa 30 | 31 | > *© Powdered By Silva Spark* 32 | `; 33 | return reply(weather); 34 | } catch (e) { 35 | console.log(e); 36 | if (e.response && e.response.status === 404) { 37 | return reply("🚫 City not found. Please check the spelling and try again."); 38 | } 39 | return reply("⚠️ An error occurred while fetching the weather information. Please try again later."); 40 | } 41 | }); 42 | 43 | -------------------------------------------------------------------------------- /plugins/wikipediax.js: -------------------------------------------------------------------------------- 1 | const config = require('../config'); 2 | const { cmd, commands } = require('../command'); 3 | const wiki = require('wikipedia'); 4 | 5 | // Define the Wikipedia search command 6 | cmd({ 7 | pattern: "wiki", 8 | desc: "Search Wikipedia for information", 9 | category: "main", 10 | filename: __filename 11 | }, 12 | 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 }) => { 13 | try { 14 | // Check if a query was provided 15 | if (!q) { 16 | return reply('Please provide a search query.'); 17 | } 18 | 19 | // Fetch summary from Wikipedia 20 | const summary = await wiki.summary(q); 21 | 22 | // Format the reply 23 | let replyText = ` 24 | *📚 Wikipedia Summary 📚* 25 | 26 | 🔍 *Query*: _${q}_ 27 | 28 | 💬 *Title*: _${summary.title}_ 29 | 30 | 📝 *Summary*: _${summary.extract}_ 31 | 32 | 🔗 *URL*: ${summary.content_urls.desktop.page} 33 | 34 | > @ Powdered By Silva sPARK `; 35 | 36 | // Send the reply with the thumbnail image 37 | await conn.sendMessage(from, { image: { url: summary.originalimage.source }, caption: replyText }, { quoted: mek }); 38 | 39 | } catch (e) { 40 | console.log(e); 41 | reply(`Error: ${e.message}`); 42 | } 43 | }); 44 | -------------------------------------------------------------------------------- /plugins/yta.js: -------------------------------------------------------------------------------- 1 | const config = require('../config'); 2 | const { cmd } = require('../command'); 3 | const { ytsearch, ytmp3, ytmp4 } = require('@dark-yasiya/yt-dl.js'); 4 | 5 | cmd({ 6 | pattern: "play3", 7 | alias: ["audio2","song2","ytsong"], 8 | react: "🎶", 9 | desc: "Download Youtube song", 10 | category: "main", 11 | use: '.song < Yt url or Name >', 12 | filename: __filename 13 | }, 14 | async(conn, mek, m,{ from, prefix, quoted, q, reply }) => { 15 | try { 16 | if(!q) return await reply("Please give me Yt url or Name"); 17 | 18 | const yt = await ytsearch(q); 19 | if(yt.results.length < 1) return reply("Results not found!"); 20 | 21 | let yts = yt.results[0]; 22 | const ytdl = await ytmp3(yts.url); 23 | 24 | // Validate download URL 25 | if(!ytdl?.download?.url) return reply("Error fetching audio URL"); 26 | 27 | let ytmsg = `╭━━━〔 *SILVA SPARK MD* 〕━━━┈⊷ 28 | ┃▸┃๏ *MUSIC DOWNLOADER* 29 | ╭━━❐━⪼ 30 | ┇๏ *Title* - ${yts.title} 31 | ┇๏ *Duration* - ${yts.timestamp} 32 | ┇๏ *Views* - ${yts.views} 33 | ┇๏ *Author* - ${yts.author.name} 34 | ┇๏ *Link* - ${yts.url} 35 | ╰━━❑━⪼ 36 | > *© SILVA SPARK ♡*`; 37 | 38 | // Send details with thumbnail 39 | await conn.sendMessage(from, { 40 | image: { url: yts.thumbnail || yts.image || '' }, 41 | caption: ytmsg 42 | }, { quoted: mek }); 43 | 44 | // Send as audio message 45 | await conn.sendMessage(from, { 46 | audio: { url: ytdl.download.url }, 47 | mimetype: "audio/mpeg", 48 | ptt: false 49 | }, { quoted: mek }); 50 | 51 | // Send as document 52 | await conn.sendMessage(from, { 53 | document: { url: ytdl.download.url }, 54 | mimetype: "audio/mpeg", 55 | fileName: `${yts.title.replace(/[^a-zA-Z0-9]/g, '_')}.mp3`, // Sanitize filename 56 | caption: `> *© Powered By SILVA SPARK ♡*` 57 | }, { quoted: mek }); 58 | 59 | } catch (e) { 60 | console.error(e); 61 | reply("Error processing request: " + e.message); 62 | }}); 63 | -------------------------------------------------------------------------------- /plugins/yts.js: -------------------------------------------------------------------------------- 1 | const { 2 | cmd, 3 | commands 4 | } = require("../command"); 5 | const { 6 | getBuffer, 7 | getGroupAdmins, 8 | getRandom, 9 | h2k, 10 | isUrl, 11 | Json, 12 | runtime, 13 | sleep, 14 | fetchJson 15 | } = require('../lib/functions'); 16 | cmd({ 17 | 'pattern': "yts", 18 | 'alias': ['ytsearch'], 19 | 'use': ".yts jawad bahi", 20 | 'react': '🎶', 21 | 'desc': "Search and get details from youtube.", 22 | 'category': 'search', 23 | 'filename': __filename 24 | }, async (_0x8bb7a2, _0x59b91a, _0x54b028, { 25 | from: _0x2c8a8a, 26 | l: _0x20f49c, 27 | quoted: _0x227a69, 28 | body: _0x3e4688, 29 | isCmd: _0x274fd7, 30 | umarmd: _0xf1ebe2, 31 | args: _0x1bbc32, 32 | q: _0x1711f7, 33 | isGroup: _0x2a64f7, 34 | sender: _0x170bd7, 35 | senderNumber: _0x37a8a8, 36 | botNumber2: _0x125009, 37 | botNumber: _0x27d020, 38 | pushname: _0x29b8f1, 39 | isMe: _0x4ebc14, 40 | isOwner: _0xff9e5a, 41 | groupMetadata: _0x2a783c, 42 | groupName: _0x438dbf, 43 | participants: _0xc08876, 44 | groupAdmins: _0x34bc3e, 45 | isBotAdmins: _0x30496e, 46 | isAdmins: _0x21b602, 47 | reply: _0x2758de 48 | }) => { 49 | try { 50 | if (!_0x1711f7) { 51 | return _0x2758de("*Please give me words to search*"); 52 | } 53 | try { 54 | let _0x2e5a42 = require('yt-search'); 55 | var _0x569f7f = await _0x2e5a42(_0x1711f7); 56 | } catch (_0x5f5996) { 57 | _0x20f49c(_0x5f5996); 58 | return await _0x8bb7a2.sendMessage(_0x2c8a8a, { 59 | 'text': "*Error !!*" 60 | }, { 61 | 'quoted': _0x59b91a 62 | }); 63 | } 64 | var _0x7ecaa0 = ''; 65 | _0x569f7f.all.map(_0x48f334 => { 66 | _0x7ecaa0 += " *🖲️" + _0x48f334.title + "*\n🔗 " + _0x48f334.url + "\n\n"; 67 | }); 68 | await _0x8bb7a2.sendMessage(_0x2c8a8a, { 69 | 'text': _0x7ecaa0 70 | }, { 71 | 'quoted': _0x59b91a 72 | }); 73 | } catch (_0x551e2c) { 74 | _0x20f49c(_0x551e2c); 75 | _0x2758de("*Error !!*"); 76 | } 77 | }); 78 | -------------------------------------------------------------------------------- /sessions/temp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sylivanus/SilvaSpark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SilvaTechB/silva-spark-md/ac7e72d6ac6315fc1f87fe18d5cb3772df309526/sylivanus/SilvaSpark.png -------------------------------------------------------------------------------- /sylivanus/silva: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------------------------------------------