@queenanya/baileys 7.3.5 → 7.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.anya-md/.replit +2 -0
- package/.anya-md/.temp/.temp +1 -0
- package/.anya-md/Dockerfile +16 -0
- package/.anya-md/LICENCE +674 -0
- package/.anya-md/README.md +301 -0
- package/.anya-md/app.json +81 -0
- package/.anya-md/config.js +74 -0
- package/.anya-md/heroku.yml +5 -0
- package/.anya-md/index.js +47 -0
- package/.anya-md/koyeb.yaml +14 -0
- package/.anya-md/lib/.dev.js +47 -0
- package/.anya-md/lib/Assets/aliveMedia.mp4 +0 -0
- package/.anya-md/lib/Assets/goodbyeBG.jpg +0 -0
- package/.anya-md/lib/Assets/image_1.jpg +0 -0
- package/.anya-md/lib/Assets/image_2.jpg +0 -0
- package/.anya-md/lib/Assets/menuMedia.mp4 +0 -0
- package/.anya-md/lib/Assets/ownerMentionMp3.mp3 +0 -0
- package/.anya-md/lib/Assets/port.html +36 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202410.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202412.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202413.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202414.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202415.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202416.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202417.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202418.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202419.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202420.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202421.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202423.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202425.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202426.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202427.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202428.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202429.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202430.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202431.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry108202469.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry10820249.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry11.mp4 +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry12.mp4 +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry14.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry2.mp4 +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry3.mp4 +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry5.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry6.png +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry8.png +0 -0
- package/.anya-md/lib/Assets/reaction/angry/angry9.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/confused/confused1.png +0 -0
- package/.anya-md/lib/Assets/reaction/confused/confused2.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/confused/confused3.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/confused/confused4.mp4 +0 -0
- package/.anya-md/lib/Assets/reaction/confused/confused5.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/confused/confused6.webp +0 -0
- package/.anya-md/lib/Assets/reaction/confused/confused7.png +0 -0
- package/.anya-md/lib/Assets/reaction/confused/confused8.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry1.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry12.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry13.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry14.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry15.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry16.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry17.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry18.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry19.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry22.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry23.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry5.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/cry/cry9.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/happy/happyrect1.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/no/_pika +1 -0
- package/.anya-md/lib/Assets/reaction/no/no1.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/no/no2.png +0 -0
- package/.anya-md/lib/Assets/reaction/no/no3.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/no/no4.png +0 -0
- package/.anya-md/lib/Assets/reaction/no/no5.png +0 -0
- package/.anya-md/lib/Assets/reaction/no/no6.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/no/no7.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/no/no8.jpg +0 -0
- package/.anya-md/lib/Assets/reaction/no/no9.mp4 +0 -0
- package/.anya-md/lib/Assets/reaction/smug/059e1bdc-e62a-4943-b85e-ea372709f6a7.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/smug/8fda90b3-bc98-4d24-ac10-4402c4e7be93.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/smug/Aqua.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/smug/Karasuma Chitose.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/smug/Smug Face - Fibel Sistine.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/smug/bf8d78ec-4fcc-4ff7-b3c3-91a0c5f22567.jpeg +0 -0
- package/.anya-md/lib/Assets/reaction/smug//330/247/330/255/331/204/330/247/331/213 /330/247/330/250/330/252/330/263/330/247/331/205/331/207 /330/264/330/261/331/212/330/261/331/207/360/237/230/255/360/237/230/255/360/237/230/255.jpeg +0 -0
- package/.anya-md/lib/Assets/verifyIMG.jpg +0 -0
- package/.anya-md/lib/Assets/welcomeGIF.mp4 +0 -0
- package/.anya-md/lib/database/categories.json +77 -0
- package/.anya-md/lib/database/cooldown.json +1 -0
- package/.anya-md/lib/database/disk/main.js +43 -0
- package/.anya-md/lib/database/emoji.js +23 -0
- package/.anya-md/lib/database/games/quiz/Questions.js +44 -0
- package/.anya-md/lib/database/games/quiz/Quiz.js +169 -0
- package/.anya-md/lib/database/games/quiz/database.json +1 -0
- package/.anya-md/lib/database/games/quiz/index.js +7 -0
- package/.anya-md/lib/database/json/.pika.js +3 -0
- package/.anya-md/lib/database/json/animeQuotes.json +51062 -0
- package/.anya-md/lib/database/json/bioQuotes.json +5744 -0
- package/.anya-md/lib/database/json/cogan.json +102 -0
- package/.anya-md/lib/database/json/countries.json +21210 -0
- package/.anya-md/lib/database/json/countries2.json +1 -0
- package/.anya-md/lib/database/json/couplepp.json +725 -0
- package/.anya-md/lib/database/json/flaming.json +7 -0
- package/.anya-md/lib/database/json/ganpati.json +102 -0
- package/.anya-md/lib/database/json/husbu.json +1967 -0
- package/.anya-md/lib/database/json/islamicWall.json +501 -0
- package/.anya-md/lib/database/json/pickupLines.json +118 -0
- package/.anya-md/lib/database/json/shreeram.json +49 -0
- package/.anya-md/lib/database/json/truthDare.json +643 -0
- package/.anya-md/lib/database/mongodb/README.md +142 -0
- package/.anya-md/lib/database/mongodb/bot.js +12 -0
- package/.anya-md/lib/database/mongodb/cmd.js +17 -0
- package/.anya-md/lib/database/mongodb/group.js +22 -0
- package/.anya-md/lib/database/mongodb/index.js +24 -0
- package/.anya-md/lib/database/mongodb/plugins.js +124 -0
- package/.anya-md/lib/database/mongodb/system.js +34 -0
- package/.anya-md/lib/database/mongodb/ui.js +15 -0
- package/.anya-md/lib/database/mongodb/user.js +17 -0
- package/.anya-md/lib/database/mongodb/warn.js +136 -0
- package/.anya-md/lib/database/sessions/.pika.js +3 -0
- package/.anya-md/lib/frameworks/index.js +5 -0
- package/.anya-md/lib/frameworks/reactionMedia.js +91 -0
- package/.anya-md/lib/lib/README.md +29 -0
- package/.anya-md/lib/lib/ai/README.md +35 -0
- package/.anya-md/lib/lib/ai/aiArt.js +47 -0
- package/.anya-md/lib/lib/ai/index.js +7 -0
- package/.anya-md/lib/lib/buttons.js +530 -0
- package/.anya-md/lib/lib/connectionMsg.js +72 -0
- package/.anya-md/lib/lib/converter.js +355 -0
- package/.anya-md/lib/lib/cooldown.js +46 -0
- package/.anya-md/lib/lib/events.js +47 -0
- package/.anya-md/lib/lib/functions.js +47 -0
- package/.anya-md/lib/lib/greeting.js +115 -0
- package/.anya-md/lib/lib/index.js +381 -0
- package/.anya-md/lib/lib/logger.js +7 -0
- package/.anya-md/lib/lib/maker/remini.js +35 -0
- package/.anya-md/lib/lib/mongoUrlFix.js +46 -0
- package/.anya-md/lib/lib/myfunc.js +47 -0
- package/.anya-md/lib/lib/plugins.js +20 -0
- package/.anya-md/lib/lib/prefix.js +47 -0
- package/.anya-md/lib/lib/scraper/README.md +35 -0
- package/.anya-md/lib/lib/scraper/SoundCloud.js +47 -0
- package/.anya-md/lib/lib/scraper/WebToons.js +47 -0
- package/.anya-md/lib/lib/scraper/android1.js +47 -0
- package/.anya-md/lib/lib/scraper/happymodSearch.js +47 -0
- package/.anya-md/lib/lib/scraper/index.js +27 -0
- package/.anya-md/lib/lib/scraper/konaChanSearch.js +47 -0
- package/.anya-md/lib/lib/scraper/pinterest.js +47 -0
- package/.anya-md/lib/lib/scraper/playstore.js +47 -0
- package/.anya-md/lib/lib/scraper/ringtone.js +47 -0
- package/.anya-md/lib/lib/scraper/steam.js +47 -0
- package/.anya-md/lib/lib/scraper/trendingTwitter.js +51 -0
- package/.anya-md/lib/lib/scraper/wattpad.js +61 -0
- package/.anya-md/lib/lib/scraper/wikipediaSearch.js +42 -0
- package/.anya-md/lib/lib/scraper.js +47 -0
- package/.anya-md/lib/lib/session.js +47 -0
- package/.anya-md/lib/lib/session2.js +47 -0
- package/.anya-md/lib/lib/similar.js +47 -0
- package/.anya-md/lib/lib/stylish-font.js +2302 -0
- package/.anya-md/lib/lib/unicode.js +877 -0
- package/.anya-md/lib/lib/upload/index.js +3 -0
- package/.anya-md/lib/lib/upload/webp2mp4File.js +56 -0
- package/.anya-md/lib/lib/ytdl-core.js +47 -0
- package/.anya-md/lib/plugins/README.md +83 -0
- package/.anya-md/lib/plugins/_menu.js +810 -0
- package/.anya-md/lib/plugins/_plugins.js +239 -0
- package/.anya-md/lib/plugins/admins.js +689 -0
- package/.anya-md/lib/plugins/ai.js +160 -0
- package/.anya-md/lib/plugins/autoreply.js +101 -0
- package/.anya-md/lib/plugins/broadcast.js +204 -0
- package/.anya-md/lib/plugins/convert.js +293 -0
- package/.anya-md/lib/plugins/core.js +941 -0
- package/.anya-md/lib/plugins/download.js +373 -0
- package/.anya-md/lib/plugins/fun.js +75 -0
- package/.anya-md/lib/plugins/games.js +33 -0
- package/.anya-md/lib/plugins/gcswitches.js +204 -0
- package/.anya-md/lib/plugins/general.js +456 -0
- package/.anya-md/lib/plugins/maker.js +41 -0
- package/.anya-md/lib/plugins/owner.js +1049 -0
- package/.anya-md/lib/plugins/religious.js +81 -0
- package/.anya-md/lib/plugins/search.js +902 -0
- package/.anya-md/lib/plugins/stalker.js +187 -0
- package/.anya-md/lib/plugins/sticker.js +125 -0
- package/.anya-md/lib/plugins/tools.js +193 -0
- package/.anya-md/lib/plugins/youtube.js +204 -0
- package/.anya-md/package.json +75 -0
- package/.anya-md/railway.json +12 -0
- package/.anya-md/render.yaml +48 -0
- package/.anya-md/replit.nix +18 -0
- package/.bash_history +500 -0
- package/.config/gh/config.yml +19 -0
- package/.config/gh/hosts.yml +11 -0
- package/.config/ngrok/ngrok.yml +3 -0
- package/.config/yarn/global/package.json +5 -0
- package/.gitconfig +772 -0
- package/.node_repl_history +0 -0
- package/.npm/_cacache/content-v2/sha512/02/b3/d1abf5af06222f7de440ab1b057deb21f9dfb0ce0a8f5064b2ba00595933bbcbbaa040b4616f951d9f8ba48d67491df1198a4831fbd8ee26eb27dde36511 +0 -0
- package/.npm/_cacache/content-v2/sha512/49/7b/0cdbb4861f7c9358a7367ca478498371b269efb8143d75de901ed1169a267f56a68e60f008952f3ebcc727dbb60bb401011af3514a1dd33cdbed8d981fa8 +0 -0
- package/.npm/_cacache/content-v2/sha512/54/3a/647bceb49b7632e6e700cb9f1b66f0f528d4ca71f4f73e76a1e7c8c50b563a2d0bb7734c18f93e6c03b7ea93167db35db0e1999ab13b08ed6b250eed2d2a +1 -0
- package/.npm/_cacache/content-v2/sha512/56/7c/4d5820233a7278225351642f7355d9889af42e7efbbfe27d6b201727efad972a59fa32063c7e1159d01dbf27ba014095ca1349ec0d0767746c39441178fa +1 -0
- package/.npm/_cacache/content-v2/sha512/89/88/d295c7e4f4d0f4621676d4c499bea2a1c72b0c31a84ff78a8bb8f83042da2bcf596e664c021d21025b296cdd4aecb57a036ea366e39466df5a129fa471df +0 -0
- package/.npm/_cacache/content-v2/sha512/8b/46/42882ebb46a975b0ce6b9cdea357190c41b51bb59a21df41c575418850b28115921e130709846d8ff9cabeae72544ec37a48ee7ccb074fe94da925250e55 +1 -0
- package/.npm/_cacache/content-v2/sha512/dd/0d/f856b793da0619d18260556498dfff13391593abb6d6a582bf052f03ba35a03a1444bf5c2d40b7515d268ec2cb3e67a17a42f09f5e668c3bb9b743e3b8a7 +1 -0
- package/.npm/_cacache/content-v2/sha512/dd/15/702501c36ce653a003d2b101034a0cb9c0fd262fa77797f1a286a161a0b2dce51ef13199e9a3fa58008bdbbf4646a33b6f1a24a2807691093cb89beefb00 +1 -0
- package/.npm/_cacache/index-v5/35/f9/e8cc076ef93c1bc40804d3fe05171053366095c922f515b1fab2b580116f +4 -0
- package/.npm/_cacache/index-v5/6a/a2/780c77f928115d4dad58a9dc4fa241de8d914abfff994e44602cc93a697c +2 -0
- package/.npm/_cacache/index-v5/71/ba/d0bb16fddeb617bbbb3713f46750d1bf5b57742abb6feb6dee4d16c68da4 +4 -0
- package/.npm/_cacache/index-v5/72/ae/c69532318093b3bd13618450ca5c26adc018a4afc0e020786207068593cf +2 -0
- package/.npm/_cacache/index-v5/7e/5e/9683ad4854f4201d7e53bf9beb2aefafa7b1efbb2c6ac7b36b78d0b218c8 +2 -0
- package/.npm/_cacache/index-v5/eb/a0/19e529094c594367a9e1aa68096a313d3dc5509d410761bf50122826a6d2 +4 -0
- package/.npm/_cacache/index-v5/f1/fa/2d2f12de549683d1275ec0f2ff15610b408fd89d1b7a755ddb7b77c00371 +2 -0
- package/.npm/_logs/2024-10-03T05_52_01_853Z-debug-0.log +52 -0
- package/.npm/_logs/2024-10-03T05_52_08_135Z-debug-0.log +52 -0
- package/.npm/_logs/2024-10-03T05_52_14_087Z-debug-0.log +52 -0
- package/.npm/_logs/2024-10-03T05_52_22_730Z-debug-0.log +52 -0
- package/.npm/_logs/2024-10-03T05_52_29_410Z-debug-0.log +52 -0
- package/.npm/_logs/2024-10-03T05_52_35_375Z-debug-0.log +52 -0
- package/.npm/_logs/2024-10-03T15_32_57_465Z-debug-0.log +20 -0
- package/.npm/_logs/2024-10-10T05_40_23_847Z-debug-0.log +254 -0
- package/.npm/_logs/2024-10-10T05_40_50_397Z-debug-0.log +73 -0
- package/.npm/_logs/2024-10-10T05_40_59_931Z-debug-0.log +52 -0
- package/.npm/_logs/2024-10-10T05_42_07_969Z-debug-0.log +52 -0
- package/.pm2/logs/anya-error.log +0 -0
- package/.pm2/logs/anya-out.log +59 -0
- package/.pm2/logs/anya-v2-error.log +2184 -0
- package/.pm2/logs/anya-v2-out.log +362 -0
- package/.pm2/module_conf.json +1 -0
- package/.pm2/pm2.log +919 -0
- package/.pm2/pm2.pid +1 -0
- package/.pm2/touch +1 -0
- package/.ssh/authorized_keys +0 -0
- package/.termux/termux.properties +180 -0
- package/.wget-hsts +5 -0
- package/package.json +2 -102
- package/LICENSE +0 -21
- package/README.md +0 -941
- package/WAProto/GenerateStatics.sh +0 -4
- package/WAProto/WAProto.proto +0 -3344
- package/WAProto/index.d.ts +0 -37016
- package/WAProto/index.js +0 -101044
- package/WASignalGroup/GroupProtocol.js +0 -1697
- package/WASignalGroup/ciphertext_message.js +0 -16
- package/WASignalGroup/group_cipher.js +0 -120
- package/WASignalGroup/group_session_builder.js +0 -46
- package/WASignalGroup/index.js +0 -5
- package/WASignalGroup/keyhelper.js +0 -21
- package/WASignalGroup/protobufs.js +0 -3
- package/WASignalGroup/queue_job.js +0 -69
- package/WASignalGroup/sender_chain_key.js +0 -50
- package/WASignalGroup/sender_key_distribution_message.js +0 -78
- package/WASignalGroup/sender_key_message.js +0 -92
- package/WASignalGroup/sender_key_name.js +0 -70
- package/WASignalGroup/sender_key_record.js +0 -56
- package/WASignalGroup/sender_key_state.js +0 -129
- package/WASignalGroup/sender_message_key.js +0 -39
- package/lib/Defaults/baileys-version.json +0 -3
- package/lib/Defaults/index.d.ts +0 -284
- package/lib/Defaults/index.js +0 -122
- package/lib/Defaults/phonenumber-mcc.json +0 -223
- package/lib/Signal/libsignal.d.ts +0 -3
- package/lib/Signal/libsignal.js +0 -152
- package/lib/Socket/Client/abstract-socket-client.d.ts +0 -17
- package/lib/Socket/Client/abstract-socket-client.js +0 -13
- package/lib/Socket/Client/index.d.ts +0 -3
- package/lib/Socket/Client/index.js +0 -19
- package/lib/Socket/Client/mobile-socket-client.d.ts +0 -13
- package/lib/Socket/Client/mobile-socket-client.js +0 -65
- package/lib/Socket/Client/web-socket-client.d.ts +0 -12
- package/lib/Socket/Client/web-socket-client.js +0 -62
- package/lib/Socket/business.d.ts +0 -177
- package/lib/Socket/business.js +0 -260
- package/lib/Socket/chats.d.ts +0 -91
- package/lib/Socket/chats.js +0 -948
- package/lib/Socket/groups.d.ts +0 -137
- package/lib/Socket/groups.js +0 -314
- package/lib/Socket/index.d.ts +0 -179
- package/lib/Socket/index.js +0 -10
- package/lib/Socket/messages-recv.d.ts +0 -164
- package/lib/Socket/messages-recv.js +0 -921
- package/lib/Socket/messages-send.d.ts +0 -157
- package/lib/Socket/messages-send.js +0 -779
- package/lib/Socket/newsletter.d.ts +0 -143
- package/lib/Socket/newsletter.js +0 -249
- package/lib/Socket/registration.d.ts +0 -271
- package/lib/Socket/registration.js +0 -166
- package/lib/Socket/socket.d.ts +0 -44
- package/lib/Socket/socket.js +0 -620
- package/lib/Store/index.d.ts +0 -3
- package/lib/Store/index.js +0 -10
- package/lib/Store/make-cache-manager-store.d.ts +0 -14
- package/lib/Store/make-cache-manager-store.js +0 -83
- package/lib/Store/make-in-memory-store.d.ts +0 -118
- package/lib/Store/make-in-memory-store.js +0 -422
- package/lib/Store/make-ordered-dictionary.d.ts +0 -13
- package/lib/Store/make-ordered-dictionary.js +0 -81
- package/lib/Store/object-repository.d.ts +0 -10
- package/lib/Store/object-repository.js +0 -27
- package/lib/Types/Auth.d.ts +0 -111
- package/lib/Types/Auth.js +0 -2
- package/lib/Types/Call.d.ts +0 -13
- package/lib/Types/Call.js +0 -2
- package/lib/Types/Chat.d.ts +0 -107
- package/lib/Types/Chat.js +0 -4
- package/lib/Types/Contact.d.ts +0 -19
- package/lib/Types/Contact.js +0 -2
- package/lib/Types/Events.d.ts +0 -199
- package/lib/Types/Events.js +0 -2
- package/lib/Types/GroupMetadata.d.ts +0 -56
- package/lib/Types/GroupMetadata.js +0 -2
- package/lib/Types/Label.d.ts +0 -46
- package/lib/Types/Label.js +0 -27
- package/lib/Types/LabelAssociation.d.ts +0 -29
- package/lib/Types/LabelAssociation.js +0 -9
- package/lib/Types/Message.d.ts +0 -278
- package/lib/Types/Message.js +0 -9
- package/lib/Types/Newsletter.d.ts +0 -79
- package/lib/Types/Newsletter.js +0 -18
- package/lib/Types/Product.d.ts +0 -78
- package/lib/Types/Product.js +0 -2
- package/lib/Types/Signal.d.ts +0 -57
- package/lib/Types/Signal.js +0 -2
- package/lib/Types/Socket.d.ts +0 -118
- package/lib/Types/Socket.js +0 -2
- package/lib/Types/State.d.ts +0 -27
- package/lib/Types/State.js +0 -2
- package/lib/Types/index.d.ts +0 -65
- package/lib/Types/index.js +0 -42
- package/lib/Utils/auth-utils.d.ts +0 -18
- package/lib/Utils/auth-utils.js +0 -206
- package/lib/Utils/baileys-event-stream.d.ts +0 -16
- package/lib/Utils/baileys-event-stream.js +0 -63
- package/lib/Utils/business.d.ts +0 -22
- package/lib/Utils/business.js +0 -234
- package/lib/Utils/chat-utils.d.ts +0 -72
- package/lib/Utils/chat-utils.js +0 -740
- package/lib/Utils/crypto.d.ts +0 -42
- package/lib/Utils/crypto.js +0 -153
- package/lib/Utils/decode-wa-message.d.ts +0 -20
- package/lib/Utils/decode-wa-message.js +0 -207
- package/lib/Utils/event-buffer.d.ts +0 -35
- package/lib/Utils/event-buffer.js +0 -520
- package/lib/Utils/generics.d.ts +0 -115
- package/lib/Utils/generics.js +0 -440
- package/lib/Utils/history.d.ts +0 -19
- package/lib/Utils/history.js +0 -94
- package/lib/Utils/index.d.ts +0 -17
- package/lib/Utils/index.js +0 -33
- package/lib/Utils/link-preview.d.ts +0 -21
- package/lib/Utils/link-preview.js +0 -93
- package/lib/Utils/logger.d.ts +0 -2
- package/lib/Utils/logger.js +0 -7
- package/lib/Utils/lt-hash.d.ts +0 -12
- package/lib/Utils/lt-hash.js +0 -51
- package/lib/Utils/make-mutex.d.ts +0 -7
- package/lib/Utils/make-mutex.js +0 -43
- package/lib/Utils/messages-media.d.ts +0 -131
- package/lib/Utils/messages-media.js +0 -793
- package/lib/Utils/messages.d.ts +0 -78
- package/lib/Utils/messages.js +0 -771
- package/lib/Utils/noise-handler.d.ts +0 -22
- package/lib/Utils/noise-handler.js +0 -155
- package/lib/Utils/process-message.d.ts +0 -42
- package/lib/Utils/process-message.js +0 -354
- package/lib/Utils/signal.d.ts +0 -32
- package/lib/Utils/signal.js +0 -156
- package/lib/Utils/use-multi-file-auth-state.d.ts +0 -12
- package/lib/Utils/use-multi-file-auth-state.js +0 -93
- package/lib/Utils/validate-connection.d.ts +0 -11
- package/lib/Utils/validate-connection.js +0 -205
- package/lib/WABinary/constants.d.ts +0 -27
- package/lib/WABinary/constants.js +0 -40
- package/lib/WABinary/decode.d.ts +0 -8
- package/lib/WABinary/decode.js +0 -254
- package/lib/WABinary/encode.d.ts +0 -2
- package/lib/WABinary/encode.js +0 -228
- package/lib/WABinary/generic-utils.d.ts +0 -16
- package/lib/WABinary/generic-utils.js +0 -110
- package/lib/WABinary/index.d.ts +0 -5
- package/lib/WABinary/index.js +0 -21
- package/lib/WABinary/jid-utils.d.ts +0 -31
- package/lib/WABinary/jid-utils.js +0 -62
- package/lib/WABinary/types.d.ts +0 -18
- package/lib/WABinary/types.js +0 -2
- package/lib/WAM/BinaryInfo.d.ts +0 -18
- package/lib/WAM/BinaryInfo.js +0 -13
- package/lib/WAM/constants.d.ts +0 -38
- package/lib/WAM/constants.js +0 -15350
- package/lib/WAM/encode.d.ts +0 -4
- package/lib/WAM/encode.js +0 -155
- package/lib/WAM/index.d.ts +0 -3
- package/lib/WAM/index.js +0 -19
- package/lib/index.d.ts +0 -11
- package/lib/index.js +0 -30
|
@@ -0,0 +1,941 @@
|
|
|
1
|
+
const Config = require('../../config');
|
|
2
|
+
const {
|
|
3
|
+
anya,
|
|
4
|
+
delay,
|
|
5
|
+
UI,
|
|
6
|
+
Bot,
|
|
7
|
+
System,
|
|
8
|
+
Cmd,
|
|
9
|
+
reactions,
|
|
10
|
+
fancy13,
|
|
11
|
+
greetTime,
|
|
12
|
+
getBuffer,
|
|
13
|
+
formatRuntime
|
|
14
|
+
} = require('../lib');
|
|
15
|
+
|
|
16
|
+
//༺─────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
anya(
|
|
19
|
+
{
|
|
20
|
+
name: "support",
|
|
21
|
+
react: "🤝🏻",
|
|
22
|
+
category: "core",
|
|
23
|
+
desc: "Get official support gc link!",
|
|
24
|
+
filename: __filename
|
|
25
|
+
},
|
|
26
|
+
async (anyaV2, pika, {}, { boxKey }) => {
|
|
27
|
+
// ⚠️ Don't change this url! you'll mislead them!
|
|
28
|
+
await anyaV2.sendMessage(pika.chat, {
|
|
29
|
+
text: `\`SUPPORT LINK..! 🌙\`\n_🔗 ${boxKey.support} ;_\n\n> ${Config.footer}`,
|
|
30
|
+
contextInfo: {
|
|
31
|
+
externalAdReply: {
|
|
32
|
+
renderLargerThumbnail: true,
|
|
33
|
+
thumbnailUrl: "https://iili.io/dlNWfs4.jpg",
|
|
34
|
+
title: "𝐏𝐢𝐤𝐚𝐁𝐨𝐭𝐳 𝐒𝐮𝐩𝐩𝐨𝐫𝐭 𝐆𝐫𝐨𝐮𝐩 🗣️🌙",
|
|
35
|
+
mediaType: 1,
|
|
36
|
+
mediaUrl: boxKey.support,
|
|
37
|
+
sourceUrl: boxKey.support
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, { quoted:pika });
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
//༺─────────────────────────────────────
|
|
45
|
+
|
|
46
|
+
anya(
|
|
47
|
+
{
|
|
48
|
+
name: "request",
|
|
49
|
+
react: "🛐",
|
|
50
|
+
category: "core",
|
|
51
|
+
desc: "Request to main developer",
|
|
52
|
+
filename: __filename
|
|
53
|
+
},
|
|
54
|
+
async (anyaV2, pika, { args }, { boxKey }) => {
|
|
55
|
+
if (args.length < 1) return pika.reply("_*❗Enter a request!*_\ne.g. \"Please make an insta downloader command!\"");
|
|
56
|
+
const botNumber = await anyaV2.decodeJid(anyaV2.user.id);
|
|
57
|
+
const requestMessage = args.join(" ");
|
|
58
|
+
const requester = pika.sender.split("@")[0];
|
|
59
|
+
const caption = [
|
|
60
|
+
"`</> | REQUEST | </>`\n\n",
|
|
61
|
+
`*| 🗣️ Request:* ${requestMessage}`,
|
|
62
|
+
`*| 🤖 Bot:* _@${botNumber.split("@")[0]}_`,
|
|
63
|
+
`*| 👤 Requested By:* _@${requester}_`
|
|
64
|
+
].join("\n");
|
|
65
|
+
await pika.reply("*✅ Good Job, Requested!*");
|
|
66
|
+
const buffer = await getBuffer("https://iili.io/dlkcLgt.jpg");
|
|
67
|
+
const mentions = [pika.sender, botNumber];
|
|
68
|
+
await anyaV2.sendMessage(pika.chat, {
|
|
69
|
+
image: buffer,
|
|
70
|
+
caption,
|
|
71
|
+
mentions
|
|
72
|
+
}, { quoted: pika });
|
|
73
|
+
const botConName = await anyaV2.getName(anyaV2.user.id);
|
|
74
|
+
const botConQuote = {
|
|
75
|
+
key: { participant: '0@s.whatsapp.net', remoteJid: 'status@broadcast' },
|
|
76
|
+
message: {
|
|
77
|
+
contactMessage: {
|
|
78
|
+
displayName: botConName,
|
|
79
|
+
vcard: `BEGIN:VCARD\nVERSION:3.0\nN:XL;${botConName};;;\nFN:${botConName}\nitem1.TEL;waid=${botNumber.split("@")[0]}:${botNumber.split("@")[0]}\nitem1.X-ABLabel:Mobile\nEND:VCARD`,
|
|
80
|
+
jpegThumbnail: Config.image_1,
|
|
81
|
+
thumbnailUrl: Config.imageUrl,
|
|
82
|
+
sendEphemeral: true
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const inviteCode = boxKey.box.split("https://chat.whatsapp.com/")[1];
|
|
87
|
+
const joinedGroup = await anyaV2.groupAcceptInvite(inviteCode);
|
|
88
|
+
await delay(1000);
|
|
89
|
+
await anyaV2.sendMessage(joinedGroup, { text: caption, mentions: mentions }, { quoted: botConQuote });
|
|
90
|
+
await delay(1000);
|
|
91
|
+
await anyaV2.groupLeave(joinedGroup);
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
//༺─────────────────────────────────────
|
|
96
|
+
|
|
97
|
+
anya(
|
|
98
|
+
{
|
|
99
|
+
name: "report",
|
|
100
|
+
alias: ['bug'],
|
|
101
|
+
react: "🐝",
|
|
102
|
+
category: "core",
|
|
103
|
+
desc: "Report bugs to main developer",
|
|
104
|
+
filename: __filename
|
|
105
|
+
},
|
|
106
|
+
async (anyaV2, pika, { args }, { boxKey }) => {
|
|
107
|
+
if (args.length < 1) return pika.reply("_What's the bug❓_");
|
|
108
|
+
const botNumber = await anyaV2.decodeJid(anyaV2.user.id);
|
|
109
|
+
const statement = args.join(" ");
|
|
110
|
+
const reporter = pika.sender.split("@")[0];
|
|
111
|
+
const mentions = [pika.sender, botNumber];
|
|
112
|
+
const caption = [
|
|
113
|
+
"`<⚠️> | BUG!! | <⚠️>`\n\n",
|
|
114
|
+
`*| 🗣️ Bug Statement:* ${statement}`,
|
|
115
|
+
`*| 🤖 Bot:* _@${botNumber.split("@")[0]}_`,
|
|
116
|
+
`*| 👤 Reported By:* _@${reporter}_`
|
|
117
|
+
].join("\n");
|
|
118
|
+
pika.reply("*💖 Thanks for reporting a bug!*");
|
|
119
|
+
await anyaV2.sendReactionMedia(pika.chat, {
|
|
120
|
+
reaction: "happy",
|
|
121
|
+
caption: caption,
|
|
122
|
+
mentions: mentions
|
|
123
|
+
}, { quoted:pika });
|
|
124
|
+
const botConName = await anyaV2.getName(anyaV2.user.id);
|
|
125
|
+
const botConQuote = {
|
|
126
|
+
key: { participant: '0@s.whatsapp.net', remoteJid: 'status@broadcast' },
|
|
127
|
+
message: {
|
|
128
|
+
contactMessage: {
|
|
129
|
+
displayName: botConName,
|
|
130
|
+
vcard: `BEGIN:VCARD\nVERSION:3.0\nN:XL;${botConName};;;\nFN:${botConName}\nitem1.TEL;waid=${botNumber.split("@")[0]}:${botNumber.split("@")[0]}\nitem1.X-ABLabel:Mobile\nEND:VCARD`,
|
|
131
|
+
jpegThumbnail: Config.image_1,
|
|
132
|
+
thumbnailUrl: Config.imageUrl,
|
|
133
|
+
sendEphemeral: true
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const inviteCode = boxKey.box.split("https://chat.whatsapp.com/")[1];
|
|
138
|
+
const joinedGroup = await anyaV2.groupAcceptInvite(inviteCode);
|
|
139
|
+
await delay(1000);
|
|
140
|
+
await anyaV2.sendMessage(joinedGroup, { text: caption, mentions: mentions }, { quoted: botConQuote });
|
|
141
|
+
await delay(1000);
|
|
142
|
+
await anyaV2.groupLeave(joinedGroup);
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
//༺─────────────────────────────────────
|
|
147
|
+
|
|
148
|
+
anya(
|
|
149
|
+
{
|
|
150
|
+
name: "uptime",
|
|
151
|
+
alias: ['runtime'],
|
|
152
|
+
react: "⏱️",
|
|
153
|
+
category: "core",
|
|
154
|
+
desc: "Get bot running time",
|
|
155
|
+
filename: __filename
|
|
156
|
+
},
|
|
157
|
+
async (anyaV2, pika) => {
|
|
158
|
+
return pika.reply("My Uptime : _" + formatRuntime(process.uptime()).trim() + "_");
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
//༺─────────────────────────────────────
|
|
163
|
+
|
|
164
|
+
anya({
|
|
165
|
+
name: "buttons",
|
|
166
|
+
alias: ['button'],
|
|
167
|
+
react: "🤍",
|
|
168
|
+
category: "core",
|
|
169
|
+
desc: "Enable or disable buttons",
|
|
170
|
+
rule: 1,
|
|
171
|
+
filename: __filename
|
|
172
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => {
|
|
173
|
+
const ui = db.UI[0] || await new UI({ id: "userInterface" }).save();
|
|
174
|
+
if (!args[0] || (args[0].toLowerCase() !== "on" && args[0].toLowerCase() !== "off")) return pika.reply(`*${Config.themeemoji} Example:* ${prefix + command} on/off\n\n> Turn off buttons if WhatsApp patched the buttons.`);
|
|
175
|
+
const isOn = args[0].toLowerCase() === "on";
|
|
176
|
+
if (isOn && ui.buttons) return pika.reply("_Already Enabled Buttons..!_");
|
|
177
|
+
if (!isOn && !ui.buttons) return pika.reply("_Already Disabled Buttons..!_");
|
|
178
|
+
await UI.updateOne({ id: "userInterface" }, { $set: { buttons: isOn } }, { new: true })
|
|
179
|
+
return pika.reply(isOn ? "✅ Buttons Turned On!" : "✅ Buttons Turned Off!");
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
//༺─────────────────────────────────────
|
|
183
|
+
|
|
184
|
+
anya({
|
|
185
|
+
name: "restart",
|
|
186
|
+
react: "♻️",
|
|
187
|
+
category: "core",
|
|
188
|
+
desc: "Use to restart the bot",
|
|
189
|
+
rule: 1,
|
|
190
|
+
filename: __filename
|
|
191
|
+
}, async (anyaV2, pika) => {
|
|
192
|
+
try {
|
|
193
|
+
pika.reply("༄ᵇᵒᵗ᭄🔥⃝яєѕταяτιиg🖤⭔⭔➣");
|
|
194
|
+
await delay(1500);
|
|
195
|
+
const { exec } = require("child_process");
|
|
196
|
+
exec('pm2 restart all', (error, stdout, stderr) => {
|
|
197
|
+
if (error) return pika.reply("‼️Failed to restart the bot: " + error.message);
|
|
198
|
+
if (stderr) return pika.reply("‼️PM2 stderr: " + stderr);
|
|
199
|
+
pika.reply("_🦋Bot restarted successfully!_");
|
|
200
|
+
});
|
|
201
|
+
} catch (error) {
|
|
202
|
+
const media = reactions.get("sad");
|
|
203
|
+
return await anyaV2.sendReactionMedia(pika.chat, {
|
|
204
|
+
buffer: media.buffer,
|
|
205
|
+
extension: media.extension,
|
|
206
|
+
caption: "_*⚠️ I'm not able to get restarted!*_\n\n`Reason:` " + error.message
|
|
207
|
+
}, { quoted: pika });
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
//༺─────────────────────────────────────
|
|
212
|
+
|
|
213
|
+
anya({
|
|
214
|
+
name: "setreply",
|
|
215
|
+
react: "⚙️",
|
|
216
|
+
category: "core",
|
|
217
|
+
desc: "Set text message reply type",
|
|
218
|
+
rule: 1,
|
|
219
|
+
filename: __filename
|
|
220
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => {
|
|
221
|
+
const types = {
|
|
222
|
+
1: "Text Message",
|
|
223
|
+
2: "Forwarded Text Message",
|
|
224
|
+
3: "Group Invitation Message",
|
|
225
|
+
4: "Channel Invitation Message",
|
|
226
|
+
5: "Money Request Message"
|
|
227
|
+
};
|
|
228
|
+
const ui = db.UI[0] || await new UI({ id: "userInterface" }).save();
|
|
229
|
+
const generateMessageList = () => {
|
|
230
|
+
let messageList = '';
|
|
231
|
+
for (const [key, value] of Object.entries(types)) {
|
|
232
|
+
messageList += `${key}. ${value + (ui.reply === Number(key) ? " ✅" : "")}\n`;
|
|
233
|
+
}
|
|
234
|
+
return messageList;
|
|
235
|
+
};
|
|
236
|
+
if (!args[0]) {
|
|
237
|
+
if (ui.buttons) {
|
|
238
|
+
const butArray = [];
|
|
239
|
+
const generateButtonList = () => {
|
|
240
|
+
for (const [key, value] of Object.entries(types)) {
|
|
241
|
+
butArray.push(`{"header":"💬 ${value}","title":"${ui.reply === Number(key) ? fancy13("(✅ already selected)") : ""}","description":"𝘵𝘢𝘱 𝘩𝘦𝘳𝘦 𝘵𝘰 𝘴𝘦𝘭𝘦𝘤𝘵 𝘵𝘩𝘪𝘴 𝘰𝘱𝘵𝘪𝘰𝘯","id":"${prefix + command} ${key}"}`);
|
|
242
|
+
}
|
|
243
|
+
return butArray;
|
|
244
|
+
};
|
|
245
|
+
generateButtonList();
|
|
246
|
+
return await anyaV2.sendButtonText(pika.chat, {
|
|
247
|
+
text: `*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]} 👋🏻*\n\n> *Current Setting:* _${types[ui.reply]}_`,
|
|
248
|
+
footer: Config.footer,
|
|
249
|
+
buttons: [{ "name": "single_select", "buttonParamsJson": `{"title":"Select Here!","sections":[{"title":"Reply Message Format Types.","highlight_label":"${Config.botname}","rows":[${butArray.join(",")}]}]}` }],
|
|
250
|
+
contextInfo: {
|
|
251
|
+
mentionedJid: [pika.sender]
|
|
252
|
+
}
|
|
253
|
+
}, { quoted: pika });
|
|
254
|
+
} else {
|
|
255
|
+
return pika.reply(`*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]}* ✨\n
|
|
256
|
+
\`Reply A Number To Choose Senpai!\`
|
|
257
|
+
\`\`\`
|
|
258
|
+
${await generateMessageList()}\`\`\`
|
|
259
|
+
> _ID: QA29_
|
|
260
|
+
`.trim(), { mentions: [pika.sender], forwarded: false });
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
const optionNum = Number(args[0]);
|
|
264
|
+
if (!optionNum || !types[optionNum]) return pika.reply(`_Invalid Option_`);
|
|
265
|
+
if (optionNum === ui.reply) return pika.reply(`☑️ Already set as *${types[optionNum]}*`);
|
|
266
|
+
pika.reply(Config.message.success);
|
|
267
|
+
return await UI.updateOne({ id: "userInterface" }, { $set: { reply: optionNum } }, { new: true });
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
//༺─────────────────────────────────────
|
|
271
|
+
|
|
272
|
+
anya({
|
|
273
|
+
name: "setmenu",
|
|
274
|
+
react: "⚙️",
|
|
275
|
+
category: "core",
|
|
276
|
+
desc: "Set menu message type",
|
|
277
|
+
rule: 1,
|
|
278
|
+
need: "number",
|
|
279
|
+
filename: __filename
|
|
280
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => {
|
|
281
|
+
const types = {
|
|
282
|
+
1: "Text Message",
|
|
283
|
+
2: "Image Message",
|
|
284
|
+
3: "Image Ad Reply",
|
|
285
|
+
4: "Video Message",
|
|
286
|
+
5: "GIF Message",
|
|
287
|
+
6: "Money Request Msg",
|
|
288
|
+
7: "Document Ad Reply",
|
|
289
|
+
8: "Image Ad Reply 2",
|
|
290
|
+
9: "GIF Ad Reply",
|
|
291
|
+
10: "GIF Channel Ad Forward",
|
|
292
|
+
11: "Image Button Message",
|
|
293
|
+
12: "Video Button Message"
|
|
294
|
+
};
|
|
295
|
+
const ui = db.UI[0] || await new UI({ id: "userInterface" }).save();
|
|
296
|
+
const generateMessageList = () => {
|
|
297
|
+
let messageList = '';
|
|
298
|
+
for (const [key, value] of Object.entries(types)) {
|
|
299
|
+
messageList += `${key}. ${value + (ui.menu === Number(key) ? " ✅" : "")}\n`;
|
|
300
|
+
}
|
|
301
|
+
return messageList;
|
|
302
|
+
};
|
|
303
|
+
if (!args[0]) {
|
|
304
|
+
if (ui.buttons) {
|
|
305
|
+
const butArray = [];
|
|
306
|
+
const generateButtonList = () => {
|
|
307
|
+
for (const [key, value] of Object.entries(types)) {
|
|
308
|
+
butArray.push(`{"header":"📃 ${value}","title":"${ui.menu === Number(key) ? fancy13("(✅ selected)") : ""}","description":"𝘵𝘢𝘱 𝘩𝘦𝘳𝘦 𝘵𝘰 𝘴𝘦𝘭𝘦𝘤𝘵 𝘵𝘩𝘪𝘴 𝘰𝘱𝘵𝘪𝘰𝘯","id":"${prefix + command} ${key}"}`);
|
|
309
|
+
}
|
|
310
|
+
return butArray;
|
|
311
|
+
};
|
|
312
|
+
generateButtonList();
|
|
313
|
+
return await anyaV2.sendButtonText(pika.chat, {
|
|
314
|
+
text: `*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]} 👋🏻*\n\n> *Current Setting:* _${types[ui.menu]}_`,
|
|
315
|
+
footer: Config.footer,
|
|
316
|
+
buttons: [{ "name": "single_select", "buttonParamsJson": `{"title":"Select Here❗","sections":[{"title":"Menu Message Format Types.","highlight_label":"${Config.botname}","rows":[${butArray.join(",")}]}]}` }],
|
|
317
|
+
contextInfo: {
|
|
318
|
+
mentionedJid: [pika.sender]
|
|
319
|
+
}
|
|
320
|
+
}, { quoted: pika });
|
|
321
|
+
|
|
322
|
+
} else {
|
|
323
|
+
return pika.reply(`*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]}* ✨\n
|
|
324
|
+
\`Reply A Number To Choose That Option!\`
|
|
325
|
+
\`\`\`
|
|
326
|
+
${await generateMessageList()}\`\`\`
|
|
327
|
+
> _ID: QA18_
|
|
328
|
+
`.trim(), { mentions: [pika.sender], forwarded: false });
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
const optionNum = Number(args[0]);
|
|
332
|
+
if (!optionNum || !types[optionNum]) return pika.reply(`_Invalid Option_`);
|
|
333
|
+
if (optionNum === ui.menu) return pika.reply(`☑️ Menu message already set as *${types[optionNum]}*.`);
|
|
334
|
+
pika.reply(Config.message.success);
|
|
335
|
+
return await UI.updateOne({ id: "userInterface" }, { $set: { menu: optionNum } }, { new: true });
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
//༺─────────────────────────────────────
|
|
340
|
+
|
|
341
|
+
anya({
|
|
342
|
+
name: "setlist",
|
|
343
|
+
alias: ['setlistmenu'],
|
|
344
|
+
react: "⚙️",
|
|
345
|
+
category: "core",
|
|
346
|
+
desc: "Set listmenu message type",
|
|
347
|
+
rule: 1,
|
|
348
|
+
need: "number",
|
|
349
|
+
filename: __filename
|
|
350
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => {
|
|
351
|
+
const types = {
|
|
352
|
+
1: "Text Message",
|
|
353
|
+
2: "Image Message",
|
|
354
|
+
3: "Text Ad Reply",
|
|
355
|
+
4: "Video Message",
|
|
356
|
+
5: "GIF Message",
|
|
357
|
+
6: "Document Ad Reply",
|
|
358
|
+
7: "Image Button Message",
|
|
359
|
+
8: "Video Button Message",
|
|
360
|
+
9: "Image Button Message 2",
|
|
361
|
+
10: "Video Button Message 2",
|
|
362
|
+
11: "Text Button Message"
|
|
363
|
+
};
|
|
364
|
+
const ui = db.UI[0] || await new UI({ id: "userInterface" }).save();
|
|
365
|
+
const generateMessageList = () => {
|
|
366
|
+
let messageList = '';
|
|
367
|
+
for (const [key, value] of Object.entries(types)) {
|
|
368
|
+
messageList += `${key}. ${value + (ui.listmenu === Number(key) ? " ✅" : "")}\n`;
|
|
369
|
+
}
|
|
370
|
+
return messageList;
|
|
371
|
+
};
|
|
372
|
+
if (!args[0]) {
|
|
373
|
+
if (ui.buttons) {
|
|
374
|
+
const butArray = [];
|
|
375
|
+
const generateButtonList = () => {
|
|
376
|
+
for (const [key, value] of Object.entries(types)) {
|
|
377
|
+
butArray.push(`{"header":"🔰 ${value}","title":"${ui.listmenu === Number(key) ? fancy13("(✅ selected)") : ""}","description":"𝘵𝘢𝘱 𝘩𝘦𝘳𝘦 𝘵𝘰 𝘴𝘦𝘭𝘦𝘤𝘵 𝘵𝘩𝘪𝘴 𝘰𝘱𝘵𝘪𝘰𝘯","id":"${prefix + command} ${key}"}`);
|
|
378
|
+
}
|
|
379
|
+
return butArray;
|
|
380
|
+
};
|
|
381
|
+
generateButtonList();
|
|
382
|
+
return await anyaV2.sendButtonText(pika.chat, {
|
|
383
|
+
text: `*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]} 👋🏻*\n\n> *Current Setting:* _${types[ui.listmenu]}_`,
|
|
384
|
+
footer: Config.footer,
|
|
385
|
+
buttons: [{ "name": "single_select", "buttonParamsJson": `{"title":"Choose Here🔰","sections":[{"title":"List Menu Message Format Types","highlight_label":"${Config.botname}","rows":[${butArray.join(",")}]}]}` }],
|
|
386
|
+
contextInfo: {
|
|
387
|
+
mentionedJid: [pika.sender]
|
|
388
|
+
}
|
|
389
|
+
}, { quoted: pika });
|
|
390
|
+
} else {
|
|
391
|
+
return pika.reply(`*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]}* ✨\n
|
|
392
|
+
\`Reply A Number To Choose That Option!\`
|
|
393
|
+
\`\`\`
|
|
394
|
+
${await generateMessageList()}\`\`\`
|
|
395
|
+
> _ID: QA44_
|
|
396
|
+
`.trim(), { mentions: [pika.sender], forwarded: false });
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
const optionNum = Number(args[0]);
|
|
400
|
+
if (!optionNum || !types[optionNum]) return pika.reply(`_Invalid Option_`);
|
|
401
|
+
if (optionNum === ui.listmenu) return pika.reply(`☑️ Listmenu message already set as *${types[optionNum]}*.`);
|
|
402
|
+
pika.reply(Config.message.success);
|
|
403
|
+
return await UI.updateOne({ id: "userInterface" }, { $set: { listmenu: optionNum } }, { new: true });
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
//༺─────────────────────────────────────
|
|
407
|
+
|
|
408
|
+
anya({
|
|
409
|
+
name: "setalive",
|
|
410
|
+
react: "⚙️",
|
|
411
|
+
category: "core",
|
|
412
|
+
desc: "Set alive message type",
|
|
413
|
+
rule: 1,
|
|
414
|
+
need: "number",
|
|
415
|
+
filename: __filename
|
|
416
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => { // Added 'db' to the parameters
|
|
417
|
+
const types = {
|
|
418
|
+
1: "Text Message",
|
|
419
|
+
2: "Image Message",
|
|
420
|
+
3: "Image Ad Reply",
|
|
421
|
+
4: "Video Message",
|
|
422
|
+
5: "GIF Message",
|
|
423
|
+
6: "Money Request Msg",
|
|
424
|
+
7: "Document Ad Reply",
|
|
425
|
+
8: "Image Ad Reply 2",
|
|
426
|
+
9: "GIF Ad Reply",
|
|
427
|
+
10: "GIF Channel Ad Forward",
|
|
428
|
+
11: "Image Button Message",
|
|
429
|
+
12: "Video Button Message"
|
|
430
|
+
};
|
|
431
|
+
const ui = db.UI[0] || await new UI({ id: "userInterface" }).save();
|
|
432
|
+
const generateMessageList = () => {
|
|
433
|
+
let messageList = '';
|
|
434
|
+
for (const [key, value] of Object.entries(types)) {
|
|
435
|
+
messageList += `${key}. ${value + (ui.alive === Number(key) ? " ✅" : "")}\n`;
|
|
436
|
+
}
|
|
437
|
+
return messageList;
|
|
438
|
+
};
|
|
439
|
+
if (!args[0]) {
|
|
440
|
+
if (ui.buttons) {
|
|
441
|
+
const butArray = [];
|
|
442
|
+
const generateButtonList = () => {
|
|
443
|
+
for (const [key, value] of Object.entries(types)) {
|
|
444
|
+
butArray.push(`{"header":"🍉 ${value}","title":"${ui.alive === key ? fancy13("(✅ selected)") : ""}","description":"𝘵𝘢𝘱 𝘩𝘦𝘳𝘦 𝘵𝘰 𝘴𝘦𝘭𝘦𝘤𝘵 𝘵𝘩𝘪𝘴 𝘰𝘱𝘵𝘪𝘰𝘯","id":"${prefix + command} ${key}"}`);
|
|
445
|
+
}
|
|
446
|
+
return butArray;
|
|
447
|
+
};
|
|
448
|
+
generateButtonList();
|
|
449
|
+
return await anyaV2.sendButtonText(pika.chat, {
|
|
450
|
+
text: `*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]} 👋🏻*\n\n> *Current Setting:* _${types[ui.alive]}_`,
|
|
451
|
+
footer: Config.footer,
|
|
452
|
+
buttons: [{ "name": "single_select", "buttonParamsJson": `{"title":"Choose Here❗","sections":[{"title":"Alive Message Format Types","highlight_label":"${Config.botname}","rows":[${butArray.join(",")}]}]}` }],
|
|
453
|
+
contextInfo: {
|
|
454
|
+
mentionedJid: [pika.sender]
|
|
455
|
+
}
|
|
456
|
+
}, { quoted: pika });
|
|
457
|
+
} else {
|
|
458
|
+
return pika.reply(`*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]}* ✨\n
|
|
459
|
+
\`Reply A Number To Set Alive Message Type!\`
|
|
460
|
+
\`\`\`
|
|
461
|
+
${await generateMessageList()}\`\`\`
|
|
462
|
+
> _ID: QA28_
|
|
463
|
+
`.trim(), { mentions: [pika.sender], forwarded: false });
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
const optionNum = Number(args[0]);
|
|
467
|
+
if (!optionNum || !types[optionNum]) return pika.reply(`_Invalid Option_`);
|
|
468
|
+
if (optionNum === ui.alive) return pika.reply(`☑️ Alive message already set as *${types[optionNum]}*.`);
|
|
469
|
+
pika.reply(Config.message.success);
|
|
470
|
+
return await UI.updateOne({ id: "userInterface" }, { $set: { alive: optionNum } }, { new: true });
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
//༺─────────────────────────────────────
|
|
474
|
+
|
|
475
|
+
anya({
|
|
476
|
+
name: "setgreetings",
|
|
477
|
+
alias: ["setgreeting"],
|
|
478
|
+
react: "⚙️",
|
|
479
|
+
category: "core",
|
|
480
|
+
desc: "Set welcome/left message type",
|
|
481
|
+
rule: 1,
|
|
482
|
+
need: "number",
|
|
483
|
+
filename: __filename
|
|
484
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => { // Added 'db' to the parameters
|
|
485
|
+
const types = {
|
|
486
|
+
1: "Text Message",
|
|
487
|
+
2: "Image Message",
|
|
488
|
+
3: "Image Message 2",
|
|
489
|
+
4: "Image Message 3",
|
|
490
|
+
5: "Text Ad Message",
|
|
491
|
+
6: "Text Ad Message 2",
|
|
492
|
+
7: "GIF Message",
|
|
493
|
+
8: "GIF Message 2",
|
|
494
|
+
9: "GIF Message 3",
|
|
495
|
+
10: "Button Image Message",
|
|
496
|
+
11: "Button Image Message 2"
|
|
497
|
+
};
|
|
498
|
+
const ui = db.UI[0] || await new UI({ id: "userInterface" }).save();
|
|
499
|
+
const generateMessageList = () => {
|
|
500
|
+
let messageList = '';
|
|
501
|
+
for (const [key, value] of Object.entries(types)) {
|
|
502
|
+
messageList += `${key}. ${value + (ui.alive === Number(key) ? " ✅" : "")}\n`;
|
|
503
|
+
}
|
|
504
|
+
return messageList;
|
|
505
|
+
};
|
|
506
|
+
if (!args[0]) {
|
|
507
|
+
if (ui.buttons) {
|
|
508
|
+
const butArray = [];
|
|
509
|
+
const generateButtonList = () => {
|
|
510
|
+
for (const [key, value] of Object.entries(types)) {
|
|
511
|
+
butArray.push(`{"header":"💕 ${value}","title":"${ui.greetings === key ? fancy13("(✅ selected)") : ""}","description":"𝘵𝘢𝘱 𝘩𝘦𝘳𝘦 𝘵𝘰 𝘴𝘦𝘭𝘦𝘤𝘵 𝘵𝘩𝘪𝘴 𝘰𝘱𝘵𝘪𝘰𝘯","id":"${prefix + command} ${key}"}`);
|
|
512
|
+
}
|
|
513
|
+
return butArray;
|
|
514
|
+
};
|
|
515
|
+
generateButtonList();
|
|
516
|
+
return await anyaV2.sendButtonText(pika.chat, {
|
|
517
|
+
text: `*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]} 👋🏻*\n\n> *Current Setting:* _${types[ui.greetings]}_`,
|
|
518
|
+
footer: Config.footer,
|
|
519
|
+
buttons: [{ "name": "single_select", "buttonParamsJson": `{"title":"Choose Here❗","sections":[{"title":"Welcome/Left Message Format Types","highlight_label":"${Config.botname}","rows":[${butArray.join(",")}]}]}` }],
|
|
520
|
+
contextInfo: {
|
|
521
|
+
mentionedJid: [pika.sender]
|
|
522
|
+
}
|
|
523
|
+
}, { quoted: pika });
|
|
524
|
+
} else {
|
|
525
|
+
return pika.reply(`*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]}* ✨\n
|
|
526
|
+
\`Reply A Number To Set Alive Message Type!\`
|
|
527
|
+
\`\`\`
|
|
528
|
+
${await generateMessageList()}\`\`\`
|
|
529
|
+
> _ID: QA39_
|
|
530
|
+
`.trim(), { mentions: [pika.sender], forwarded: false });
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
const optionNum = Number(args[0]);
|
|
534
|
+
if (!optionNum || !types[optionNum]) return pika.reply(`_Invalid Option_`);
|
|
535
|
+
if (optionNum === ui.greetings) return pika.reply(`☑️ Greetings message already set as *${types[optionNum]}*.`);
|
|
536
|
+
pika.reply(Config.message.success);
|
|
537
|
+
return await UI.updateOne({ id: "userInterface" }, { $set: { greetings: optionNum } }, { new: true });
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
//༺------------------------------------------------------------------------------------------------
|
|
541
|
+
|
|
542
|
+
anya({
|
|
543
|
+
name: "setytsmsg",
|
|
544
|
+
react: "⚙️",
|
|
545
|
+
category: "core",
|
|
546
|
+
desc: "Set YouTube search message reply type",
|
|
547
|
+
rule: 1,
|
|
548
|
+
filename: __filename
|
|
549
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => {
|
|
550
|
+
const types = {
|
|
551
|
+
1: "Text List",
|
|
552
|
+
2: "Image List Message",
|
|
553
|
+
3: "Cards Image Message"
|
|
554
|
+
};
|
|
555
|
+
const ui = db.UI[0] || await new UI({ id: "userInterface" }).save();
|
|
556
|
+
const generateMessageList = () => {
|
|
557
|
+
let messageList = '';
|
|
558
|
+
for (const [key, value] of Object.entries(types)) {
|
|
559
|
+
messageList += `${key}. ${value + (ui.ytsmsg === Number(key) ? " ✅" : "")}\n`;
|
|
560
|
+
}
|
|
561
|
+
return messageList;
|
|
562
|
+
};
|
|
563
|
+
if (!args[0]) {
|
|
564
|
+
if (ui.buttons) {
|
|
565
|
+
const butArray = [];
|
|
566
|
+
const generateButtonList = () => {
|
|
567
|
+
for (const [key, value] of Object.entries(types)) {
|
|
568
|
+
butArray.push(`{"header":"❤️ ${value}","title":"${ui.ytsmsg === Number(key) ? fancy13("(✅ already selected)") : ""}","description":"𝘵𝘢𝘱 𝘩𝘦𝘳𝘦 𝘵𝘰 𝘴𝘦𝘭𝘦𝘤𝘵 𝘵𝘩𝘪𝘴 𝘰𝘱𝘵𝘪𝘰𝘯","id":"${prefix + command} ${key}"}`);
|
|
569
|
+
}
|
|
570
|
+
return butArray;
|
|
571
|
+
};
|
|
572
|
+
generateButtonList();
|
|
573
|
+
return await anyaV2.sendButtonText(pika.chat, {
|
|
574
|
+
text: `*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]} 👋🏻*\n\n> *Current Setting:* _${types[ui.ytsmsg]}_`,
|
|
575
|
+
footer: Config.footer,
|
|
576
|
+
buttons: [{ "name": "single_select", "buttonParamsJson": `{"title":"Select Here!","sections":[{"title":"YouTube search Message Format Types.","highlight_label":"${Config.botname}","rows":[${butArray.join(",")}]}]}` }],
|
|
577
|
+
contextInfo: {
|
|
578
|
+
mentionedJid: [pika.sender]
|
|
579
|
+
}
|
|
580
|
+
}, { quoted: pika });
|
|
581
|
+
} else {
|
|
582
|
+
return pika.reply(`*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]}* ✨\n
|
|
583
|
+
\`Reply A Number To Choose Senpai!\`
|
|
584
|
+
\`\`\`
|
|
585
|
+
${await generateMessageList()}\`\`\`
|
|
586
|
+
> _ID: QA47_
|
|
587
|
+
`.trim(), { mentions: [pika.sender], forwarded: false });
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
const optionNum = Number(args[0]);
|
|
591
|
+
if (!optionNum || !types[optionNum]) return pika.reply(`_Invalid Option_`);
|
|
592
|
+
if (optionNum === ui.ytsmsg) return pika.reply(`☑️ Already set as *${types[optionNum]}*`);
|
|
593
|
+
pika.reply(Config.message.success + "\n\n> ⚠️ Not effective if `buttons` are `off`");
|
|
594
|
+
return await UI.updateOne({ id: "userInterface" }, { $set: { ytsmsg: optionNum } }, { new: true });
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
//༺─────────────────────────────────────
|
|
598
|
+
|
|
599
|
+
anya({
|
|
600
|
+
name: "prefix",
|
|
601
|
+
react: "🎀",
|
|
602
|
+
category: "core",
|
|
603
|
+
desc: "Change prefix to single or multiple",
|
|
604
|
+
rule: 1,
|
|
605
|
+
filename: __filename
|
|
606
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => {
|
|
607
|
+
const bot = db.Bot?.[0];
|
|
608
|
+
const ui = db.UI?.[0] || await new UI({ id: "userInterface" }).save();
|
|
609
|
+
const greeting = `*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]} 👋🏻*`;
|
|
610
|
+
const currentPrefix = `> *Current Prefix Mode:* _${bot?.prefix || "unknown"}_`;
|
|
611
|
+
const prefixInfo = `
|
|
612
|
+
\`1️⃣ Single :\` The bot will respond only to a single specific prefix, set to "${Config.prefa}".
|
|
613
|
+
\`2️⃣ Multi :\` The bot will respond to any of a set of common prefixes.
|
|
614
|
+
\`3️⃣ All/No :\` This feature is coming soon and will allow the bot to listen with any prefix or none at all.`.trim();
|
|
615
|
+
const message = `${greeting}\n\n${prefixInfo}\n\n${currentPrefix}`;
|
|
616
|
+
if (!args[0]) {
|
|
617
|
+
if (ui.buttons) {
|
|
618
|
+
return await anyaV2.sendButtonText(pika.chat, {
|
|
619
|
+
text: message,
|
|
620
|
+
footer: Config.footer,
|
|
621
|
+
buttons: [
|
|
622
|
+
{
|
|
623
|
+
name: "quick_reply",
|
|
624
|
+
buttonParamsJson: `{"display_text":"🌀 Single Prefix ${bot?.prefix === "single" ? "• (selected)" : ""}","id":"${prefix}prefix single"}`
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
name: "quick_reply",
|
|
628
|
+
buttonParamsJson: `{"display_text":"🌀 Multi Prefix ${bot?.prefix === "multi" ? "• (selected)" : ""}","id":"${prefix}prefix multi"}`
|
|
629
|
+
}
|
|
630
|
+
],
|
|
631
|
+
contextInfo: { mentionedJid: [pika.sender] }
|
|
632
|
+
}, { quoted: pika });
|
|
633
|
+
}
|
|
634
|
+
return pika.reply(`${message}\n\nReply with a number to select:
|
|
635
|
+
- 1. single ${bot?.prefix === "single" ? "_(✅selected)_" : ""}
|
|
636
|
+
- 2. multi ${bot?.prefix === "multi" ? "_(✅selected)_" : ""}
|
|
637
|
+
- 3. all ${bot?.prefix === "all" ? "_(✅selected)_" : ""}
|
|
638
|
+
|
|
639
|
+
> _ID: QA38_`, { mentions: [pika.sender], forwarded: false });
|
|
640
|
+
}
|
|
641
|
+
const newPrefix = args[0].toLowerCase();
|
|
642
|
+
switch (newPrefix) {
|
|
643
|
+
case "single":
|
|
644
|
+
if (bot?.prefix === "single") {
|
|
645
|
+
return pika.reply("_Already Enabled *Single Prefix*_");
|
|
646
|
+
} else {
|
|
647
|
+
await Bot.updateOne({ id: "anyabot" }, { prefix: "single" });
|
|
648
|
+
return pika.reply(Config.message.success);
|
|
649
|
+
}
|
|
650
|
+
case "multi":
|
|
651
|
+
if (bot?.prefix === "multi") {
|
|
652
|
+
return pika.reply("_Already Enabled Multi Prefix Support_");
|
|
653
|
+
} else {
|
|
654
|
+
await Bot.updateOne({ id: "anyabot" }, { prefix: "multi" });
|
|
655
|
+
return pika.reply(Config.message.success);
|
|
656
|
+
}
|
|
657
|
+
default:
|
|
658
|
+
return pika.reply(`
|
|
659
|
+
*Example:* ${prefix + command} single/multi/all
|
|
660
|
+
|
|
661
|
+
${prefixInfo}
|
|
662
|
+
`.trim());
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
|
|
666
|
+
//༺─────────────────────────────────────
|
|
667
|
+
|
|
668
|
+
anya({
|
|
669
|
+
name: "mode",
|
|
670
|
+
react: "🍭",
|
|
671
|
+
category: "core",
|
|
672
|
+
desc: "Set bot work type",
|
|
673
|
+
rule: 1,
|
|
674
|
+
filename: __filename
|
|
675
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => {
|
|
676
|
+
const bot = db.Bot?.[0];
|
|
677
|
+
const ui = db.UI?.[0] || await new UI({ id: "userInterface" }).save();
|
|
678
|
+
const system = db.System?.[0] || await new System({ id: "system" }).save();
|
|
679
|
+
let reply = "";
|
|
680
|
+
const greeting = `*${greetTime(2).greetingWithEmoji} @${pika.sender.split("@")[0]} 👋🏻*`;
|
|
681
|
+
const currentMode = `> *Current Work Type:* _${bot?.worktype || "unknown"}_`;
|
|
682
|
+
if (!args[0]) {
|
|
683
|
+
if (ui.buttons) {
|
|
684
|
+
return await anyaV2.sendButtonText(pika.chat, {
|
|
685
|
+
text: `${greeting}\n\n${currentMode}`,
|
|
686
|
+
footer: Config.footer,
|
|
687
|
+
buttons: [
|
|
688
|
+
{ name: "quick_reply", buttonParamsJson: `{"display_text":"Public 👥 ${bot?.worktype === "public" ? "(selected)" : ""}","id":"${prefix}mode public"}` },
|
|
689
|
+
{ name: "quick_reply", buttonParamsJson: `{"display_text":"Self 👤 ${bot?.worktype === "self" ? "(selected)" : ""}","id":"${prefix}mode self"}` }
|
|
690
|
+
],
|
|
691
|
+
contextInfo: { mentionedJid: [pika.sender] }
|
|
692
|
+
}, { quoted: pika });
|
|
693
|
+
}
|
|
694
|
+
return pika.reply(`${greeting}\n
|
|
695
|
+
\`Reply a number to select:\`
|
|
696
|
+
|
|
697
|
+
- 1. public ${bot?.worktype === "public" ? "_(✅selected)_" : ""}
|
|
698
|
+
- 2. self ${bot?.worktype === "self" ? "_(✅selected)_" : ""}
|
|
699
|
+
- 3. onlyAdmins ${bot?.worktype === "onlyAdmins" ? "_(✅selected)_" : ""}
|
|
700
|
+
|
|
701
|
+
> _ID: QA37_`, { mentions: [pika.sender], forwarded: false });
|
|
702
|
+
}
|
|
703
|
+
const mode = args[0].toLowerCase();
|
|
704
|
+
switch (mode) {
|
|
705
|
+
case "public":
|
|
706
|
+
if (bot?.worktype === "public") {
|
|
707
|
+
reply = "_Already Enabled Public Mode_";
|
|
708
|
+
} else {
|
|
709
|
+
await Bot.updateOne({ id: "anyabot" }, { worktype: "public" });
|
|
710
|
+
reply = Config.message.success;
|
|
711
|
+
}
|
|
712
|
+
break;
|
|
713
|
+
case "self":
|
|
714
|
+
case "private":
|
|
715
|
+
if (bot?.worktype === "self") {
|
|
716
|
+
reply = "_Already Enabled Self Mode_";
|
|
717
|
+
} else {
|
|
718
|
+
await Bot.updateOne({ id: "anyabot" }, { worktype: "self" });
|
|
719
|
+
reply = Config.message.success;
|
|
720
|
+
if (system.chatbot) {
|
|
721
|
+
await System.updateOne({ id: "system" }, { chatbot: false });
|
|
722
|
+
reply += "\n> ☑️ Chatbot turned off, as it can't be used in self mode.";
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
break;
|
|
726
|
+
case "onlyadmin":
|
|
727
|
+
return pika.reply("_❗This mode is coming soon..._");
|
|
728
|
+
default:
|
|
729
|
+
return pika.reply(`*${Config.themeemoji} Example:* ${prefix + command} public/self/onlyadmin`);
|
|
730
|
+
}
|
|
731
|
+
return pika.reply(reply);
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
//༺─────────────────────────────────────
|
|
736
|
+
|
|
737
|
+
anya({
|
|
738
|
+
name: "setcmd",
|
|
739
|
+
alias: ['addcmd'],
|
|
740
|
+
react: "🌟",
|
|
741
|
+
category: "core",
|
|
742
|
+
desc: "Add media as command",
|
|
743
|
+
rule: 1,
|
|
744
|
+
need: "media",
|
|
745
|
+
filename: __filename
|
|
746
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => {
|
|
747
|
+
const text = args.join(" ");
|
|
748
|
+
if (!pika.quoted) return pika.reply(`Reply an *image/sticker/video* media message..! 🤍`);
|
|
749
|
+
if (!/image|video|sticker|audio|viewOnceMessage/.test(pika.quoted.mtype)) return pika.reply(`Baka! it's not a media message..! 😑`);
|
|
750
|
+
if (/video/.test(pika.quoted.mtype)) {
|
|
751
|
+
if ((pika.quoted.msg || pika.quoted).seconds > 30) return pika.reply(`‼️ Video media should be *less* than \`30\` seconds.`);
|
|
752
|
+
}
|
|
753
|
+
if (!pika.quoted.fileSha256) return pika.reply(`‼️ Can't use this media, SHA256 hash is missing..!`);
|
|
754
|
+
if (!args[0]) return pika.reply(`💬 Enter a command name also to exicute *like:*\n\n\`${prefix + command} ${prefix}menu\``);
|
|
755
|
+
const hash = pika.quoted.fileSha256.toString('base64');
|
|
756
|
+
const cmd = await Cmd.findOne({ id: "cmd" }) || await new Cmd({ id: "cmd" }).save();
|
|
757
|
+
if (cmd.setcmd.has(hash) && cmd.setcmd.get(hash).locked) return pika.reply(`❌ This media is locked for command \`${cmd.setcmd.get(hash).command}\`.`);
|
|
758
|
+
if (cmd.setcmd.has(hash) && cmd.setcmd.get(hash).command === text.toLowerCase()) return pika.reply(`☑️ This media is *already registered* for this command..!`);
|
|
759
|
+
const structureData = {
|
|
760
|
+
locked: false,
|
|
761
|
+
command: text.toLowerCase(),
|
|
762
|
+
type: pika.quoted.mtype.split("Message")[0],
|
|
763
|
+
creator: pika.sender.split("@")[0],
|
|
764
|
+
mentions: pika.mentionedJid
|
|
765
|
+
};
|
|
766
|
+
pika.reply(`✅ Media *added* as \`${text}\` command`, { mentions: pika.mentionedJid });
|
|
767
|
+
return cmd.set(`setcmd.${hash}`, structureData).save();
|
|
768
|
+
}
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
//༺─────────────────────────────────────
|
|
772
|
+
|
|
773
|
+
anya({
|
|
774
|
+
name: "delcmd",
|
|
775
|
+
react: "🗑️",
|
|
776
|
+
category: "core",
|
|
777
|
+
desc: "Delete media for cmd list",
|
|
778
|
+
rule: 1,
|
|
779
|
+
need: "media",
|
|
780
|
+
filename: __filename
|
|
781
|
+
}, async (anyaV2, pika, { args }) => {
|
|
782
|
+
const text = args.join(" ");
|
|
783
|
+
if (!pika.quoted) return pika.reply(`Reply an *image/sticker/video* media message to delete cmd..! 💜`);
|
|
784
|
+
if (!/image|video|sticker|audio|viewOnceMessage/.test(pika.quoted.mtype)) return pika.reply(`Baka! it's not a media message again..! 😑`);
|
|
785
|
+
if (!pika.quoted.fileSha256) return pika.reply(`‼️ Can't find this media, SHA256 hash is missing..!`);
|
|
786
|
+
const hash = pika.quoted.fileSha256.toString('base64');
|
|
787
|
+
const cmd = await Cmd.findOne({ id: "cmd" }) || await new Cmd({ id: "cmd" }).save();
|
|
788
|
+
if (!cmd.setcmd.has(hash)) return pika.reply(`❌ This media *isn't registered* for any cmd..!`);
|
|
789
|
+
cmd.setcmd.delete(hash);
|
|
790
|
+
await cmd.save();
|
|
791
|
+
return pika.reply(`🗑️ Media *deleted* successfully..!`);
|
|
792
|
+
}
|
|
793
|
+
)
|
|
794
|
+
|
|
795
|
+
//༺─────────────────────────────────────
|
|
796
|
+
|
|
797
|
+
anya({
|
|
798
|
+
name: "delcmdhash",
|
|
799
|
+
react: "🗑️",
|
|
800
|
+
rule: 1,
|
|
801
|
+
notCmd: true,
|
|
802
|
+
filename: __filename
|
|
803
|
+
}, async (anyaV2, pika, { args }) => {
|
|
804
|
+
if (!args[0]) return pika.reply(`‼️ Please enter the existing media hash..!`);
|
|
805
|
+
const cmd = await Cmd.findOne({ id: "cmd" }) || await new Cmd({ id: "cmd" }).save();
|
|
806
|
+
let c = 0;
|
|
807
|
+
let failed = 0;
|
|
808
|
+
for (let i of args) {
|
|
809
|
+
if (!cmd.setcmd.has(i)) {
|
|
810
|
+
failed++;
|
|
811
|
+
continue;
|
|
812
|
+
}
|
|
813
|
+
cmd.setcmd.delete(i);
|
|
814
|
+
c++;
|
|
815
|
+
}
|
|
816
|
+
await cmd.save();
|
|
817
|
+
const reply = `${failed < 1 ? "" : `❌ \`${failed}\` Media(s) *doesn't exist*..!\n\n`}${c < 1 ? "" : `🗑️ \`${c}\` Media(s) *deleted* successfully..!`}`;
|
|
818
|
+
return pika.reply(reply.trim());
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
//༺─────────────────────────────────────
|
|
822
|
+
|
|
823
|
+
anya({
|
|
824
|
+
name: "lockcmd",
|
|
825
|
+
react: "🔒",
|
|
826
|
+
category: "core",
|
|
827
|
+
desc: "You can't change the command name of the cmd",
|
|
828
|
+
rule: 1,
|
|
829
|
+
need: "media",
|
|
830
|
+
filename: __filename
|
|
831
|
+
}, async (anyaV2, pika, { args }) => {
|
|
832
|
+
const text = args.join(" ");
|
|
833
|
+
if (!pika.quoted) return pika.reply(`Reply an *image/sticker/video* media message to lock cmd..! 💚`);
|
|
834
|
+
if (!/image|video|sticker|viewOnceMessage/.test(pika.quoted.mtype)) return pika.reply(`Baka! it's not a media message again..! 😑`);
|
|
835
|
+
if (!pika.quoted.fileSha256) return pika.reply(`‼️ Can't find this media, SHA256 hash is missing..!`);
|
|
836
|
+
const hash = pika.quoted.fileSha256.toString('base64');
|
|
837
|
+
const cmd = await Cmd.findOne({ id: "cmd" }) || await new Cmd({ id: "cmd" }).save();
|
|
838
|
+
if (!cmd.setcmd.has(hash)) return pika.reply(`❌ This media *isn't registered* for any cmd..!`);
|
|
839
|
+
if (cmd.setcmd.has(hash) && cmd.setcmd.get(hash).locked) return pika.reply(`☑️ This media is *already* locked for \`${cmd.setcmd.get(hash).command}\` command.`);
|
|
840
|
+
cmd.setcmd.get(hash).locked = true;
|
|
841
|
+
await cmd.save();
|
|
842
|
+
return pika.reply(`🔒 Locked this media for \`${cmd.setcmd.get(hash).command}\` command successfully..!`, { mentions: pika.mentionedJid });
|
|
843
|
+
}
|
|
844
|
+
)
|
|
845
|
+
|
|
846
|
+
//༺─────────────────────────────────────
|
|
847
|
+
|
|
848
|
+
anya({
|
|
849
|
+
name: "unlockcmd",
|
|
850
|
+
react: "🔓",
|
|
851
|
+
category: "core",
|
|
852
|
+
desc: "You can now change the command name of the cmd",
|
|
853
|
+
rule: 1,
|
|
854
|
+
filename: __filename
|
|
855
|
+
}, async (anyaV2, pika, { args }) => {
|
|
856
|
+
const text = args.join(" ");
|
|
857
|
+
if (!pika.quoted) return pika.reply(`Reply an *image/sticker/video* media message to unlock cmd..! 💛`);
|
|
858
|
+
if (!/image|video|sticker|viewOnceMessage/.test(pika.quoted.mtype)) return pika.reply(`Baka! it's not a media message again..! 😑`);
|
|
859
|
+
if (!pika.quoted.fileSha256) return pika.reply(`‼️ Can't find this media, SHA256 hash is missing..!`);
|
|
860
|
+
const hash = pika.quoted.fileSha256.toString('base64');
|
|
861
|
+
const cmd = await Cmd.findOne({ id: "cmd" }) || await new Cmd({ id: "cmd" }).save();
|
|
862
|
+
if (!cmd.setcmd.has(hash)) return pika.reply(`❌ This media *isn't registered* for any cmd..!`);
|
|
863
|
+
if (cmd.setcmd.has(hash) && !cmd.setcmd.get(hash).locked) return pika.reply(`☑️ This media isn't locked.`);
|
|
864
|
+
cmd.setcmd.get(hash).locked = false;
|
|
865
|
+
await cmd.save();
|
|
866
|
+
return pika.reply(`🔓 Unlocked this media successfully..!`);
|
|
867
|
+
}
|
|
868
|
+
)
|
|
869
|
+
|
|
870
|
+
//༺─────────────────────────────────────
|
|
871
|
+
|
|
872
|
+
anya({
|
|
873
|
+
name: "listcmd",
|
|
874
|
+
react: "🏵️",
|
|
875
|
+
category: "core",
|
|
876
|
+
desc: "See all media bash64 code with detail list",
|
|
877
|
+
rule: 1,
|
|
878
|
+
filename: __filename
|
|
879
|
+
}, async (anyaV2, pika, { db, args, prefix, command }) => {
|
|
880
|
+
const cmd = await Cmd.findOne({ id: "cmd" }) || await new Cmd({ id: "cmd" }).save();
|
|
881
|
+
if (cmd.setcmd.size < 1) return pika.reply(`❌ No commands found!`);
|
|
882
|
+
let results = [];
|
|
883
|
+
let mentions = [];
|
|
884
|
+
for (let [bash64, details] of cmd.setcmd.entries()) {
|
|
885
|
+
mentions.push(details.creator + "@s.whatsapp.net");
|
|
886
|
+
results.push({
|
|
887
|
+
bash64: bash64,
|
|
888
|
+
creator: details.creator,
|
|
889
|
+
command: details.command,
|
|
890
|
+
type: details.type,
|
|
891
|
+
locked: details.locked
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
const ui = db.UI?.[0] || (await new UI({ id: "userInterface" }).save());
|
|
895
|
+
if (ui.buttons) {
|
|
896
|
+
const butArray = [];
|
|
897
|
+
for (let i = 0; i < results.length; i++) {
|
|
898
|
+
butArray.push(`{"header":"${results[i].locked ? "🔒" : ""} ${results[i].command}","title":"${fancy13("Type: " + results[i].type)}","description":"${results[i].bash64}","id":"${prefix}delcmdhash ${results[i].bash64}"}`);
|
|
899
|
+
}
|
|
900
|
+
const hashlist = [];
|
|
901
|
+
for (let i = 0; i < results.length; i++) {
|
|
902
|
+
hashlist.push(results[i].bash64);
|
|
903
|
+
}
|
|
904
|
+
return await anyaV2.sendButtonText(pika.chat, {
|
|
905
|
+
text: `
|
|
906
|
+
*${greetTime(2).greetingWithEmoji}, @${pika.sender.split("@")[0]}! 👋🏻*
|
|
907
|
+
|
|
908
|
+
*🍎 User:* _@${pika.sender.split("@")[0]}_
|
|
909
|
+
*🦋 Bot:* _${Config.botname}_
|
|
910
|
+
*👤 Owner:* _${Config.ownername}_
|
|
911
|
+
*📃 Total Hashes:* _${cmd.setcmd.length} cmds_
|
|
912
|
+
`.trim(),
|
|
913
|
+
footer: Config.footer,
|
|
914
|
+
buttons: [{ "name": "single_select", "buttonParamsJson": `{"title":"Select Command Hash 🍎","sections":[{"title":"🌟 𝗧𝗮𝗽 𝗛𝗲𝗿𝗲 𝗧𝗼 𝗗𝗲𝗹𝗲𝘁𝗲 𝗘𝘃𝗲𝗿𝘆 𝗛𝗮𝘀𝗵 🌟","highlight_label":"${Config.botname}","rows":[{"header":"💖 Delete Every Hash 💖","title":"","description":"𝘤𝘭𝘪𝘤𝘬 𝘩𝘦𝘳𝘦 𝘵𝘰 𝘥𝘦𝘭𝘦𝘵𝘦 𝘦𝘷𝘦𝘳𝘺 𝘩𝘢𝘴𝘩","id":"${prefix}delcmdhash ${hashlist.join(" ")}"}]},{"title":"𝗦𝗲𝗹𝗲𝗰𝘁 𝘁𝗼 𝗱𝗲𝗹𝗲𝘁𝗲 𝗗𝗮𝗿𝗹𝗶𝗻𝗴 💓📃","highlight_label":"${Config.botname}","rows":[${butArray.join(",")}]}]}` }],
|
|
915
|
+
contextInfo: {
|
|
916
|
+
mentionedJid: [pika.sender]
|
|
917
|
+
}
|
|
918
|
+
}, { quoted: pika });
|
|
919
|
+
} else {
|
|
920
|
+
const cmdlist = results.map((item, index) =>
|
|
921
|
+
`*${Config.themeemoji}Hash (${index + 1}):* ${item.locked ? `\`${item.bash64}\`` : item.bash64}
|
|
922
|
+
> _👤 Creator: @${item.creator}_
|
|
923
|
+
> _📡 Type: ${item.type}_
|
|
924
|
+
> _🔒 Locked: ${item.locked ? "Yes" : "No"}_
|
|
925
|
+
> _🌟 Command: ${item.command}_`).join('\n\n');
|
|
926
|
+
return pika.reply(`═══════════════════════
|
|
927
|
+
*🌉 Cmd Hash List..! 🌉*
|
|
928
|
+
═══════════════════════
|
|
929
|
+
_Info: \`highlighted\` hash is locked._
|
|
930
|
+
|
|
931
|
+
*\`Reply Number:\`*
|
|
932
|
+
- _Reply 0 to delete all hashes_
|
|
933
|
+
- _Reply a specific number to delete that hash_
|
|
934
|
+
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
|
|
935
|
+
|
|
936
|
+
${cmdlist}
|
|
937
|
+
|
|
938
|
+
> _ID: QA30_
|
|
939
|
+
`.trim(), { mentions: mentions });
|
|
940
|
+
}
|
|
941
|
+
});
|