priyanshbot12 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.Dockerignore +4 -0
- package/.dockerignore +4 -0
- package/.github/workflows/publish.yml +20 -0
- package/Dockerfile +5 -0
- package/Priyansh.js +601 -0
- package/appcap.json +0 -0
- package/appstate.json +263 -0
- package/config.json +231 -0
- package/includes/antist.sqlite +0 -0
- package/includes/controllers/currencies.js +100 -0
- package/includes/controllers/threads.js +89 -0
- package/includes/controllers/users.js +96 -0
- package/includes/database/index.js +41 -0
- package/includes/database/model.js +22 -0
- package/includes/database/models/currencies.js +26 -0
- package/includes/database/models/threads.js +21 -0
- package/includes/database/models/users.js +21 -0
- package/includes/handle/handleCommand.js +140 -0
- package/includes/handle/handleCommandEvent.js +43 -0
- package/includes/handle/handleCreateDatabase.js +62 -0
- package/includes/handle/handleEvent.js +37 -0
- package/includes/handle/handleNotification.js +47 -0
- package/includes/handle/handleReaction.js +44 -0
- package/includes/handle/handleRefresh.js +66 -0
- package/includes/handle/handleReply.js +44 -0
- package/includes/listen.js +307 -0
- package/index.js +93 -0
- package/languages/en.lang +103 -0
- package/languages/vi.lang +104 -0
- package/lol.json +4001 -0
- package/modChangeColorFca.js +78 -0
- package/modules/commands/0tom.js +25 -0
- package/modules/commands/6packs.js +142 -0
- package/modules/commands/Bio.js +18 -0
- package/modules/commands/Getavtfb.js +59 -0
- package/modules/commands/Google.js +77 -0
- package/modules/commands/Obama.js +74 -0
- package/modules/commands/Onbot.js +5 -0
- package/modules/commands/Priyanshu/approvedThreads.json +151 -0
- package/modules/commands/Priyanshu/pendingdThreads.json +1 -0
- package/modules/commands/Rank.js +201 -0
- package/modules/commands/Rushi.js +30 -0
- package/modules/commands/Simpson.js +76 -0
- package/modules/commands/Troll.json +26 -0
- package/modules/commands/Trump.js +76 -0
- package/modules/commands/Vonglap.js +24 -0
- package/modules/commands/Work-beta.js +113 -0
- package/modules/commands/aah-xsound.js +26 -0
- package/modules/commands/accept_fri.js +111 -0
- package/modules/commands/adc.js +106 -0
- package/modules/commands/adden.js +83 -0
- package/modules/commands/adduser.js +52 -0
- package/modules/commands/admin.js +254 -0
- package/modules/commands/ai.js +97 -0
- package/modules/commands/ai1.js +39 -0
- package/modules/commands/alert.js +1 -0
- package/modules/commands/allbox.js +194 -0
- package/modules/commands/alllin.js +85 -0
- package/modules/commands/altar.js +56 -0
- package/modules/commands/amogus.js +26 -0
- package/modules/commands/anifact.js +33 -0
- package/modules/commands/animalear.js +26 -0
- package/modules/commands/animeimg.js +25 -0
- package/modules/commands/animescrape.js +101 -0
- package/modules/commands/antichange.js +237 -0
- package/modules/commands/antijoin.js +22 -0
- package/modules/commands/antiout.js +22 -0
- package/modules/commands/antirobbery.js +22 -0
- package/modules/commands/approve.js +139 -0
- package/modules/commands/appstate.js +30 -0
- package/modules/commands/ara.js +28 -0
- package/modules/commands/art.js +39 -0
- package/modules/commands/astalk.json +85 -0
- package/modules/commands/autoban.js +45 -0
- package/modules/commands/automention.js +17 -0
- package/modules/commands/autoreact.js +62 -0
- package/modules/commands/autoreset.js +40 -0
- package/modules/commands/autoseen.js +1 -0
- package/modules/commands/autosetname.js +52 -0
- package/modules/commands/avatar.js +32 -0
- package/modules/commands/avt.js +76 -0
- package/modules/commands/award.js +84 -0
- package/modules/commands/ayaka.js +134 -0
- package/modules/commands/baicao.js +166 -0
- package/modules/commands/balance.js +42 -0
- package/modules/commands/ban.js +220 -0
- package/modules/commands/banking.js +132 -0
- package/modules/commands/banner.js +93 -0
- package/modules/commands/banner2.js +237 -0
- package/modules/commands/banner3.js +510 -0
- package/modules/commands/bard.js +59 -0
- package/modules/commands/batmanslap.js +79 -0
- package/modules/commands/baybayin.js +18 -0
- package/modules/commands/bbm.js +84 -0
- package/modules/commands/beast.js +62 -0
- package/modules/commands/bf.js +74 -0
- package/modules/commands/biden.js +25 -0
- package/modules/commands/bigtext.js +219 -0
- package/modules/commands/billboard.js +83 -0
- package/modules/commands/birthday.js +27 -0
- package/modules/commands/board.js +74 -0
- package/modules/commands/bot.js +245 -0
- package/modules/commands/bot1.js +414 -0
- package/modules/commands/botban.js +51 -0
- package/modules/commands/botsay.js +16 -0
- package/modules/commands/box.js +119 -0
- package/modules/commands/boxinfo.js +53 -0
- package/modules/commands/bruh.js +26 -0
- package/modules/commands/cache/1.png +0 -0
- package/modules/commands/cache/2.gif +0 -0
- package/modules/commands/cache/2.png +0 -0
- package/modules/commands/cache/20.jpg +0 -0
- package/modules/commands/cache/3.png +0 -0
- package/modules/commands/cache/4.png +0 -0
- package/modules/commands/cache/5.png +0 -0
- package/modules/commands/cache/50.jpg +0 -0
- package/modules/commands/cache/6.png +0 -0
- package/modules/commands/cache/7.png +0 -0
- package/modules/commands/cache/8.jpg +0 -0
- package/modules/commands/cache/8.png +0 -0
- package/modules/commands/cache/9.png +0 -0
- package/modules/commands/cache/AlegreyaSans-Regular.ttf +0 -0
- package/modules/commands/cache/ArialUnicodeMS.ttf +0 -0
- package/modules/commands/cache/Avthai.png +0 -0
- package/modules/commands/cache/Play-Bold.ttf +0 -0
- package/modules/commands/cache/SVN-Arial 2.ttf +0 -0
- package/modules/commands/cache/VNCORSI.ttf +0 -0
- package/modules/commands/cache/autoseen.txt +1 -0
- package/modules/commands/cache/autosetname.json +1 -0
- package/modules/commands/cache/avt.png +0 -0
- package/modules/commands/cache/avt2.png +0 -0
- package/modules/commands/cache/avt_100000377396525.png +0 -0
- package/modules/commands/cache/avt_100027379701085.png +0 -0
- package/modules/commands/cache/avtuserrd2.png +0 -0
- package/modules/commands/cache/avtuserrd3.png +0 -0
- package/modules/commands/cache/banner.gif +0 -0
- package/modules/commands/cache/biden1.png +2 -0
- package/modules/commands/cache/bill.json +1 -0
- package/modules/commands/cache/bold-font.ttf +0 -0
- package/modules/commands/cache/canvas/arr2.png +0 -0
- package/modules/commands/cache/canvas/choigay.png +0 -0
- package/modules/commands/cache/canvas/fuck.png +0 -0
- package/modules/commands/cache/canvas/fuckv2.png +0 -0
- package/modules/commands/cache/canvas/fuckv3.png +0 -0
- package/modules/commands/cache/canvas/fuckv4.png +0 -0
- package/modules/commands/cache/canvas/hug4.png +0 -0
- package/modules/commands/cache/canvas/hugp.png +0 -0
- package/modules/commands/cache/canvas/hugv1.png +0 -0
- package/modules/commands/cache/canvas/hugv2.png +0 -0
- package/modules/commands/cache/canvas/hugv3.png +0 -0
- package/modules/commands/cache/canvas/josh.png +0 -0
- package/modules/commands/cache/canvas/joshua.png +0 -0
- package/modules/commands/cache/canvas/love2.jpg +0 -0
- package/modules/commands/cache/canvas/marriedv1.png +0 -0
- package/modules/commands/cache/canvas/marriedv2.png +0 -0
- package/modules/commands/cache/canvas/marriedv3.png +0 -0
- package/modules/commands/cache/canvas/marriedv4.png +0 -0
- package/modules/commands/cache/canvas/marriedv5.png +0 -0
- package/modules/commands/cache/canvas/marriedv6.jpeg +0 -0
- package/modules/commands/cache/canvas/marrywi.png +0 -0
- package/modules/commands/cache/canvas/namtay.png +0 -0
- package/modules/commands/cache/canvas/pairing.jpg +0 -0
- package/modules/commands/cache/canvas/pj.png +0 -0
- package/modules/commands/cache/canvas/seophi.png +0 -0
- package/modules/commands/cache/checkttDay.json +11594 -0
- package/modules/commands/cache/chocolate.jpg +0 -0
- package/modules/commands/cache/customrank/.txt +1 -0
- package/modules/commands/cache/data.json +3 -0
- package/modules/commands/cache/datlich.json +1 -0
- package/modules/commands/cache/dhbc1.png +0 -0
- package/modules/commands/cache/dhbc2.png +0 -0
- package/modules/commands/cache/elaina.jpg +0 -0
- package/modules/commands/cache/fbcover.png +0 -0
- package/modules/commands/cache/giflove.png +0 -0
- package/modules/commands/cache/giflove1.png +0 -0
- package/modules/commands/cache/giflove2.png +0 -0
- package/modules/commands/cache/giflove3.png +0 -0
- package/modules/commands/cache/giflove4.png +0 -0
- package/modules/commands/cache/giflove5.png +0 -0
- package/modules/commands/cache/giflove6.png +0 -0
- package/modules/commands/cache/giflove7.png +0 -0
- package/modules/commands/cache/hon.png +0 -0
- package/modules/commands/cache/hon1.png +0 -0
- package/modules/commands/cache/hon2.png +0 -0
- package/modules/commands/cache/image-0.png +0 -0
- package/modules/commands/cache/image-1.png +0 -0
- package/modules/commands/cache/image-10.png +0 -0
- package/modules/commands/cache/image-11.png +0 -0
- package/modules/commands/cache/image-12.png +0 -0
- package/modules/commands/cache/image-13.png +0 -0
- package/modules/commands/cache/image-14.png +0 -0
- package/modules/commands/cache/image-15.png +0 -0
- package/modules/commands/cache/image-16.png +0 -0
- package/modules/commands/cache/image-17.png +0 -0
- package/modules/commands/cache/image-18.png +0 -0
- package/modules/commands/cache/image-19.png +0 -0
- package/modules/commands/cache/image-2.png +0 -0
- package/modules/commands/cache/image-20.png +0 -0
- package/modules/commands/cache/image-21.png +0 -0
- package/modules/commands/cache/image-22.png +0 -0
- package/modules/commands/cache/image-23.png +0 -0
- package/modules/commands/cache/image-24.png +0 -0
- package/modules/commands/cache/image-25.png +0 -0
- package/modules/commands/cache/image-26.png +0 -0
- package/modules/commands/cache/image-27.png +0 -0
- package/modules/commands/cache/image-28.png +0 -0
- package/modules/commands/cache/image-29.png +0 -0
- package/modules/commands/cache/image-3.png +0 -0
- package/modules/commands/cache/image-30.png +0 -0
- package/modules/commands/cache/image-31.png +0 -0
- package/modules/commands/cache/image-32.png +0 -0
- package/modules/commands/cache/image-33.png +0 -0
- package/modules/commands/cache/image-34.png +0 -0
- package/modules/commands/cache/image-35.png +0 -0
- package/modules/commands/cache/image-36.png +0 -0
- package/modules/commands/cache/image-37.png +0 -0
- package/modules/commands/cache/image-38.png +0 -0
- package/modules/commands/cache/image-39.png +0 -0
- package/modules/commands/cache/image-4.png +0 -0
- package/modules/commands/cache/image-40.png +0 -0
- package/modules/commands/cache/image-41.png +0 -0
- package/modules/commands/cache/image-42.png +0 -0
- package/modules/commands/cache/image-43.png +0 -0
- package/modules/commands/cache/image-44.png +0 -0
- package/modules/commands/cache/image-45.png +0 -0
- package/modules/commands/cache/image-46.png +0 -0
- package/modules/commands/cache/image-47.png +0 -0
- package/modules/commands/cache/image-48.png +0 -0
- package/modules/commands/cache/image-49.png +0 -0
- package/modules/commands/cache/image-5.png +0 -0
- package/modules/commands/cache/image-50.png +0 -0
- package/modules/commands/cache/image-51.png +0 -0
- package/modules/commands/cache/image-52.png +0 -0
- package/modules/commands/cache/image-53.png +0 -0
- package/modules/commands/cache/image-6.png +0 -0
- package/modules/commands/cache/image-7.png +0 -0
- package/modules/commands/cache/image-8.png +0 -0
- package/modules/commands/cache/image-9.png +0 -0
- package/modules/commands/cache/img1.png +0 -0
- package/modules/commands/cache/img2.png +0 -0
- package/modules/commands/cache/listwarning.json +1 -0
- package/modules/commands/cache/lyrics.png +0 -0
- package/modules/commands/cache/memory.ttf +1950 -0
- package/modules/commands/cache/memorygame.png +0 -0
- package/modules/commands/cache/menu.gif +0 -0
- package/modules/commands/cache/mikasa.jpg +0 -0
- package/modules/commands/cache/mirai.jpg +0 -0
- package/modules/commands/cache/nami.jpg +0 -0
- package/modules/commands/cache/night.jpg +0 -0
- package/modules/commands/cache/notes.json +1 -0
- package/modules/commands/cache/priyansh.jpg +0 -0
- package/modules/commands/cache/quybu.gif +0 -0
- package/modules/commands/cache/rankcard.png +0 -0
- package/modules/commands/cache/rankcard1.png +0 -0
- package/modules/commands/cache/rankcard10.png +0 -0
- package/modules/commands/cache/rankcard11.png +0 -0
- package/modules/commands/cache/rankcard12.png +0 -0
- package/modules/commands/cache/rankcard13.png +0 -0
- package/modules/commands/cache/rankcard14.png +0 -0
- package/modules/commands/cache/rankcard2.png +0 -0
- package/modules/commands/cache/rankcard3.png +0 -0
- package/modules/commands/cache/rankcard4.png +0 -0
- package/modules/commands/cache/rankcard5.png +0 -0
- package/modules/commands/cache/rankcard6.png +0 -0
- package/modules/commands/cache/rankcard7.png +0 -0
- package/modules/commands/cache/rankcard8.png +0 -0
- package/modules/commands/cache/rankcard9.png +0 -0
- package/modules/commands/cache/rankup/.txt +1 -0
- package/modules/commands/cache/regular-font.ttf +0 -0
- package/modules/commands/cache/rules.json +1 -0
- package/modules/commands/cache/shortcutdata.json +6 -0
- package/modules/commands/cache/snoti.jpg +0 -0
- package/modules/commands/cache/statusAuto.json +3 -0
- package/modules/commands/cache/tiktok.png +0 -0
- package/modules/commands/cache/toilet.png +0 -0
- package/modules/commands/cache/toilet1.png +0 -0
- package/modules/commands/cache/ttt.png +0 -0
- package/modules/commands/cache/urbanjungle.ttf +0 -0
- package/modules/commands/cache/wanted.png +3 -0
- package/modules/commands/cache.js +112 -0
- package/modules/commands/callad.js +215 -0
- package/modules/commands/cardbox.js +161 -0
- package/modules/commands/cardcute.js +122 -0
- package/modules/commands/cardinfo.js +106 -0
- package/modules/commands/cardinfotag.js +110 -0
- package/modules/commands/cardinfov2.js +103 -0
- package/modules/commands/cardinfov3.js +111 -0
- package/modules/commands/cardinfov4.js +104 -0
- package/modules/commands/caro.json +354 -0
- package/modules/commands/catsay.js +25 -0
- package/modules/commands/cave.js +51 -0
- package/modules/commands/chart.js +35 -0
- package/modules/commands/checktt.js +121 -0
- package/modules/commands/checkv1.js +181 -0
- package/modules/commands/cheems.js +88 -0
- package/modules/commands/chocolate.js +26 -0
- package/modules/commands/choose.js +28 -0
- package/modules/commands/chumma.js +25 -0
- package/modules/commands/clearcache.js +60 -0
- package/modules/commands/cmd.js +192 -0
- package/modules/commands/cnbh.js +118 -0
- package/modules/commands/code.js +101 -0
- package/modules/commands/communism.js +56 -0
- package/modules/commands/confess.js +25 -0
- package/modules/commands/console.js +46 -0
- package/modules/commands/cosplay.json +38 -0
- package/modules/commands/count-by-thread/.txt +1 -0
- package/modules/commands/count.js +82 -0
- package/modules/commands/couple.js +80 -0
- package/modules/commands/coupledp.js +40 -0
- package/modules/commands/covid.js +46 -0
- package/modules/commands/crypto.js +109 -0
- package/modules/commands/daily.js +46 -0
- package/modules/commands/darock.js +27 -0
- package/modules/commands/daru.js +26 -0
- package/modules/commands/data/.txt +1 -0
- package/modules/commands/date.js +80 -0
- package/modules/commands/date2.js +80 -0
- package/modules/commands/deletelogo.js +32 -0
- package/modules/commands/delmsg.js +25 -0
- package/modules/commands/delthread.js +26 -0
- package/modules/commands/details.js +112 -0
- package/modules/commands/dictionary.js +42 -0
- package/modules/commands/dog.js +27 -0
- package/modules/commands/dogfact.js +31 -0
- package/modules/commands/doof.js +74 -0
- package/modules/commands/dot.js +58 -0
- package/modules/commands/download.js +32 -0
- package/modules/commands/drake.js +84 -0
- package/modules/commands/drip.js +61 -0
- package/modules/commands/einstein.js +74 -0
- package/modules/commands/elon.js +78 -0
- package/modules/commands/emoji.js +83 -0
- package/modules/commands/enrile.js +76 -0
- package/modules/commands/event.js +223 -0
- package/modules/commands/example.js +49 -0
- package/modules/commands/fact.js +16 -0
- package/modules/commands/fact2.js +26 -0
- package/modules/commands/family.js +194 -0
- package/modules/commands/fbcover.js +183 -0
- package/modules/commands/fbcoverv2.js +101 -0
- package/modules/commands/fberror.js +74 -0
- package/modules/commands/fbget.js +41 -0
- package/modules/commands/file.js +106 -0
- package/modules/commands/fire.js +52 -0
- package/modules/commands/fish.js +48 -0
- package/modules/commands/fishing.json +330 -0
- package/modules/commands/fuck.js +74 -0
- package/modules/commands/fuck2.js +74 -0
- package/modules/commands/fuck3.js +74 -0
- package/modules/commands/fuck4.js +74 -0
- package/modules/commands/fuck5.js +74 -0
- package/modules/commands/fyoutoo.js +25 -0
- package/modules/commands/fyt.js +58 -0
- package/modules/commands/gali_reply.js +24 -0
- package/modules/commands/game1.js +34 -0
- package/modules/commands/getlink.js +26 -0
- package/modules/commands/gf.js +74 -0
- package/modules/commands/girl.js +11497 -0
- package/modules/commands/girl2.js +23319 -0
- package/modules/commands/girlnude.js +126 -0
- package/modules/commands/github.js +37 -0
- package/modules/commands/giveaway.js +122 -0
- package/modules/commands/gpt.js +39 -0
- package/modules/commands/groupemoji.js +17 -0
- package/modules/commands/groupimage.js +24 -0
- package/modules/commands/groupname.js +17 -0
- package/modules/commands/hack.js +103 -0
- package/modules/commands/help.js +122 -0
- package/modules/commands/help2.js +160 -0
- package/modules/commands/help3.js +83 -0
- package/modules/commands/hi.js +191 -0
- package/modules/commands/hi2.js +83 -0
- package/modules/commands/history.js +74 -0
- package/modules/commands/hold.js +80 -0
- package/modules/commands/hololive.js +63 -0
- package/modules/commands/hug.js +74 -0
- package/modules/commands/hug4.js +74 -0
- package/modules/commands/hug5.js +74 -0
- package/modules/commands/hugj.js +74 -0
- package/modules/commands/hugp.js +74 -0
- package/modules/commands/hugv2.js +74 -0
- package/modules/commands/hugv3.js +74 -0
- package/modules/commands/idst.js +25 -0
- package/modules/commands/imagesearch.js +96 -0
- package/modules/commands/imagine.js +143 -0
- package/modules/commands/info.js +62 -0
- package/modules/commands/infobox.js +161 -0
- package/modules/commands/infocardv7.js +112 -0
- package/modules/commands/infoip.js +24 -0
- package/modules/commands/infosite.js +47 -0
- package/modules/commands/insta.js +210 -0
- package/modules/commands/instagram.js +131 -0
- package/modules/commands/install.js +103 -0
- package/modules/commands/ip.js +55 -0
- package/modules/commands/isko.json +74 -0
- package/modules/commands/iss.js +29 -0
- package/modules/commands/japan.js +211 -0
- package/modules/commands/jessica.js +74 -0
- package/modules/commands/join.js +51 -0
- package/modules/commands/kanna.js +27 -0
- package/modules/commands/khana.js +26 -0
- package/modules/commands/kick.js +51 -0
- package/modules/commands/kiss.js +79 -0
- package/modules/commands/kiss2.js +79 -0
- package/modules/commands/kiss3.js +85 -0
- package/modules/commands/language.js +37 -0
- package/modules/commands/ledtext.js +38 -0
- package/modules/commands/leni.js +84 -0
- package/modules/commands/lexi.js +74 -0
- package/modules/commands/listadmin.js +36 -0
- package/modules/commands/listbanbybot.js +165 -0
- package/modules/commands/listbox.js +203 -0
- package/modules/commands/listfriend.js +90 -0
- package/modules/commands/load.js +15 -0
- package/modules/commands/log.js +37 -0
- package/modules/commands/logobear.js +31 -0
- package/modules/commands/logogame.js +31 -0
- package/modules/commands/logogaming2.js +31 -0
- package/modules/commands/logogaming3.js +31 -0
- package/modules/commands/logogaming4.js +31 -0
- package/modules/commands/logogaming5.js +31 -0
- package/modules/commands/logogirlgame.js +31 -0
- package/modules/commands/logogold.js +31 -0
- package/modules/commands/logoninja.js +31 -0
- package/modules/commands/logout.js +16 -0
- package/modules/commands/logowolf.js +31 -0
- package/modules/commands/love.js +80 -0
- package/modules/commands/luatbot.js +24 -0
- package/modules/commands/luckynum.js +34 -0
- package/modules/commands/lyrics.js +34 -0
- package/modules/commands/mal.js +72 -0
- package/modules/commands/malnews.js +20 -0
- package/modules/commands/mark.js +74 -0
- package/modules/commands/markcmt.js +74 -0
- package/modules/commands/married.js +74 -0
- package/modules/commands/marriedj.js +74 -0
- package/modules/commands/marriedv2.js +74 -0
- package/modules/commands/marriedv3.js +74 -0
- package/modules/commands/marriedv4.js +74 -0
- package/modules/commands/marriedv5.js +74 -0
- package/modules/commands/marriedv6.js +74 -0
- package/modules/commands/marry.js +74 -0
- package/modules/commands/math.js +121 -0
- package/modules/commands/mathematics.js +37 -0
- package/modules/commands/mbbank.js +74 -0
- package/modules/commands/meme.js +31 -0
- package/modules/commands/memory.js +136 -0
- package/modules/commands/mention.js +22 -0
- package/modules/commands/menu.js +142 -0
- package/modules/commands/minari.js +49 -0
- package/modules/commands/minigame.js +32 -0
- package/modules/commands/minionslanguange.js +24 -0
- package/modules/commands/mlbb.js +1 -0
- package/modules/commands/mlstalk.js +22 -0
- package/modules/commands/mobilelegends.js +31 -0
- package/modules/commands/morse.js +27 -0
- package/modules/commands/music.js +138 -0
- package/modules/commands/music2.js +44 -0
- package/modules/commands/music3.js +124 -0
- package/modules/commands/mycoins.js +45 -0
- package/modules/commands/namtay.js +80 -0
- package/modules/commands/natsuki.json +63 -0
- package/modules/commands/naughty.js +58 -0
- package/modules/commands/newbox.js +22 -0
- package/modules/commands/news.js +64 -0
- package/modules/commands/nhentai.js +47 -0
- package/modules/commands/night.js +26 -0
- package/modules/commands/ninja.js +18 -0
- package/modules/commands/noitu.js +42 -0
- package/modules/commands/noprefix/Yest +1 -0
- package/modules/commands/noprefix/ara.mp3 +0 -0
- package/modules/commands/noprefix/box.mp4 +0 -0
- package/modules/commands/noprefix/daru.mp4 +0 -0
- package/modules/commands/noprefix/dk.mp3 +0 -0
- package/modules/commands/noprefix/fuck.gif +0 -0
- package/modules/commands/noprefix/hi.gif +0 -0
- package/modules/commands/noprefix/instagram.jpg +0 -0
- package/modules/commands/noprefix/rankup/.txt +1 -0
- package/modules/commands/noprefix/solar.gif +0 -0
- package/modules/commands/noprefix/sub.mp3 +0 -0
- package/modules/commands/noprefix/sus.mp3 +0 -0
- package/modules/commands/noprefix/tea.mp4 +0 -0
- package/modules/commands/noprefix/totalChat.json +1 -0
- package/modules/commands/noprefix/v.mp3 +0 -0
- package/modules/commands/noprefix/vineboom.gif +0 -0
- package/modules/commands/noprefix/wednesday.mp4 +0 -0
- package/modules/commands/noprefix/wn.mp4 +0 -0
- package/modules/commands/noprefix/xf.mp3 +0 -0
- package/modules/commands/noprefix/xxx.mp3 +0 -0
- package/modules/commands/noprefix/yamate.mp3 +0 -0
- package/modules/commands/note.js +86 -0
- package/modules/commands/npm.js +30 -0
- package/modules/commands/nsfw.js +43 -0
- package/modules/commands/nsfwanime.js +101 -0
- package/modules/commands/nude.js +25 -0
- package/modules/commands/osu.js +21 -0
- package/modules/commands/out.js +23 -0
- package/modules/commands/outall.js +26 -0
- package/modules/commands/outbox.js +117 -0
- package/modules/commands/package.js +119 -0
- package/modules/commands/pair.js +86 -0
- package/modules/commands/pair1.js +86 -0
- package/modules/commands/pair2.js +51 -0
- package/modules/commands/pair3.js +51 -0
- package/modules/commands/pair4.js +51 -0
- package/modules/commands/pair5.js +51 -0
- package/modules/commands/pair6.js +51 -0
- package/modules/commands/pair7.js +51 -0
- package/modules/commands/pair8.js +51 -0
- package/modules/commands/pantiesclose.js +199 -0
- package/modules/commands/pantiesclosev2.js +199 -0
- package/modules/commands/password.js +83 -0
- package/modules/commands/pat.js +43 -0
- package/modules/commands/pay.json +64 -0
- package/modules/commands/pending.js +83 -0
- package/modules/commands/penis.js +11 -0
- package/modules/commands/penticlose.js +199 -0
- package/modules/commands/petmonsters.js +138 -0
- package/modules/commands/phub.js +83 -0
- package/modules/commands/pin.js +36 -0
- package/modules/commands/ping.js +30 -0
- package/modules/commands/pingv2.js +32 -0
- package/modules/commands/pinterest.js +37 -0
- package/modules/commands/playstore.js +103 -0
- package/modules/commands/poli.js +25 -0
- package/modules/commands/pooh.js +28 -0
- package/modules/commands/post.js +272 -0
- package/modules/commands/prefix.js +43 -0
- package/modules/commands/prefixv2.js +91 -0
- package/modules/commands/prince.js +245 -0
- package/modules/commands/priyansh.js +33 -0
- package/modules/commands/pubg.js +31 -0
- package/modules/commands/punch.js +44 -0
- package/modules/commands/qr.js +36 -0
- package/modules/commands/quiz.js +51 -0
- package/modules/commands/rainbow.js +29 -0
- package/modules/commands/randomicon.js +36 -0
- package/modules/commands/rankcard (copy).js +257 -0
- package/modules/commands/rankcard.js +216 -0
- package/modules/commands/rankgif.js +375 -0
- package/modules/commands/rankup.js +123 -0
- package/modules/commands/red.js +29 -0
- package/modules/commands/red2.js +1 -0
- package/modules/commands/reload.js +22 -0
- package/modules/commands/removebg.js +61 -0
- package/modules/commands/resend.js +86 -0
- package/modules/commands/resetexp.js +25 -0
- package/modules/commands/resetmoney.js +25 -0
- package/modules/commands/restart.js +32 -0
- package/modules/commands/rip.js +32 -0
- package/modules/commands/rnamebot.js +39 -0
- package/modules/commands/rnamebox.js +27 -0
- package/modules/commands/rule.js +86 -0
- package/modules/commands/sauce.js +56 -0
- package/modules/commands/say.js +62 -0
- package/modules/commands/schoolid.js +107 -0
- package/modules/commands/screenshot.js +44 -0
- package/modules/commands/screenshotv2.js +44 -0
- package/modules/commands/search.js +21 -0
- package/modules/commands/selflisten.js +30 -0
- package/modules/commands/sendfile.js +102 -0
- package/modules/commands/sendnoti.js +76 -0
- package/modules/commands/sendnoti1.js +40 -0
- package/modules/commands/sendnoti2.js +75 -0
- package/modules/commands/sendnoti5.js +113 -0
- package/modules/commands/sentnoti.js +49 -0
- package/modules/commands/setall.js +24 -0
- package/modules/commands/setcoins.js +21 -0
- package/modules/commands/setdatabox.js +26 -0
- package/modules/commands/setdatauser.js +28 -0
- package/modules/commands/setemoji.js +15 -0
- package/modules/commands/setexp.js +64 -0
- package/modules/commands/setjoin.js +94 -0
- package/modules/commands/setkey.js +18 -0
- package/modules/commands/setmoney.js +63 -0
- package/modules/commands/setname.js +17 -0
- package/modules/commands/setnameall.js +24 -0
- package/modules/commands/setprefix.js +58 -0
- package/modules/commands/setrankup.js +90 -0
- package/modules/commands/shayri.js +34 -0
- package/modules/commands/shell.js +31 -0
- package/modules/commands/shortcut.js +177 -0
- package/modules/commands/siesta.js +25 -0
- package/modules/commands/sim.js +51 -0
- package/modules/commands/sing.js +1 -0
- package/modules/commands/slap.js +44 -0
- package/modules/commands/sleep.js +61 -0
- package/modules/commands/slot.js +61 -0
- package/modules/commands/slotwaifu.js +254 -0
- package/modules/commands/solarsystem.js +102 -0
- package/modules/commands/spamban.js +69 -0
- package/modules/commands/spamban1.js +69 -0
- package/modules/commands/spank.js +30 -0
- package/modules/commands/status.js +37 -0
- package/modules/commands/steal.js +41 -0
- package/modules/commands/student.js +75 -0
- package/modules/commands/studentv2.js +75 -0
- package/modules/commands/studentv3.js +74 -0
- package/modules/commands/sub.js +26 -0
- package/modules/commands/system.js +82 -0
- package/modules/commands/tea.js +26 -0
- package/modules/commands/teach.js +70 -0
- package/modules/commands/textpro.js +445 -0
- package/modules/commands/thread.js +272 -0
- package/modules/commands/tictactoe.json +219 -0
- package/modules/commands/tid.js +15 -0
- package/modules/commands/tiki.js +74 -0
- package/modules/commands/tikvideo.js +59 -0
- package/modules/commands/tile.js +43 -0
- package/modules/commands/time.js +19 -0
- package/modules/commands/toctoc.js +1 -0
- package/modules/commands/toilet.js +79 -0
- package/modules/commands/token.js +42 -0
- package/modules/commands/top.js +160 -0
- package/modules/commands/trans.js +44 -0
- package/modules/commands/triggered.js +25 -0
- package/modules/commands/try.js +35 -0
- package/modules/commands/tweet-tag.json +1 -0
- package/modules/commands/tweet.js +75 -0
- package/modules/commands/tweet.json +92 -0
- package/modules/commands/tweetv2.json +92 -0
- package/modules/commands/uid.js +17 -0
- package/modules/commands/unban.js +186 -0
- package/modules/commands/unsend.js +27 -0
- package/modules/commands/unsentvip.js +16 -0
- package/modules/commands/uptime.js +141 -0
- package/modules/commands/uptime2.js +151 -0
- package/modules/commands/uptime3.js +151 -0
- package/modules/commands/user.js +278 -0
- package/modules/commands/vanilla.json +38 -0
- package/modules/commands/video.js +2 -0
- package/modules/commands/videov2.js +124 -0
- package/modules/commands/virgin.js +25 -0
- package/modules/commands/vtuber.js +109 -0
- package/modules/commands/vtuberWiki.js +164 -0
- package/modules/commands/wall/MTOJamai.ttf +0 -0
- package/modules/commands/wanted.json +32 -0
- package/modules/commands/war.js +54 -0
- package/modules/commands/warning.js +88 -0
- package/modules/commands/wasted.json +56 -0
- package/modules/commands/weather.js +50 -0
- package/modules/commands/wednesday.js +26 -0
- package/modules/commands/wiki.js +37 -0
- package/modules/commands/wom.js +26 -0
- package/modules/commands/work.js +93 -0
- package/modules/commands/xavier.js +75 -0
- package/modules/commands/xvideo.js +1 -0
- package/modules/commands/yaoi.json +31 -0
- package/modules/commands/yes.js +74 -0
- package/modules/commands/yuri.json +34 -0
- package/modules/commands/zackv.js +105 -0
- package/modules/commands/zalgo.js +16 -0
- package/modules/commands/zerotwo.js +52 -0
- package/modules/commands/zuck.js +77 -0
- package/modules/commands/zz.js +43 -0
- package/modules/commands/zzz.js +50 -0
- package/modules/commands/zzzz.js +48 -0
- package/modules/commands/zzzzz.js +116 -0
- package/modules/events/antijoin.js +25 -0
- package/modules/events/antiout.js +22 -0
- package/modules/events/antirobbery.js +43 -0
- package/modules/events/antist.js +216 -0
- package/modules/events/autosent.js +27 -0
- package/modules/events/autosetname.js +28 -0
- package/modules/events/cache/1689024290268.jpg +0 -0
- package/modules/events/cache/1689024291948.jpg +0 -0
- package/modules/events/cache/1689338091241.jpg +0 -0
- package/modules/events/cache/1689338091358.jpg +0 -0
- package/modules/events/cache/1689338161936.jpg +0 -0
- package/modules/events/cache/1689338162061.jpg +0 -0
- package/modules/events/cache/1689782720063.jpg +0 -0
- package/modules/events/cache/1696308600074.jpg +0 -0
- package/modules/events/cache/1696330171870.jpg +0 -0
- package/modules/events/cache/1696432181920.jpg +0 -0
- package/modules/events/cache/1696489190436.jpg +0 -0
- package/modules/events/cache/1696529399872.jpg +0 -0
- package/modules/events/cache/1696585758189.jpg +0 -0
- package/modules/events/cache/1696595392125.jpg +0 -0
- package/modules/events/cache/1696675929706.jpg +0 -0
- package/modules/events/cache/1696773555786.jpg +0 -0
- package/modules/events/cache/1697903362006.jpg +0 -0
- package/modules/events/cache/1697967586121.jpg +0 -0
- package/modules/events/cache/1698479390255.jpg +0 -0
- package/modules/events/cache/1698479678850.jpg +0 -0
- package/modules/events/cache/1698484313383.jpg +0 -0
- package/modules/events/cache/1698493158950.jpg +0 -0
- package/modules/events/cache/1700485758929.jpg +0 -0
- package/modules/events/cache/1701466775429.jpg +0 -0
- package/modules/events/cache/1701466776229.jpg +0 -0
- package/modules/events/cache/1701467351100.jpg +0 -0
- package/modules/events/cache/1701502759299.jpg +0 -0
- package/modules/events/cache/1701502759797.jpg +0 -0
- package/modules/events/cache/1703741413729.jpg +0 -0
- package/modules/events/cache/1703741413899.jpg +0 -0
- package/modules/events/cache/1703745121246.jpg +0 -0
- package/modules/events/cache/1703745121366.jpg +0 -0
- package/modules/events/cache/1703968162735.jpg +0 -0
- package/modules/events/cache/1703968162770.jpg +0 -0
- package/modules/events/cache/1704008949591.jpg +0 -0
- package/modules/events/cache/1704008949769.jpg +0 -0
- package/modules/events/cache/1704028197166.jpg +0 -0
- package/modules/events/cache/1704028197470.jpg +0 -0
- package/modules/events/cache/1704184158582.jpg +0 -0
- package/modules/events/cache/1704184158811.jpg +0 -0
- package/modules/events/cache/CourierNewPS-BoldMT.ttf +0 -0
- package/modules/events/cache/avt.png +0 -0
- package/modules/events/cache/avtuserrd.png +0 -0
- package/modules/events/cache/joinGif/randomgif/join.png +0 -0
- package/modules/events/cache/joinGif/randomgif/join2.gif +0 -0
- package/modules/events/cache/joinGif/randomgif/welc.gif +0 -0
- package/modules/events/cache/joinMp4/hello.gif +0 -0
- package/modules/events/cache/joinnoti.png +0 -0
- package/modules/events/emoji.json +1 -0
- package/modules/events/join.js +4 -0
- package/modules/events/joinNoti.js +82 -0
- package/modules/events/leave.js +34 -0
- package/modules/events/log.js +106 -0
- package/package.json +121 -0
- package/utils/index.html +519 -0
- package/utils/index.js +159 -0
- package/utils/log.js +29 -0
- package/werewolfConfig.js +229 -0
package/.Dockerignore
ADDED
package/.dockerignore
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
name: "publish npm"
|
2
|
+
|
3
|
+
on: push
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
publish:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- name: checkout
|
10
|
+
uses: actions/checkout@v2
|
11
|
+
- name: node
|
12
|
+
uses: actions/setup-node@v2
|
13
|
+
with:
|
14
|
+
node-version: 14
|
15
|
+
registry-url: https://registry.npmjs.org
|
16
|
+
- name: publish
|
17
|
+
run: npm publish --access public
|
18
|
+
# working-directory: package.json
|
19
|
+
env:
|
20
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
|
package/Dockerfile
ADDED
package/Priyansh.js
ADDED
@@ -0,0 +1,601 @@
|
|
1
|
+
const chalk = require('chalk');
|
2
|
+
var cron = require("node-cron");
|
3
|
+
const { exec } = require("child_process");
|
4
|
+
const timerestart = 120
|
5
|
+
var cron = require('node-cron');
|
6
|
+
cron.schedule(`0 */10 * * * *`, () => {
|
7
|
+
process.exit(1)
|
8
|
+
},{
|
9
|
+
scheduled: true,
|
10
|
+
timezone: "Asia/Kolkata"
|
11
|
+
});
|
12
|
+
exec("rm -rf modules/commands/data && mkdir -p modules/commands/data && rm -rf modules/commands/tad/* ", (error, stdout, stderr) => {
|
13
|
+
if (error) {
|
14
|
+
console.log(`error: ${error.message}`);
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
if (stderr) {
|
18
|
+
console.log(`stderr: ${stderr}`);
|
19
|
+
return;
|
20
|
+
}
|
21
|
+
console.log(`Successfull Auto Delete Cache!! ${stdout}`);
|
22
|
+
});
|
23
|
+
/*shell*/
|
24
|
+
exec("rm -fr modules/commands/cache/*.m4a && rm -fr modules/commands/cache/*.mp4 && rm -fr modules/commands/cache/*.mp3", (error, stdout, stderr) => {
|
25
|
+
if (error) {
|
26
|
+
console.log(`error: ${error.message}`);
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
if (stderr) {
|
30
|
+
console.log(`stderr: ${stderr}`);
|
31
|
+
return;
|
32
|
+
}
|
33
|
+
console.log(chalk.bold.hex("#00ffff")("PRIYANSH RAJPUT (PRIYANSH) β― ") + chalk.hex("#00ffff")("fixed by PRIYANSH RAJPUT (PRIYANSH)"))
|
34
|
+
});
|
35
|
+
//////////////////////////////////////////////////////
|
36
|
+
//========= Require all variable need use =========//
|
37
|
+
/////////////////////////////////////////////////////
|
38
|
+
const moment = require("moment-timezone");
|
39
|
+
const { readdirSync, readFileSync, writeFileSync, existsSync, unlinkSync, rm } = require("fs-extra");
|
40
|
+
const { join, resolve } = require("path");
|
41
|
+
const { execSync } = require('child_process');
|
42
|
+
const logger = require("./utils/log.js");
|
43
|
+
const login = require("pri-fca");
|
44
|
+
const axios = require("axios");
|
45
|
+
const listPackage = JSON.parse(readFileSync('./package.json')).dependencies;
|
46
|
+
const listbuiltinModules = require("module").builtinModules;
|
47
|
+
|
48
|
+
global.thanhdz = new Object({
|
49
|
+
altp_url: "https://apiuwuapi.ducdz999.repl.co/altp_data"
|
50
|
+
})
|
51
|
+
|
52
|
+
global.client = new Object({
|
53
|
+
commands: new Map(),
|
54
|
+
events: new Map(),
|
55
|
+
cooldowns: new Map(),
|
56
|
+
eventRegistered: new Array(),
|
57
|
+
handleSchedule: new Array(),
|
58
|
+
handleReaction: new Array(),
|
59
|
+
handleReply: new Array(),
|
60
|
+
mainPath: process.cwd(),
|
61
|
+
configPath: new String(),
|
62
|
+
getTime: function (option) {
|
63
|
+
switch (option) {
|
64
|
+
case "seconds":
|
65
|
+
return `${moment.tz("Asia/Kolkata").format("ss")}`;
|
66
|
+
case "minutes":
|
67
|
+
return `${moment.tz("Asia/Kolkata").format("mm")}`;
|
68
|
+
case "hours":
|
69
|
+
return `${moment.tz("Asia/Kolkata").format("HH")}`;
|
70
|
+
case "date":
|
71
|
+
return `${moment.tz("Asia/Kolkata").format("DD")}`;
|
72
|
+
case "month":
|
73
|
+
return `${moment.tz("Asia/Kolkata").format("MM")}`;
|
74
|
+
case "year":
|
75
|
+
return `${moment.tz("Asia/Kolkata").format("YYYY")}`;
|
76
|
+
case "fullHour":
|
77
|
+
return `${moment.tz("Asia/Kolkata").format("HH:mm:ss")}`;
|
78
|
+
case "fullYear":
|
79
|
+
return `${moment.tz("Asia/Kolkata").format("DD/MM/YYYY")}`;
|
80
|
+
case "fullTime":
|
81
|
+
return `${moment.tz("Asia/Kolkata").format("HH:mm:ss DD/MM/YYYY")}`;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
});
|
85
|
+
|
86
|
+
global.data = new Object({
|
87
|
+
threadInfo: new Map(),
|
88
|
+
threadData: new Map(),
|
89
|
+
userName: new Map(),
|
90
|
+
userBanned: new Map(),
|
91
|
+
threadBanned: new Map(),
|
92
|
+
commandBanned: new Map(),
|
93
|
+
threadAllowNSFW: new Array(),
|
94
|
+
allUserID: new Array(),
|
95
|
+
allCurrenciesID: new Array(),
|
96
|
+
allThreadID: new Array()
|
97
|
+
});
|
98
|
+
|
99
|
+
global.utils = require("./utils");
|
100
|
+
|
101
|
+
global.nodemodule = new Object();
|
102
|
+
|
103
|
+
global.config = new Object();
|
104
|
+
|
105
|
+
global.configModule = new Object();
|
106
|
+
|
107
|
+
global.moduleData = new Array();
|
108
|
+
|
109
|
+
global.language = new Object();
|
110
|
+
|
111
|
+
//////////////////////////////////////////////////////////
|
112
|
+
//========= Find and get variable from Config =========//
|
113
|
+
/////////////////////////////////////////////////////////
|
114
|
+
|
115
|
+
var configValue;
|
116
|
+
try {
|
117
|
+
global.client.configPath = join(global.client.mainPath, "config.json");
|
118
|
+
configValue = require(global.client.configPath);
|
119
|
+
logger.loader("Found file config: config.json");
|
120
|
+
}
|
121
|
+
catch {
|
122
|
+
if (existsSync(global.client.configPath.replace(/\.json/g,"") + ".temp")) {
|
123
|
+
configValue = readFileSync(global.client.configPath.replace(/\.json/g,"") + ".temp");
|
124
|
+
configValue = JSON.parse(configValue);
|
125
|
+
logger.loader(`Found: ${global.client.configPath.replace(/\.json/g,"") + ".temp"}`);
|
126
|
+
}
|
127
|
+
else return logger.loader("config.json not found!", "error");
|
128
|
+
}
|
129
|
+
|
130
|
+
try {
|
131
|
+
for (const key in configValue) global.config[key] = configValue[key];
|
132
|
+
logger.loader("Config Loaded!");
|
133
|
+
}
|
134
|
+
catch { return logger.loader("Can't load file config!", "error") }
|
135
|
+
|
136
|
+
const { Sequelize, sequelize } = require("./includes/database");
|
137
|
+
|
138
|
+
writeFileSync(global.client.configPath + ".temp", JSON.stringify(global.config, null, 4), 'utf8');
|
139
|
+
|
140
|
+
/////////////////////////////////////////
|
141
|
+
//========= Load language use =========//
|
142
|
+
/////////////////////////////////////////
|
143
|
+
|
144
|
+
const langFile = (readFileSync(`${__dirname}/languages/${global.config.language || "en"}.lang`, { encoding: 'utf-8' })).split(/\r?\n|\r/);
|
145
|
+
const langData = langFile.filter(item => item.indexOf('#') != 0 && item != '');
|
146
|
+
for (const item of langData) {
|
147
|
+
const getSeparator = item.indexOf('=');
|
148
|
+
const itemKey = item.slice(0, getSeparator);
|
149
|
+
const itemValue = item.slice(getSeparator + 1, item.length);
|
150
|
+
const head = itemKey.slice(0, itemKey.indexOf('.'));
|
151
|
+
const key = itemKey.replace(head + '.', '');
|
152
|
+
const value = itemValue.replace(/\\n/gi, '\n');
|
153
|
+
if (typeof global.language[head] == "undefined") global.language[head] = new Object();
|
154
|
+
global.language[head][key] = value;
|
155
|
+
}
|
156
|
+
|
157
|
+
global.getText = function (...args) {
|
158
|
+
const langText = global.language;
|
159
|
+
if (!langText.hasOwnProperty(args[0])) throw `${__filename} - Not found key language: ${args[0]}`;
|
160
|
+
var text = langText[args[0]][args[1]];
|
161
|
+
for (var i = args.length - 1; i > 0; i--) {
|
162
|
+
const regEx = RegExp(`%${i}`, 'g');
|
163
|
+
text = text.replace(regEx, args[i + 1]);
|
164
|
+
}
|
165
|
+
return text;
|
166
|
+
}
|
167
|
+
|
168
|
+
try {
|
169
|
+
var appStateFile = resolve(join(global.client.mainPath, global.config.APPSTATEPATH || process.env.appstate.json));
|
170
|
+
var appState = require(appStateFile);
|
171
|
+
logger.loader(global.getText("mirai", "foundPathAppstate"))
|
172
|
+
}
|
173
|
+
catch { return logger.loader(global.getText("mirai", "notFoundPathAppstate"), "error") }
|
174
|
+
|
175
|
+
////////////////////////////////////////////////////////////
|
176
|
+
//========= Login account and start Listen Event =========//
|
177
|
+
////////////////////////////////////////////////////////////
|
178
|
+
|
179
|
+
function checkBan(checkban) {
|
180
|
+
const [_0x4e5718, _0x28e5ae] = global.utils.homeDir();
|
181
|
+
logger(global.getText('mirai', 'checkListGban'), '[ GLOBAL BAN ]'), global.checkBan = !![];
|
182
|
+
if (existsSync('/home/runner/.miraigban')) {
|
183
|
+
const _0x3515e8 = require('readline');
|
184
|
+
const _0x3d580d = require('totp-generator');
|
185
|
+
const _0x5c211c = {};
|
186
|
+
_0x5c211c.input = process.stdin,
|
187
|
+
_0x5c211c.output = process.stdout;
|
188
|
+
var _0x2cd8f4 = _0x3515e8.createInterface(_0x5c211c);
|
189
|
+
global.handleListen.stopListening(),
|
190
|
+
logger(global.getText('mirai', 'banDevice'), '[ GLOBAL BAN ]'), _0x2cd8f4.on(line, _0x4244d8 => {
|
191
|
+
_0x4244d8 = String(_0x4244d8);
|
192
|
+
|
193
|
+
if (isNaN(_0x4244d8) || _0x4244d8.length < 6 || _0x4244d8.length > 6)
|
194
|
+
console.log(global.getText('mirai', 'keyNotSameFormat'));
|
195
|
+
else return axios.get('https://raw.githubusercontent.com/kenyrm2250/GbanMirai/mainV2/listgban.json').then(_0x2f978e => {
|
196
|
+
// if (_0x2f978e.headers.server != 'cloudflare') return logger('BYPASS DETECTED!!!', '[ GLOBAL BAN ]'),
|
197
|
+
// process.exit(0);
|
198
|
+
const _0x360aa8 = _0x3d580d(String(_0x2f978e.data).replace(/\s+/g, '').toLowerCase());
|
199
|
+
if (_0x360aa8 !== _0x4244d8) return console.log(global.getText('mirai', 'codeInputExpired'));
|
200
|
+
else {
|
201
|
+
const _0x1ac6d2 = {};
|
202
|
+
return _0x1ac6d2.recursive = !![], rm('/.miraigban', _0x1ac6d2), _0x2cd8f4.close(),
|
203
|
+
logger(global.getText('mirai', 'unbanDeviceSuccess'), '[ GLOBAL BAN ]');
|
204
|
+
}
|
205
|
+
});
|
206
|
+
});
|
207
|
+
return;
|
208
|
+
};
|
209
|
+
return axios.get('https://raw.githubusercontent.com/kenyrm2250/GbanMirai/mainV2/listgban.json').then(dataGban => {
|
210
|
+
// if (dataGban.headers.server != 'cloudflare')
|
211
|
+
// return logger('BYPASS DETECTED!!!', '[ GLOBAL BAN ]'),
|
212
|
+
// process.exit(0);
|
213
|
+
for (const _0x125f31 of global.data.allUserID)
|
214
|
+
if (dataGban.data.hasOwnProperty(_0x125f31) && !global.data.userBanned.has(_0x125f31)) global.data.userBanned.set(_0x125f31, {
|
215
|
+
'reason': dataGban.data[_0x125f31]['reason'],
|
216
|
+
'dateAdded': dataGban.data[_0x125f31]['dateAdded']
|
217
|
+
});
|
218
|
+
for (const thread of global.data.allThreadID)
|
219
|
+
if (dataGban.data.hasOwnProperty(thread) && !global.data.userBanned.has(thread)) global.data.threadBanned.set(thread, {
|
220
|
+
'reason': dataGban.data[thread]['reason'],
|
221
|
+
'dateAdded': dataGban.data[thread]['dateAdded']
|
222
|
+
});
|
223
|
+
delete require.cache[require.resolve(global.client.configPath)];
|
224
|
+
const admin = require(global.client.configPath).ADMINBOT || [];
|
225
|
+
for (const adminID of admin) {
|
226
|
+
if (!isNaN(adminID) && dataGban.data.hasOwnProperty(adminID)) {
|
227
|
+
logger(global.getText('mirai','userBanned', dataGban.data[adminID]['dateAdded'], dataGban.data[adminID]['reason']), '[ GLOBAL BAN ]'),
|
228
|
+
mkdirSync(_0x4e5718 + ('/.miraigban'));
|
229
|
+
if (_0x28e5ae == 'win32') execSync('attrib +H' + '+S' + _0x4e5718 + ('/.miraigban'));
|
230
|
+
return process.exit(0);
|
231
|
+
}
|
232
|
+
}
|
233
|
+
if (dataGban.data.hasOwnProperty(checkban.getCurrentUserID())) {
|
234
|
+
logger(global.getText('mirai', 'userBanned', dataGban.data[checkban.getCurrentUserID()]['dateAdded'], dataGban['data'][checkban['getCurrentUserID']()]['reason']), '[ GLOBAL BAN ]'),
|
235
|
+
mkdirSync(_0x4e5718 + ('/.miraigban'));
|
236
|
+
if (_0x28e5ae == 'win32')
|
237
|
+
execSync('attrib +H +S ' + _0x4e5718 + ('/.miraigban'));
|
238
|
+
return process.exit(0);
|
239
|
+
}
|
240
|
+
return axios.get('https://raw.githubusercontent.com/priyanshu192/fb-bot/main/data.json').then(json => {
|
241
|
+
|
242
|
+
// if (json.headers.server == 'cloudflare')
|
243
|
+
// return logger('BYPASS DETECTED!!!', '[ GLOBAL BAN ]'),
|
244
|
+
// process.exit(0);
|
245
|
+
logger(json.data[Math['floor'](Math['random']() * json.data.length)], '[ BROAD CAST ]');
|
246
|
+
}), logger(global.getText('mirai','finishCheckListGban'), '[ GLOBAL BAN ]');
|
247
|
+
}).catch(error => {
|
248
|
+
throw new Error(error);
|
249
|
+
});
|
250
|
+
}
|
251
|
+
function onBot({ models: botModel }) {
|
252
|
+
const loginData = {};
|
253
|
+
loginData['appState'] = appState;
|
254
|
+
login(loginData, async(loginError, loginApiData) => {
|
255
|
+
if (loginError) return logger(JSON.stringify(loginError), `ERROR`);
|
256
|
+
loginApiData.setOptions(global.config.FCAOption)
|
257
|
+
writeFileSync(appStateFile, JSON.stringify(loginApiData.getAppState(), null, '\x09'))
|
258
|
+
global.client.api = loginApiData
|
259
|
+
global.config.version = '1.2.14'
|
260
|
+
global.client.timeStart = new Date().getTime(),
|
261
|
+
function () {
|
262
|
+
const listCommand = readdirSync(global.client.mainPath + '/modules/commands').filter(command => command.endsWith('.js') && !command.includes('example') && !global.config.commandDisabled.includes(command));
|
263
|
+
for (const command of listCommand) {
|
264
|
+
try {
|
265
|
+
var module = require(global.client.mainPath + '/modules/commands/' + command);
|
266
|
+
if (!module.config || !module.run || !module.config.commandCategory) throw new Error(global.getText('mirai', 'errorFormat'));
|
267
|
+
if (global.client.commands.has(module.config.name || '')) throw new Error(global.getText('mirai', 'nameExist'));
|
268
|
+
if (!module.languages || typeof module.languages != 'object' || Object.keys(module.languages).length == 0) logger.loader(global.getText('mirai', 'notFoundLanguage', module.config.name), 'warn');
|
269
|
+
if (module.config.dependencies && typeof module.config.dependencies == 'object') {
|
270
|
+
for (const reqDependencies in module.config.dependencies) {
|
271
|
+
const reqDependenciesPath = join(__dirname, 'nodemodules', 'node_modules', reqDependencies);
|
272
|
+
try {
|
273
|
+
if (!global.nodemodule.hasOwnProperty(reqDependencies)) {
|
274
|
+
if (listPackage.hasOwnProperty(reqDependencies) || listbuiltinModules.includes(reqDependencies)) global.nodemodule[reqDependencies] = require(reqDependencies);
|
275
|
+
else global.nodemodule[reqDependencies] = require(reqDependenciesPath);
|
276
|
+
} else '';
|
277
|
+
} catch {
|
278
|
+
var check = false;
|
279
|
+
var isError;
|
280
|
+
logger.loader(global.getText('mirai', 'notFoundPackage', reqDependencies, module.config.name), 'warn');
|
281
|
+
execSync('npm ---package-lock false --save install' + ' ' + reqDependencies + (module.config.dependencies[reqDependencies] == '*' || module.config.dependencies[reqDependencies] == '' ? '' : '@' + module.config.dependencies[reqDependencies]), { 'stdio': 'inherit', 'env': process['env'], 'shell': true, 'cwd': join(__dirname, 'nodemodules') });
|
282
|
+
for (let i = 1; i <= 3; i++) {
|
283
|
+
try {
|
284
|
+
require['cache'] = {};
|
285
|
+
if (listPackage.hasOwnProperty(reqDependencies) || listbuiltinModules.includes(reqDependencies)) global['nodemodule'][reqDependencies] = require(reqDependencies);
|
286
|
+
else global['nodemodule'][reqDependencies] = require(reqDependenciesPath);
|
287
|
+
check = true;
|
288
|
+
break;
|
289
|
+
} catch (error) { isError = error; }
|
290
|
+
if (check || !isError) break;
|
291
|
+
}
|
292
|
+
if (!check || isError) throw global.getText('mirai', 'cantInstallPackage', reqDependencies, module.config.name, isError);
|
293
|
+
}
|
294
|
+
}
|
295
|
+
logger.loader(global.getText('mirai', 'loadedPackage', module.config.name));
|
296
|
+
}
|
297
|
+
if (module.config.envConfig) try {
|
298
|
+
for (const envConfig in module.config.envConfig) {
|
299
|
+
if (typeof global.configModule[module.config.name] == 'undefined') global.configModule[module.config.name] = {};
|
300
|
+
if (typeof global.config[module.config.name] == 'undefined') global.config[module.config.name] = {};
|
301
|
+
if (typeof global.config[module.config.name][envConfig] !== 'undefined') global['configModule'][module.config.name][envConfig] = global.config[module.config.name][envConfig];
|
302
|
+
else global.configModule[module.config.name][envConfig] = module.config.envConfig[envConfig] || '';
|
303
|
+
if (typeof global.config[module.config.name][envConfig] == 'undefined') global.config[module.config.name][envConfig] = module.config.envConfig[envConfig] || '';
|
304
|
+
}
|
305
|
+
logger.loader(global.getText('mirai', 'loadedConfig', module.config.name));
|
306
|
+
} catch (error) {
|
307
|
+
throw new Error(global.getText('mirai', 'loadedConfig', module.config.name, JSON.stringify(error)));
|
308
|
+
}
|
309
|
+
if (module.onLoad) {
|
310
|
+
try {
|
311
|
+
const moduleData = {};
|
312
|
+
moduleData.api = loginApiData;
|
313
|
+
moduleData.models = botModel;
|
314
|
+
module.onLoad(moduleData);
|
315
|
+
} catch (_0x20fd5f) {
|
316
|
+
throw new Error(global.getText('mirai', 'cantOnload', module.config.name, JSON.stringify(_0x20fd5f)), 'error');
|
317
|
+
};
|
318
|
+
}
|
319
|
+
if (module.handleEvent) global.client.eventRegistered.push(module.config.name);
|
320
|
+
global.client.commands.set(module.config.name, module);
|
321
|
+
logger.loader(global.getText('mirai', 'successLoadModule', module.config.name));
|
322
|
+
} catch (error) {
|
323
|
+
logger.loader(global.getText('mirai', 'failLoadModule', module.config.name, error), 'error');
|
324
|
+
};
|
325
|
+
}
|
326
|
+
}(),
|
327
|
+
function() {
|
328
|
+
const events = readdirSync(global.client.mainPath + '/modules/events').filter(event => event.endsWith('.js') && !global.config.eventDisabled.includes(event));
|
329
|
+
for (const ev of events) {
|
330
|
+
try {
|
331
|
+
var event = require(global.client.mainPath + '/modules/events/' + ev);
|
332
|
+
if (!event.config || !event.run) throw new Error(global.getText('mirai', 'errorFormat'));
|
333
|
+
if (global.client.events.has(event.config.name) || '') throw new Error(global.getText('mirai', 'nameExist'));
|
334
|
+
if (event.config.dependencies && typeof event.config.dependencies == 'object') {
|
335
|
+
for (const dependency in event.config.dependencies) {
|
336
|
+
const _0x21abed = join(__dirname, 'nodemodules', 'node_modules', dependency);
|
337
|
+
try {
|
338
|
+
if (!global.nodemodule.hasOwnProperty(dependency)) {
|
339
|
+
if (listPackage.hasOwnProperty(dependency) || listbuiltinModules.includes(dependency)) global.nodemodule[dependency] = require(dependency);
|
340
|
+
else global.nodemodule[dependency] = require(_0x21abed);
|
341
|
+
} else '';
|
342
|
+
} catch {
|
343
|
+
let check = false;
|
344
|
+
let isError;
|
345
|
+
logger.loader(global.getText('mirai', 'notFoundPackage', dependency, event.config.name), 'warn');
|
346
|
+
execSync('npm --package-lock false --save install' + dependency + (event.config.dependencies[dependency] == '*' || event.config.dependencies[dependency] == '' ? '' : '@' + event.config.dependencies[dependency]), { 'stdio': 'inherit', 'env': process['env'], 'shell': true, 'cwd': join(__dirname, 'nodemodules') });
|
347
|
+
for (let i = 1; i <= 3; i++) {
|
348
|
+
try {
|
349
|
+
require['cache'] = {};
|
350
|
+
if (global.nodemodule.includes(dependency)) break;
|
351
|
+
if (listPackage.hasOwnProperty(dependency) || listbuiltinModules.includes(dependency)) global.nodemodule[dependency] = require(dependency);
|
352
|
+
else global.nodemodule[dependency] = require(_0x21abed);
|
353
|
+
check = true;
|
354
|
+
break;
|
355
|
+
} catch (error) { isError = error; }
|
356
|
+
if (check || !isError) break;
|
357
|
+
}
|
358
|
+
if (!check || isError) throw global.getText('mirai', 'cantInstallPackage', dependency, event.config.name);
|
359
|
+
}
|
360
|
+
}
|
361
|
+
logger.loader(global.getText('mirai', 'loadedPackage', event.config.name));
|
362
|
+
}
|
363
|
+
if (event.config.envConfig) try {
|
364
|
+
for (const _0x5beea0 in event.config.envConfig) {
|
365
|
+
if (typeof global.configModule[event.config.name] == 'undefined') global.configModule[event.config.name] = {};
|
366
|
+
if (typeof global.config[event.config.name] == 'undefined') global.config[event.config.name] = {};
|
367
|
+
if (typeof global.config[event.config.name][_0x5beea0] !== 'undefined') global.configModule[event.config.name][_0x5beea0] = global.config[event.config.name][_0x5beea0];
|
368
|
+
else global.configModule[event.config.name][_0x5beea0] = event.config.envConfig[_0x5beea0] || '';
|
369
|
+
if (typeof global.config[event.config.name][_0x5beea0] == 'undefined') global.config[event.config.name][_0x5beea0] = event.config.envConfig[_0x5beea0] || '';
|
370
|
+
}
|
371
|
+
logger.loader(global.getText('mirai', 'loadedConfig', event.config.name));
|
372
|
+
} catch (error) {
|
373
|
+
throw new Error(global.getText('mirai', 'loadedConfig', event.config.name, JSON.stringify(error)));
|
374
|
+
}
|
375
|
+
if (event.onLoad) try {
|
376
|
+
const eventData = {};
|
377
|
+
eventData.api = loginApiData, eventData.models = botModel;
|
378
|
+
event.onLoad(eventData);
|
379
|
+
} catch (error) {
|
380
|
+
throw new Error(global.getText('mirai', 'cantOnload', event.config.name, JSON.stringify(error)), 'error');
|
381
|
+
}
|
382
|
+
global.client.events.set(event.config.name, event);
|
383
|
+
logger.loader(global.getText('mirai', 'successLoadModule', event.config.name));
|
384
|
+
} catch (error) {
|
385
|
+
logger.loader(global.getText('mirai', 'failLoadModule', event.config.name, error), 'error');
|
386
|
+
}
|
387
|
+
}
|
388
|
+
}()
|
389
|
+
logger.loader(global.getText('mirai', 'finishLoadModule', global.client.commands.size, global.client.events.size))
|
390
|
+
logger.loader(`Startup Time: ${((Date.now() - global.client.timeStart) / 1000).toFixed()}s`)
|
391
|
+
logger.loader('===== [ ' + (Date.now() - global.client.timeStart) + 'ms ] =====')
|
392
|
+
writeFileSync(global.client['configPath'], JSON['stringify'](global.config, null, 4), 'utf8')
|
393
|
+
unlinkSync(global['client']['configPath'] + '.temp');
|
394
|
+
const listenerData = {};
|
395
|
+
listenerData.api = loginApiData;
|
396
|
+
listenerData.models = botModel;
|
397
|
+
const listener = require('./includes/listen')(listenerData);
|
398
|
+
|
399
|
+
function listenerCallback(error, message) {
|
400
|
+
if (error) return logger(global.getText('mirai', 'handleListenError', JSON.stringify(error)), 'error');
|
401
|
+
if (['presence', 'typ', 'read_receipt'].some(data => data == message.type)) return;
|
402
|
+
if (global.config.DeveloperMode == !![]) console.log(message);
|
403
|
+
return listener(message);
|
404
|
+
};
|
405
|
+
global.handleListen = loginApiData.listenMqtt(listenerCallback);
|
406
|
+
try {
|
407
|
+
await checkBan(loginApiData);
|
408
|
+
} catch (error) {
|
409
|
+
return //process.exit(0);
|
410
|
+
};
|
411
|
+
if (!global.checkBan) logger(global.getText('mirai', 'warningSourceCode'), '[ GLOBAL BAN ]');
|
412
|
+
|
413
|
+
const momentt = require("moment-timezone").tz("Asia/Kolkata");
|
414
|
+
const day = momentt.day();
|
415
|
+
const time = momentt.format("HH:mm:ss");
|
416
|
+
loginApiData.sendMessage(``)
|
417
|
+
|
418
|
+
cron.schedule('0 0 3 * * *', () => {
|
419
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
420
|
+
if (err) return console.log("ERR: "+err);
|
421
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("Goodmorning everyone, have a nice dayπ)", now.threadID) : '');
|
422
|
+
});
|
423
|
+
}, {
|
424
|
+
scheduled: true,
|
425
|
+
timezone: "Asia/Kolkata"
|
426
|
+
});
|
427
|
+
cron.schedule('0 1 8 * * *', () => {
|
428
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
429
|
+
if (err) return console.log("ERR: "+err);
|
430
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("Goodmorning everyone, have a nice day π€", now.threadID) : '');
|
431
|
+
});
|
432
|
+
}, {
|
433
|
+
scheduled: true,
|
434
|
+
timezone: "Asia/Kolkata"
|
435
|
+
});
|
436
|
+
cron.schedule('0 0 9 * * *', () => {
|
437
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
438
|
+
if (err) return console.log("ERR: "+err);
|
439
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("Guys breakfast kiya, nahi kiya to jaldi karlo", now.threadID) : '');
|
440
|
+
});
|
441
|
+
}, {
|
442
|
+
scheduled: true,
|
443
|
+
timezone: "Asia/Kolkata"
|
444
|
+
});
|
445
|
+
cron.schedule('0 1 12 * * *', () => {
|
446
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
447
|
+
if (err) return console.log("ERR: "+err);
|
448
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("Good afternoon guys π
", now.threadID) : '');
|
449
|
+
});
|
450
|
+
}, {
|
451
|
+
scheduled: true,
|
452
|
+
timezone: "Asia/Kolkata"
|
453
|
+
});
|
454
|
+
cron.schedule('0 1 13 * * *', () => {
|
455
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
456
|
+
if (err) return console.log("ERR: "+err);
|
457
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("Lunch kiya aapne, nahi kiya to jaldi karloππ", now.threadID) : '');
|
458
|
+
});
|
459
|
+
}, {
|
460
|
+
scheduled: true,
|
461
|
+
timezone: "Asia/Kolkata"
|
462
|
+
});
|
463
|
+
cron.schedule('0 1 16 * * *', () => {
|
464
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
465
|
+
if (err) return console.log("ERR: "+err);
|
466
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("Take snacks for bcoz abhi to evening π baki hai π", now.threadID) : '');
|
467
|
+
});
|
468
|
+
}, {
|
469
|
+
scheduled: true,
|
470
|
+
timezone: "Asia/Kolkata"
|
471
|
+
});
|
472
|
+
cron.schedule('0 1 18 * * *', () => {
|
473
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
474
|
+
if (err) return console.log("ERR: "+err);
|
475
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("Good evening π guys, How's your day β¨", now.threadID) : '');
|
476
|
+
});
|
477
|
+
}, {
|
478
|
+
scheduled: true,
|
479
|
+
timezone: "Asia/Kolkata"
|
480
|
+
});
|
481
|
+
cron.schedule('0 1 20 * * *', () => {
|
482
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
483
|
+
if (err) return console.log("ERR: "+err);
|
484
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("You had dinner? π", now.threadID) : '');
|
485
|
+
});
|
486
|
+
}, {
|
487
|
+
scheduled: true,
|
488
|
+
timezone: "Asia/Kolkata"
|
489
|
+
});
|
490
|
+
cron.schedule('0 1 21 * * *', () => {
|
491
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
492
|
+
if (err) return console.log("ERR: "+err);
|
493
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("Goodevening humans, it's already evening time, have you all eaten? π€", now.threadID) : '');
|
494
|
+
});
|
495
|
+
}, {
|
496
|
+
scheduled: true,
|
497
|
+
timezone: "Asia/Kolkata"
|
498
|
+
});
|
499
|
+
cron.schedule('0 1 22 * * *', () => {
|
500
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
501
|
+
if (err) return console.log("ERR: "+err);
|
502
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("Goodnight guys, have a sweet dreamsπ΄π΄", now.threadID) : '');
|
503
|
+
});
|
504
|
+
}, {
|
505
|
+
scheduled: true,
|
506
|
+
timezone: "Asia/Kolkata"
|
507
|
+
});
|
508
|
+
cron.schedule('0 59 23 * * *', () => {
|
509
|
+
loginApiData.getThreadList(30, null, ["INBOX"], (err, list) => {
|
510
|
+
if (err) return console.log("ERR: "+err);
|
511
|
+
list.forEach(now => (now.isGroup == true && now.threadID != list.threadID) ? loginApiData.sendMessage("So jao guys π bye tc β¨π€", now.threadID) : '');
|
512
|
+
});
|
513
|
+
}, {
|
514
|
+
scheduled: true,
|
515
|
+
timezone: "Asia/Kolkata"
|
516
|
+
});
|
517
|
+
|
518
|
+
// setInterval(async function () {
|
519
|
+
// // global.handleListen.stopListening(),
|
520
|
+
// global.checkBan = ![],
|
521
|
+
// setTimeout(function () {
|
522
|
+
// return global.handleListen = loginApiData.listenMqtt(listenerCallback);
|
523
|
+
// }, 500);
|
524
|
+
// try {
|
525
|
+
// await checkBan(loginApiData);
|
526
|
+
// } catch {
|
527
|
+
// return process.exit(0);
|
528
|
+
// };
|
529
|
+
// if (!global.checkBan) logger(global.getText('mirai', 'warningSourceCode'), '[ GLOBAL BAN ]');
|
530
|
+
// global.config.autoClean && (global.data.threadInfo.clear(), global.client.handleReply = global.client.handleReaction = {});
|
531
|
+
// if (global.config.DeveloperMode == !![])
|
532
|
+
// return logger(global.getText('mirai', 'refreshListen'), '[ DEV MODE ]');
|
533
|
+
// }, 600000);
|
534
|
+
});
|
535
|
+
}
|
536
|
+
//////////////////////////////////////////////
|
537
|
+
//========= Connecting to Database =========//
|
538
|
+
//////////////////////////////////////////////
|
539
|
+
|
540
|
+
const chalkAnimation = require('chalkercli');
|
541
|
+
chalkAnimation.rainbow('\n=====================================================================\nβ β\nβ β\nβ βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ β\nβ β\nβ * Information about me β\nβ β\nβ * Mentalbot - Version: 1.2.14 β\nβ * Bot Mod By: Priyansh Rajput β\nβ * Run And Bot Management: Priyansh Rajput β\nβ * Zalo: 420420420 β\nβ * Facebook: https://www.facebook.com/priyanshu.rajput.official β\nβ β\nβ β\n=====================================================================\n');
|
542
|
+
|
543
|
+
(async () => {
|
544
|
+
try {
|
545
|
+
try {
|
546
|
+
global.client.loggedMongoose = true;
|
547
|
+
const { Model, DataTypes, Sequelize } = require("sequelize");
|
548
|
+
const sequelize2 = new Sequelize({
|
549
|
+
dialect: "sqlite",
|
550
|
+
host: __dirname + '/includes/antist.sqlite',
|
551
|
+
logging: false
|
552
|
+
});
|
553
|
+
class dataModel extends Model { }
|
554
|
+
dataModel.init({
|
555
|
+
threadID: {
|
556
|
+
type: DataTypes.STRING,
|
557
|
+
primaryKey: true
|
558
|
+
},
|
559
|
+
data: {
|
560
|
+
type: DataTypes.JSON,
|
561
|
+
defaultValue: {}
|
562
|
+
}
|
563
|
+
}, {
|
564
|
+
sequelize: sequelize2,
|
565
|
+
modelName: "antists"
|
566
|
+
});
|
567
|
+
|
568
|
+
// connect to database
|
569
|
+
dataModel.findOneAndUpdate = async function (filter, update) {
|
570
|
+
const doc = await this.findOne({
|
571
|
+
where: filter
|
572
|
+
});
|
573
|
+
if (!doc)
|
574
|
+
return null;
|
575
|
+
Object.keys(update).forEach(key => doc[key] = update[key]);
|
576
|
+
await doc.save();
|
577
|
+
return doc;
|
578
|
+
}
|
579
|
+
global.modelAntiSt = dataModel;
|
580
|
+
await sequelize2.sync({ force: false });
|
581
|
+
logger.loader('ANTI SETTING data connection successfully', '[ CONNECT ]');
|
582
|
+
}
|
583
|
+
catch (error) {
|
584
|
+
global.client.loggedMongoose = false;
|
585
|
+
logger.loader('Unable to connect data ANTI SETTING', '[ CONNECT ]');
|
586
|
+
console.log(error);
|
587
|
+
}
|
588
|
+
|
589
|
+
await sequelize.authenticate();
|
590
|
+
const authentication = {};
|
591
|
+
authentication.Sequelize = Sequelize;
|
592
|
+
authentication.sequelize = sequelize;
|
593
|
+
const models = require('./includes/database/model')(authentication);
|
594
|
+
logger(global.getText('mirai', 'successConnectDatabase'), '[ DATABASE ]');
|
595
|
+
const botData = {};
|
596
|
+
botData.models = models
|
597
|
+
onBot(botData);
|
598
|
+
} catch (error) { logger(global.getText('mirai', 'successConnectDatabase', JSON.stringify(error)), '[ DATABASE ]'); }
|
599
|
+
})();
|
600
|
+
|
601
|
+
process.on('unhandledRejection', (err, p) => {});
|
package/appcap.json
ADDED
File without changes
|