├── .eslintignore
├── .eslintrc.json
├── .gitignore
├── .prettierignore
├── .prettierrc.js
├── .vscode
├── extensions.json
└── settings.json
├── LICENSE
├── README.md
├── fonts
├── Bangers.ttf
├── Boogaloo.ttf
├── Bosih.ttf
├── Bulgatti.ttf
├── Captcha.ttf
├── Impact.ttf
├── Indie-Flower.ttf
├── Jekawe.ttf
├── Noto-CJK.otf
├── Noto-Emoji.ttf
├── Noto-Regular.ttf
├── Robertson.ttf
└── harta.ttf
├── groups
└── .gitignore
├── image
├── Characters
│ ├── albedo.png
│ ├── amber.png
│ ├── barbara.png
│ ├── beidou.png
│ ├── bennett.png
│ ├── chongyun.png
│ ├── diluc.png
│ ├── diona.png
│ ├── fischl.png
│ ├── jean.png
│ ├── kaeya.png
│ ├── keqing.png
│ ├── lisa.png
│ ├── mona.png
│ ├── ningguang.png
│ ├── noelle.png
│ ├── qiqi.png
│ ├── razor.png
│ ├── sucrose.png
│ ├── xiangling.png
│ ├── xingqiu.png
│ └── xinyan.png
├── Weapons
│ ├── amos' bow.png
│ ├── aquila favonia.png
│ ├── black tassel.png
│ ├── bloodtainted greatsword.png
│ ├── cool steel.png
│ ├── debate club.png
│ ├── dragon's bane.png
│ ├── emerald orb.png
│ ├── eye of perception.png
│ ├── favonius codex.png
│ ├── favonius greatsword.png
│ ├── favonius lance.png
│ ├── favonius sword.png
│ ├── favonius warbow.png
│ ├── ferrous shadow.png
│ ├── fillet blade.png
│ ├── halberd.png
│ ├── harbinger of dawn.png
│ ├── lion's roar.png
│ ├── lost prayer to the sacred winds.png
│ ├── magic guide.png
│ ├── primordial jade-winged spear.png
│ ├── rainslasher.png
│ ├── raven bow.png
│ ├── rust.png
│ ├── sacrificial bow.png
│ ├── sacrificial fragments.png
│ ├── sacrificial greatsword.png
│ ├── sacrificial sword.png
│ ├── sharpshooter's oath.png
│ ├── skyrider greatsword.png
│ ├── skyrider sword.png
│ ├── skyward atlas.png
│ ├── skyward blade.png
│ ├── skyward harp.png
│ ├── skyward pride.png
│ ├── skyward spine.png
│ ├── slingshot.png
│ ├── summit shaper.png
│ ├── the bell.png
│ ├── the flute.png
│ ├── the stringless.png
│ ├── the widsith.png
│ ├── thrilling tales of dragon slayers.png
│ ├── white iron greatsword.png
│ └── wolf's gravestone.png
├── default-dp.jpeg
├── fakeimage.jpeg
├── rainbow.jpg
├── rainbow2.jpg
├── rainbow3.jpg
├── rainbow4.jpg
├── rainbow5.jpg
├── rainbow6.jpg
├── rainbow7.jpg
├── slayer.jpeg
├── spongebob-burn.png
├── template-backup.jpg
├── template.jpg
├── thug-life.png
├── to-be-continued.png
└── wm.png
├── index.ts
├── json
├── caklontong.json
├── error.json
├── filters.json
├── loginData.json
├── lorem.txt
├── raw
│ ├── cloud.json
│ ├── config.json
│ ├── count.json
│ ├── genshin.json
│ ├── public.json
│ ├── reply.json
│ ├── setting.json
│ └── sticker.json
├── surah.txt
└── textpro.json
├── lib
├── Canvas.ts
├── canvacord.ts
├── cloud.ts
├── exif.js
├── extract.ts
├── functions.ts
├── games.ts
├── genshin.ts
├── gify.ts
├── group.ts
├── igstalk.ts
├── inspect.js
├── jadibot.ts
├── kusonime.js
├── obfuscate.ts
├── oploverz.ts
├── scrap.ts
├── sticker.ts
├── ttp.ts
└── vhtear.js
├── nodemon.sh
├── nsfw_model
├── group1-shard1of6.bin
├── group1-shard2of6.bin
├── group1-shard3of6.bin
├── group1-shard4of6.bin
├── group1-shard5of6.bin
├── group1-shard6of6.bin
└── model.json
├── package.json
├── pm2.sh
├── raw
└── main.jpg
├── speech.py
├── src
├── count.ts
├── data.exif
├── index.ts
├── login.ts
├── reply.ts
├── template.ts
└── util.ts
├── start.sh
├── tsconfig.json
├── types
└── index.ts
├── users
└── 6281297980063@s.whatsapp.net
│ ├── db.json
│ └── genshin.json
└── yarn.lock
/.eslintignore:
--------------------------------------------------------------------------------
1 | dist/
2 | temp/
3 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./node_modules/gts/"
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist/*
3 | sticker/*
4 | users/*
5 | cloud/*
6 | temp/*
7 | json/loginData.json
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | index.ts
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | ...require('gts/.prettierrc.json'),
3 | tabWidth: 2,
4 | useTabs: true,
5 | semi: true,
6 | printWidth: 80,
7 | endOfLine: 'auto',
8 | overrides: [
9 | {
10 | files: [".*", "*.json"],
11 | options: { "parser": "json" }
12 | }
13 | ],
14 | parser: "typescript"
15 | };
16 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
3 | }
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.formatOnSave": true,
3 | "typescript.tsdk": "./node_modules/typescript/lib",
4 | "files.exclude": {
5 | "**/.git": true,
6 | "node_modules": true,
7 | ".vscode": true
8 | },
9 | "eslint.enable": true,
10 | "eslint.validate": ["typescript"]
11 | }
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 ItzNgga
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | # XBOT
21 | Powerfull Bot Builded With TypeScript
22 |
23 | ## Instalation
24 | - change default login [number](https://github.com/ItzNgga/xbot/blob/master/index.ts#L491)
25 | - use `tsc` to compile the project
26 |
27 | ## Usage
28 | - `sh start.sh` normal start
29 | - `sh pm2.sh` pm2 runtime start
30 | - `sh nodemon.sh` nodemon runtime start
31 |
32 | ## Config
33 | change your default raw [config file](https://github.com/ItzNgga/xbot/blob/master/json/raw/config.json)
34 |
35 | ## Requirements
36 | - Android/Termux currently not supported
37 | - Waifu2x Cpp Binary *(optional)*
38 | - TensorFlow Cpu support *(optional)*
39 | - Python Speech Recognition package *(optional)*
40 | - ImageMagic/GraphicsMagic support
41 | - FFMPEG support
42 | ## Main Features
43 | - Lewd picture detector
44 | - Anime Picture Optimizer
45 | - Harta Tahta ImageMagic
46 | - Speech To Text (en-US/id-ID)
47 | - Simple TicTacToe game
48 | - Simple Genshin Impact wishing system
49 | - Convert to 8D Audio
50 | - AntiBUG Obj detection
51 | - and many more...
52 |
53 | ## License
54 | [MIT](https://github.com/ItzNgga/xbot/blob/master/LICENSE)
--------------------------------------------------------------------------------
/fonts/Bangers.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Bangers.ttf
--------------------------------------------------------------------------------
/fonts/Boogaloo.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Boogaloo.ttf
--------------------------------------------------------------------------------
/fonts/Bosih.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Bosih.ttf
--------------------------------------------------------------------------------
/fonts/Bulgatti.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Bulgatti.ttf
--------------------------------------------------------------------------------
/fonts/Captcha.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Captcha.ttf
--------------------------------------------------------------------------------
/fonts/Impact.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Impact.ttf
--------------------------------------------------------------------------------
/fonts/Indie-Flower.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Indie-Flower.ttf
--------------------------------------------------------------------------------
/fonts/Jekawe.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Jekawe.ttf
--------------------------------------------------------------------------------
/fonts/Noto-CJK.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Noto-CJK.otf
--------------------------------------------------------------------------------
/fonts/Noto-Emoji.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Noto-Emoji.ttf
--------------------------------------------------------------------------------
/fonts/Noto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Noto-Regular.ttf
--------------------------------------------------------------------------------
/fonts/Robertson.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/Robertson.ttf
--------------------------------------------------------------------------------
/fonts/harta.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/fonts/harta.ttf
--------------------------------------------------------------------------------
/groups/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/image/Characters/albedo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/albedo.png
--------------------------------------------------------------------------------
/image/Characters/amber.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/amber.png
--------------------------------------------------------------------------------
/image/Characters/barbara.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/barbara.png
--------------------------------------------------------------------------------
/image/Characters/beidou.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/beidou.png
--------------------------------------------------------------------------------
/image/Characters/bennett.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/bennett.png
--------------------------------------------------------------------------------
/image/Characters/chongyun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/chongyun.png
--------------------------------------------------------------------------------
/image/Characters/diluc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/diluc.png
--------------------------------------------------------------------------------
/image/Characters/diona.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/diona.png
--------------------------------------------------------------------------------
/image/Characters/fischl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/fischl.png
--------------------------------------------------------------------------------
/image/Characters/jean.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/jean.png
--------------------------------------------------------------------------------
/image/Characters/kaeya.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/kaeya.png
--------------------------------------------------------------------------------
/image/Characters/keqing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/keqing.png
--------------------------------------------------------------------------------
/image/Characters/lisa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/lisa.png
--------------------------------------------------------------------------------
/image/Characters/mona.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/mona.png
--------------------------------------------------------------------------------
/image/Characters/ningguang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/ningguang.png
--------------------------------------------------------------------------------
/image/Characters/noelle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/noelle.png
--------------------------------------------------------------------------------
/image/Characters/qiqi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/qiqi.png
--------------------------------------------------------------------------------
/image/Characters/razor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/razor.png
--------------------------------------------------------------------------------
/image/Characters/sucrose.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/sucrose.png
--------------------------------------------------------------------------------
/image/Characters/xiangling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/xiangling.png
--------------------------------------------------------------------------------
/image/Characters/xingqiu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/xingqiu.png
--------------------------------------------------------------------------------
/image/Characters/xinyan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Characters/xinyan.png
--------------------------------------------------------------------------------
/image/Weapons/amos' bow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/amos' bow.png
--------------------------------------------------------------------------------
/image/Weapons/aquila favonia.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/aquila favonia.png
--------------------------------------------------------------------------------
/image/Weapons/black tassel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/black tassel.png
--------------------------------------------------------------------------------
/image/Weapons/bloodtainted greatsword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/bloodtainted greatsword.png
--------------------------------------------------------------------------------
/image/Weapons/cool steel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/cool steel.png
--------------------------------------------------------------------------------
/image/Weapons/debate club.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/debate club.png
--------------------------------------------------------------------------------
/image/Weapons/dragon's bane.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/dragon's bane.png
--------------------------------------------------------------------------------
/image/Weapons/emerald orb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/emerald orb.png
--------------------------------------------------------------------------------
/image/Weapons/eye of perception.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/eye of perception.png
--------------------------------------------------------------------------------
/image/Weapons/favonius codex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/favonius codex.png
--------------------------------------------------------------------------------
/image/Weapons/favonius greatsword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/favonius greatsword.png
--------------------------------------------------------------------------------
/image/Weapons/favonius lance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/favonius lance.png
--------------------------------------------------------------------------------
/image/Weapons/favonius sword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/favonius sword.png
--------------------------------------------------------------------------------
/image/Weapons/favonius warbow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/favonius warbow.png
--------------------------------------------------------------------------------
/image/Weapons/ferrous shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/ferrous shadow.png
--------------------------------------------------------------------------------
/image/Weapons/fillet blade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/fillet blade.png
--------------------------------------------------------------------------------
/image/Weapons/halberd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/halberd.png
--------------------------------------------------------------------------------
/image/Weapons/harbinger of dawn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/harbinger of dawn.png
--------------------------------------------------------------------------------
/image/Weapons/lion's roar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/lion's roar.png
--------------------------------------------------------------------------------
/image/Weapons/lost prayer to the sacred winds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/lost prayer to the sacred winds.png
--------------------------------------------------------------------------------
/image/Weapons/magic guide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/magic guide.png
--------------------------------------------------------------------------------
/image/Weapons/primordial jade-winged spear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/primordial jade-winged spear.png
--------------------------------------------------------------------------------
/image/Weapons/rainslasher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/rainslasher.png
--------------------------------------------------------------------------------
/image/Weapons/raven bow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/raven bow.png
--------------------------------------------------------------------------------
/image/Weapons/rust.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/rust.png
--------------------------------------------------------------------------------
/image/Weapons/sacrificial bow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/sacrificial bow.png
--------------------------------------------------------------------------------
/image/Weapons/sacrificial fragments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/sacrificial fragments.png
--------------------------------------------------------------------------------
/image/Weapons/sacrificial greatsword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/sacrificial greatsword.png
--------------------------------------------------------------------------------
/image/Weapons/sacrificial sword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/sacrificial sword.png
--------------------------------------------------------------------------------
/image/Weapons/sharpshooter's oath.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/sharpshooter's oath.png
--------------------------------------------------------------------------------
/image/Weapons/skyrider greatsword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/skyrider greatsword.png
--------------------------------------------------------------------------------
/image/Weapons/skyrider sword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/skyrider sword.png
--------------------------------------------------------------------------------
/image/Weapons/skyward atlas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/skyward atlas.png
--------------------------------------------------------------------------------
/image/Weapons/skyward blade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/skyward blade.png
--------------------------------------------------------------------------------
/image/Weapons/skyward harp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/skyward harp.png
--------------------------------------------------------------------------------
/image/Weapons/skyward pride.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/skyward pride.png
--------------------------------------------------------------------------------
/image/Weapons/skyward spine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/skyward spine.png
--------------------------------------------------------------------------------
/image/Weapons/slingshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/slingshot.png
--------------------------------------------------------------------------------
/image/Weapons/summit shaper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/summit shaper.png
--------------------------------------------------------------------------------
/image/Weapons/the bell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/the bell.png
--------------------------------------------------------------------------------
/image/Weapons/the flute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/the flute.png
--------------------------------------------------------------------------------
/image/Weapons/the stringless.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/the stringless.png
--------------------------------------------------------------------------------
/image/Weapons/the widsith.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/the widsith.png
--------------------------------------------------------------------------------
/image/Weapons/thrilling tales of dragon slayers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/thrilling tales of dragon slayers.png
--------------------------------------------------------------------------------
/image/Weapons/white iron greatsword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/white iron greatsword.png
--------------------------------------------------------------------------------
/image/Weapons/wolf's gravestone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/Weapons/wolf's gravestone.png
--------------------------------------------------------------------------------
/image/default-dp.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/default-dp.jpeg
--------------------------------------------------------------------------------
/image/fakeimage.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/fakeimage.jpeg
--------------------------------------------------------------------------------
/image/rainbow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/rainbow.jpg
--------------------------------------------------------------------------------
/image/rainbow2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/rainbow2.jpg
--------------------------------------------------------------------------------
/image/rainbow3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/rainbow3.jpg
--------------------------------------------------------------------------------
/image/rainbow4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/rainbow4.jpg
--------------------------------------------------------------------------------
/image/rainbow5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/rainbow5.jpg
--------------------------------------------------------------------------------
/image/rainbow6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/rainbow6.jpg
--------------------------------------------------------------------------------
/image/rainbow7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/rainbow7.jpg
--------------------------------------------------------------------------------
/image/slayer.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/slayer.jpeg
--------------------------------------------------------------------------------
/image/spongebob-burn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/spongebob-burn.png
--------------------------------------------------------------------------------
/image/template-backup.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/template-backup.jpg
--------------------------------------------------------------------------------
/image/template.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/template.jpg
--------------------------------------------------------------------------------
/image/thug-life.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/thug-life.png
--------------------------------------------------------------------------------
/image/to-be-continued.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/to-be-continued.png
--------------------------------------------------------------------------------
/image/wm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/image/wm.png
--------------------------------------------------------------------------------
/index.ts:
--------------------------------------------------------------------------------
1 | import { autoLogin, DB, isHasLoginData } from './src/login';
2 | /* eslint-disable @typescript-eslint/no-explicit-any */
3 | /* eslint-disable @typescript-eslint/no-namespace */
4 | import {
5 | MessageType,
6 | proto,
7 | WAChat,
8 | WAConnection,
9 | WAMessage,
10 | generateMessageID,
11 | WA_MESSAGE_STATUS_TYPE,
12 | BaileysError,
13 | WAMessageProto,
14 | } from '@adiwajshing/baileys';
15 | import axios from 'axios';
16 | import regexParser from 'regex-parser';
17 | import moment from 'moment';
18 | import { login, addLogin } from './src/login';
19 | import { getFileResponse, groupAcceptCode, waitMessageObj } from './types/index';
20 | import Handler from './src';
21 | import { EventEmitter2 } from 'eventemitter2';
22 | const cfonts = require('cfonts');
23 | const qrcode = require('qrcode');
24 | export const jadiBot = new EventEmitter2()
25 |
26 | cfonts.say('-----------------------------------------------------------------------', {font: 'console', gradient: ['green', '#f80']});
27 | cfonts.say('XYZ BOT', {
28 | font: 'block',
29 | background: 'transparent',
30 | gradient: ['green','#f80']
31 | })
32 | cfonts.say('-----------------------------------------------------------------------', {font: 'console', gradient: ['green', '#f80']});
33 | console.log('•', '[INFO]', 'BOT Started!');
34 | if(require('os').platform() === 'android'){
35 | console.error('Im really sorry you cannot run this on Android based')
36 | // eslint-disable-next-line no-process-exit
37 | process.exit(0)
38 | }
39 | export class Index extends WAConnection {
40 | public client = Main.prototype
41 | public clientEvent: EventEmitter2 = new EventEmitter2({maxListeners: 0});
42 | public waitmsg: Set = new Set();
43 | public _events: any;
44 | public DB!: DB
45 | public handle: any
46 |
47 | constructor() {
48 | super()
49 | // this.connectOptions = {
50 | // maxIdleTimeMs: 60_000,
51 | // maxRetries: 0,
52 | // phoneResponseTime: 15_000,
53 | // connectCooldownMs: 15_000
54 | // }
55 | }
56 | getFile = (url: string): Promise =>
57 | new Promise((resolve, reject) => {
58 | try {
59 | axios({
60 | method: 'get',
61 | url,
62 | headers: {
63 | DNT: 1,
64 | 'Upgrade-Insecure-Requests': 1,
65 | },
66 | responseType: 'arraybuffer',
67 | })
68 | .then(res => {
69 | return resolve({
70 | buffer: res.data,
71 | mimetype: res.headers['content-type'],
72 | });
73 | })
74 | .catch(err => reject(err));
75 | } catch (error) {
76 | return reject(error);
77 | }
78 | });
79 | /**
80 | * Send a message from a url to the given ID (can be group, single, or broadcast)
81 | * @param id the id to send to
82 | * @param url the url of the media
83 | * @param type type of message
84 | * @param options Extra options
85 | */
86 | async sendFileFromUrl(
87 | id: string,
88 | url: string,
89 | type: MessageType,
90 | options?: any
91 | ): Promise {
92 | return new Promise((resolve, reject) => {
93 | try {
94 | this.getFile(url)
95 | .then(async response => {
96 | options.mimetype = response.mimetype;
97 | const waMessage = await this.prepareMessage(
98 | id,
99 | response.buffer,
100 | type,
101 | options
102 | );
103 | await this.relayWAMessage(waMessage, {
104 | waitForAck: options.waitForAck !== false,
105 | });
106 | return resolve(waMessage);
107 | })
108 | .catch(err => {
109 | return reject(err);
110 | });
111 | } catch (error) {
112 | return reject(error);
113 | }
114 | });
115 | }
116 | /**
117 | * Add a contact from Jid
118 | * @param jid the id to send to
119 | */
120 | addContact(jid: string) {
121 | return this.contactAddOrGet(jid);
122 | }
123 | /**
124 | * Generate fakereply thumb from text
125 | * @param fakeText text for FakeReply overlay
126 | */
127 | generateFakeReply(fakeText: string) {
128 | return {
129 | key: {
130 | fromMe: this.DB.setting.fakeJid === this.user.jid,
131 | participant: this.DB.setting.fakeJid,
132 | remoteJid: 'status@broadcast',
133 | },
134 | message: {
135 | imageMessage: {
136 | url:
137 | 'https://mmg.whatsapp.net/d/f/AhRn5_nFM3RbHBizrcFUfmrN2laPWbHHj1PMeqOqwx8r.enc',
138 | mimetype: 'image/jpeg',
139 | caption: fakeText,
140 | fileSha256: 'GiXpQFb9qHneHjGQTFFbNeJMZ8U5zmPhAjKWTOx7jAI=',
141 | fileLength: 28742,
142 | height: 512,
143 | width: 512,
144 | mediaKey: 'UdWzxBmXlCBuHNImNXB2UFAw+GT04CzxbucCp/duiYg=',
145 | fileEncSha256: '5HnGj+12PjaglwnPV0f7wmBI8YPzIEM8pKzc48GzNCg=',
146 | directPath:
147 | '/v/t62.7118-24/17614527_2526091537698863_5247917891246363081_n.enc?oh=22f044b9bf4c2067c022f100ba4eb806&oe=606A7E38',
148 | jpegThumbnail: this.DB.fakeReplyBase64,
149 | scansSidecar:
150 | 'p7FGNd6R/E5fgL0NkS9aiOzy24PgFs+sIw5QWyRW5QavTBxv6rAzcg==',
151 | },
152 | status: WA_MESSAGE_STATUS_TYPE.PENDING,
153 | },
154 | } as any;
155 | }
156 | /**
157 | * Generate story obj from message Obj
158 | * @param status proto.IMessage Obj
159 | */
160 | generateStory(status: any) {
161 | return WAMessageProto.WebMessageInfo.fromObject({
162 | key: {
163 | remoteJid: 'status@broadcast',
164 | fromMe: true,
165 | participant: this.user.jid,
166 | id: generateMessageID(),
167 | },
168 | message: status,
169 | messageTimestamp: moment().unix(),
170 | status: WA_MESSAGE_STATUS_TYPE.ERROR,
171 | });
172 | }
173 | /**
174 | * Download a given WebMessageInfo Obj
175 | * @param message WAMessage Obj
176 | * @param quoted? WAMessage Quoted
177 | * @param path? Given path to save
178 | * @param ext? Auto detect ext
179 | */
180 | async downloadMessage(
181 | message: WAMessage,
182 | quoted?: any,
183 | path?: string,
184 | ext?: boolean
185 | ): Promise {
186 | try {
187 | if (!message) return new BaileysError('Please insert message', message);
188 | const target: any = quoted
189 | ? JSON.parse(JSON.stringify(message).replace('quotedM', 'm')).message
190 | .extendedTextMessage.contextInfo
191 | : message;
192 | if (path) {
193 | return this.downloadAndSaveMediaMessage(target, path, ext);
194 | }
195 | return this.downloadMediaMessage(target);
196 | } catch (error) {
197 | return new BaileysError(error, message);
198 | }
199 | }
200 | /**
201 | * Toggle a Ephemeral Bug
202 | * @param jid the id to send
203 | * @param ephemeralExpiration ephemeralExpiration
204 | * @param opts Extra options
205 | */
206 | async toggleEpBug(
207 | jid: string,
208 | ephemeralExpiration?: number,
209 | opts: {waitForAck: boolean} = {waitForAck: true}
210 | ) {
211 | const message = this.prepareMessageFromContent(
212 | jid,
213 | this.prepareDisappearingMessageSettingContent(ephemeralExpiration),
214 | {}
215 | );
216 | await this.relayWAMessage(message, opts);
217 | }
218 | /**
219 | * Join a group from given Whatsapp Group Code
220 | * @param code Whatsapp Group Code
221 | */
222 | async groupAcceptCode(code: string): Promise {
223 | code = code.replace('https://chat.whatsapp.com/', '');
224 | const json = ['action', 'invite', code];
225 | const response = await this.query({json});
226 | return response;
227 | }
228 | /**
229 | * Invite Info from Whatsapp Group Code
230 | * @param code Whatsapp Group Code
231 | */
232 | async groupInviteInfo(code: string): Promise {
233 | code = code.replace('https://chat.whatsapp.com/', '');
234 | const json = ['query', 'invite', code];
235 | const response = await this.query({json});
236 | return response;
237 | }
238 | /**
239 | * Gets all Group
240 | */
241 | async getAllGroups(): Promise> {
242 | return new Promise(resolve => {
243 | const chats = this.chats.all();
244 | return resolve(chats.filter(x => x.jid.includes('@g.us') && x.metadata));
245 | });
246 | }
247 | /**
248 | * Gets all private chat
249 | */
250 | async getAllPrivate(): Promise> {
251 | return new Promise(resolve => {
252 | const chats = this.chats.all();
253 | return resolve(chats.filter(x => !x.jid.includes('@g.us') && x.count));
254 | });
255 | }
256 | /**
257 | * Gets all chat
258 | */
259 | async getAllChats(): Promise> {
260 | return new Promise(resolve => {
261 | return resolve(this.chats.all());
262 | });
263 | }
264 | /**
265 | * Reply a message
266 | * @param jid the id to send to
267 | * @param text the text overlay
268 | * @param quoted the quoted message obj
269 | * @param options? Extra options
270 | * @param fakeText? fakereply overlay text
271 | */
272 | async reply(
273 | jid: string,
274 | text = '',
275 | quoted: any,
276 | options?: any,
277 | fakeText?: string
278 | ): Promise {
279 | return this.sendMessage(jid, text, MessageType.extendedText, {
280 | quoted: (this.DB.setting.fakeReply ? this.generateFakeReply(fakeText || this.DB.setting.fakeText) : quoted),
281 | ...options,
282 | });
283 | }
284 | /**
285 | * Forward a message
286 | * @param jid the id to send to
287 | * @param message the message obj
288 | * @param forceForward? force the forward
289 | * @param options? Extra options
290 | */
291 | async forward(jid: string, message: WAMessage, forceForward = false, options = {}) {
292 | const mtype = Object.keys(message.message!)[0]
293 | const content = this.generateForwardMessageContent(message, forceForward)
294 | const ctype = Object.keys(content)[0];
295 | const type: any = message.message ?? [mtype];
296 | const contents: any = content ?? [ctype];
297 | let context = {}
298 | if (mtype !== MessageType.text) context = type.contextInfo!
299 | contents.contextInfo = {
300 | ...context,
301 | ...contents.contextInfo
302 | }
303 | const waMessage = this.prepareMessageFromContent(jid, content, options)
304 | await this.relayWAMessage(waMessage)
305 | return waMessage
306 | }
307 | async fakeReply1(
308 | jid: string,
309 | text = '',
310 | fakeJid: string,
311 | fakeText = '',
312 | fakeGroupJid?: string
313 | ): Promise {
314 | return this.reply(jid, text, {
315 | key: {
316 | fromMe: fakeJid === this.user.jid,
317 | participant: fakeJid,
318 | ...(fakeGroupJid ? {remoteJid: fakeGroupJid} : {}),
319 | },
320 | message: {conversation: fakeText},
321 | });
322 | }
323 | async fakeReply(jid: string, text = '', contextInfo?: any) {
324 | return this.sendMessage(jid, text.toString(), MessageType.extendedText, {
325 | quoted: this.generateFakeReply(this.DB.setting.fakeText),
326 | contextInfo: contextInfo,
327 | });
328 | }
329 | /**
330 | * Wait a message with specific period
331 | * @param obj.sender the target jid
332 | * @param obj.callback enable callback every message from
333 | * @param obj.query the query
334 | * @param timeout timeout in ms
335 | */
336 | async waitMessage(
337 | obj: waitMessageObj,
338 | timeout: number,
339 | callback?: (res: {body: string; msg: WAMessage}) => void
340 | ): Promise {
341 | return new Promise((resolve, reject) => {
342 | let found = false;
343 | const time = setTimeout(() => {
344 | this.waitmsg.delete(obj.sender);
345 | this.clientEvent.removeAllListeners(obj.sender);
346 | if (!found) return reject(false);
347 | }, timeout);
348 | this.waitmsg.add(obj.sender);
349 | this.clientEvent.on(obj.sender, msg => {
350 | const type = Object.keys(msg.message)[0];
351 | const body =
352 | type === 'conversation'
353 | ? msg.message.conversation
354 | : type === 'imageMessage'
355 | ? msg.message.imageMessage.caption
356 | : type === 'videoMessage'
357 | ? msg.paramsmessage.videoMessage.caption
358 | : type === 'extendedTextMessage'
359 | ? msg.message.extendedTextMessage.text
360 | : '';
361 | if (obj.callback && callback) callback({body: body, msg: msg}) as void;
362 | switch (obj.type) {
363 | case 'text':
364 | if (body === obj.query.toString()) {
365 | found = true;
366 | this.waitmsg.delete(obj.sender);
367 | this.clientEvent.removeAllListeners(obj.sender);
368 | clearTimeout(time);
369 | return resolve(msg);
370 | }
371 | break;
372 | case 'regex': {
373 | const res = body.match(new RegExp(regexParser(obj.query)));
374 | if (res) {
375 | found = true;
376 | this.waitmsg.delete(obj.sender);
377 | this.clientEvent.removeAllListeners(obj.sender);
378 | clearTimeout(time);
379 | return resolve({body: res});
380 | }
381 | break;
382 | }
383 | case 'image':
384 | if (type === 'imageMessage') {
385 | found = true;
386 | this.waitmsg.delete(obj.sender);
387 | this.clientEvent.removeAllListeners(obj.sender);
388 | clearTimeout(time);
389 | return resolve(msg);
390 | }
391 | break;
392 | case 'video':
393 | if (type === 'videoMessage') {
394 | found = true;
395 | this.waitmsg.delete(obj.sender);
396 | this.clientEvent.removeAllListeners(obj.sender);
397 | clearTimeout(time);
398 | return resolve(msg);
399 | }
400 | break;
401 | default:
402 | found = false;
403 | this.waitmsg.delete(obj.sender);
404 | this.clientEvent.removeAllListeners(obj.sender);
405 | return reject(false);
406 | }
407 | });
408 | });
409 | }
410 | }
411 | export class Main extends Index {
412 | // private cmdList: Set = new Set()
413 | constructor(targetJid: string, jadibot?: any) {
414 | super()
415 | this.client = new Index()
416 | isHasLoginData(targetJid) && this.client.loadAuthInfo(login(targetJid))
417 | jadibot && (jadibot.type === 'qr') && this.client.on('qr', async qr => {
418 | jadiBot.emit('message', {
419 | type: 'image',
420 | from: jadibot.from,
421 | text: 'Scan QR ini untuk jadi bot sementara\n\n1. Klik titik tiga di pojok kanan atas\n2. Ketuk WhatsApp Web\n3. Scan QR ini',
422 | buffer: Buffer.from((await qrcode.toDataURL(qr, { scale: 8 })).split(',')[1], 'base64')
423 | })
424 | })
425 | this.client.connect().then(({user}) => {
426 | try {
427 | !isHasLoginData(user.jid) && addLogin(user.jid, this.client.base64EncodedAuthInfo())
428 | this.DB = new DB(user.jid)
429 | this.handle = new Handler(this.client, this.DB)
430 | this.client.DB = this.DB
431 | jadibot && jadiBot.emit('message', {
432 | type: 'text',
433 | from: jadibot.from,
434 | text: `Berhasil login!\n\nGunakan ${this.DB.setting.prefix}help untuk melihat menu`
435 | })
436 | } catch (error) {
437 | console.log(error);
438 | }
439 | });
440 | if (!Array.isArray(this.client._events['CB:action,add:relay,message'])) this.client._events['CB:action,add:relay,message'] = [this.client._events['CB:action,add:relay,message']]
441 | else this.client._events['CB:action,add:relay,message'] = [this.client._events['CB:action,add:relay,message'].pop()]
442 | this.client._events['CB:action,add:relay,message'].unshift(async (json: any) => {
443 | const m = json[2][0][2];
444 | if (
445 | m.message &&
446 | m.message.protocolMessage &&
447 | m.message.protocolMessage.type === 0
448 | ) {
449 | const key = m.message.protocolMessage.key;
450 | if (key.remoteJid === 'status@broadcast') return;
451 | if (!this.client.DB.setting.unSend.includes(key.remoteJid)) return;
452 | if (key.fromMe) return;
453 | const c = this.client.chats.get(key.remoteJid);
454 | const a = c.messages.dict[`${key.id}|${key.fromMe ? 1 : 0}`];
455 | const participant = key.fromMe
456 | ? this.client.user.jid
457 | : a.participant
458 | ? a.participant
459 | : key.remoteJid;
460 | const msg: any = a.constructor.fromObject(a.constructor.toObject(a))
461 | await this.client.reply(key.remoteJid,
462 | `*[UN-DELETE]*\n\nFrom: @${participant.split('@')[0]}\nTime: ${moment().format('llll')}`, msg, {
463 | contextInfo: {
464 | mentionedJid: [participant]
465 | }
466 | })
467 | this.client.forward(key.remoteJid, msg).catch(e => console.log(e, msg))
468 | }
469 | return;
470 | });
471 | this.client.on('CB:action,,call', async json => {
472 | const callerId = json[2][0][1].from;
473 | console.log(`[WARN] ${callerId.split('@')[0]} is calling!`);
474 | });
475 | this.client.on('chat-update', async chat => {
476 | if (!chat.hasNewMessage || typeof chat.messages === 'undefined') return;
477 | const msg = chat.messages.first;
478 | if (!msg.message) return;
479 | if (msg.key && msg.key.remoteJid === 'status@broadcast') return;
480 | const serial: string = msg.key.fromMe
481 | ? this.client.user.jid
482 | : msg.key.remoteJid?.endsWith('@g.us')
483 | ? msg.participant!
484 | : msg.key.remoteJid!;
485 | if (this.client.waitmsg.has(serial!)) this.client.clientEvent.emit(serial, msg);
486 | if (!msg.key.fromMe && (this.client.DB.setting.universalPublic || !this.DB.publicJid.has(serial))) return;
487 | return this.handle.handle(msg)
488 | });
489 | }
490 | }
491 | new Main('6281297980063@s.whatsapp.net')
492 | autoLogin && Array.from(autoLogin).map(x => {
493 | new Main(x)
494 | })
495 |
--------------------------------------------------------------------------------
/json/error.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/json/filters.json:
--------------------------------------------------------------------------------
1 | ["anjing","babi","bangsat","kunyuk","monyet","asu","kampank","dick","vagina","suck","bbw","boobs","latina","kadrun","penis","pennis","qntl","kampret","kontol","memek","jembut","ngentot","ngentod","ngewe","perek","pecun","bencong","banci","jablay","maho","gay","lesbi","bego","goblok","idiot","geblek","sinting","tolol","sarap","udik","jelek","setan","iblis","dajjal","brengsek","ngentod","sialan","heunceut","kanyut","kanjut","hencet","hnct","mmk","kntl","ngwe","fuck","hentai","bokep","payudara","tete","bh","toket","belahan","pentil","palkon","itil","sue","doujin","terangsang","sange","nhentai","xnxx","xxx","xvideos","nekopoi","porn","tuhan","dewa","yesus","krisna","allah","atheis","agama","buddha","biksu","ulama","ustadz","habib","nabi","rasul","god","theis","komunis","roh kudus","kitab","alquran","gblk","gblg","omanko","onichinchi","nyepong","coli","colmek","pki","ajg","bgst","kntl","mmk","pantek","panteq","bitch","shit","lonte","lotnet","gore","deepweb","darah","pornhub","xhamster","ussr","bugil","kenthu","kentu","telanjang","berak","mandi","mesum","ngeod","dicc","ng3u3","3u3","kmeme","kemem","hitler","ngeue","eue","ngaceng","nganu","ngentu","gancet","nsfw","kondom","croot","tahi","tinja","memec","jorok","mr.p","mrp","miss.v","missv","tocil","toge","oppai","yaoi","lesby","pantat"]
2 |
--------------------------------------------------------------------------------
/json/loginData.json:
--------------------------------------------------------------------------------
1 | {"autoLogin":[],"6281297980063@s.whatsapp.net":{"clientID":"x2PnM3+h93bE6I3CHOCYMg==","serverToken":"1@cpDZ9VClQuuKYa4N76bbYtjsmjWSosi+xImF5HokkvrILOan6EEXMsX04E5CXBkQeABpRQRuDUw4+Q==","clientToken":"fCBbLG54u7g+bAPebDjX1atdfqMtoF9bGkkyE96y0bA=","encKey":"cYOrxJPgsbkKHix3a3z3KpPPx7ZTEiicU5EbGgPjWzs=","macKey":"dLPEAzKVg6b45X2F1nS5E0YWQc1sp7p62SKzq9HKpfs="}}
--------------------------------------------------------------------------------
/json/lorem.txt:
--------------------------------------------------------------------------------
1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae elit a magna laoreet laoreet. Mauris sit amet lorem ac diam pretium lobortis. Aenean nulla leo, lobortis eget fermentum quis, dictum nec metus. Pellentesque a consequat erat, ac posuere odio. Cras mattis arcu eu sollicitudin sodales. Vestibulum rhoncus, nulla eget molestie tempor, mauris nisl dapibus leo, sit amet cursus ligula nisi nec tortor. Curabitur vitae sagittis lectus.
2 |
3 | Suspendisse in nisl sapien. Nam iaculis mi vel lacus pharetra tempus. Nullam congue eu tortor non congue. Phasellus molestie tempus felis aliquet hendrerit. Donec blandit eros metus, id interdum lorem fringilla non. Aenean hendrerit, tellus sed accumsan vulputate, erat erat euismod lectus, vitae dictum lacus nisi sit amet ex. Pellentesque placerat eget dolor vitae lobortis. Cras lectus diam, lobortis pharetra auctor sit amet, consectetur at risus.
4 |
5 | Cras eu lorem magna. Nam ac vestibulum lorem, et pretium arcu. Quisque convallis vestibulum justo, non molestie nisl scelerisque eu. Vestibulum ullamcorper pretium ornare. Fusce non pharetra magna. Maecenas id quam cursus, semper mauris in, accumsan mauris. Quisque nibh dui, auctor at arcu ut, commodo condimentum mauris. Vestibulum nibh sapien, maximus id aliquet in, tempor sed metus. Ut et molestie tellus. Proin sagittis dictum vestibulum. Integer sit amet turpis non velit mollis posuere non feugiat nulla. Nunc sed elit leo. Mauris auctor eu eros et consequat.
6 |
7 | Fusce commodo risus vitae tortor dignissim vulputate. Vestibulum a diam fringilla, tempor nisl id, sollicitudin enim. Donec condimentum mattis mauris sit amet efficitur. Ut nibh lacus, rutrum eu consectetur vitae, dictum vitae lacus. Aliquam ultrices lorem et lobortis pulvinar. Quisque eget dolor quis massa dignissim semper. Aliquam hendrerit urna sed ex ullamcorper, eu euismod diam maximus. Nullam molestie placerat mauris ut sodales. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc mi ante, tempor vel lectus eu, scelerisque tincidunt mauris. Duis commodo tortor sit amet augue commodo, varius finibus nibh tincidunt.
8 |
9 | Donec ipsum turpis, venenatis eu sollicitudin cursus, congue a purus. Fusce vitae nisi ipsum. Sed vitae fringilla dolor. Etiam suscipit velit sit amet ullamcorper ornare. Maecenas varius odio vitae suscipit dapibus. Sed vulputate eleifend tempus. Maecenas ac mi a ex consectetur condimentum. Proin tempor, lacus vel facilisis porta, eros risus semper augue, eu interdum lorem lectus vitae ipsum. In pellentesque tempus ex sit amet tristique.
--------------------------------------------------------------------------------
/json/raw/cloud.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/json/raw/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "apikeys": {
3 | "vthear": "bajulbedesganteng1701994nonstop",
4 | "cekresi": [
5 | "e84bd4628941e71d9074c3c233dc76cbcbdb8cceb9ae6aebbc1e163599af006f",
6 | "613365e93ec2e9891024176f1b7ee60d3714256b27b1c43dbc82518383323d3c",
7 | "4830e97d5f6e9122e71fde868b33ef79963203187ec608c2a1742517fa1a9424"
8 | ],
9 | "keepsaveit": [
10 | "IO5ldoA9fW7Wtv1gvY2pTKjATO2jyQwfn8EYhRt74JBCz8c2BW",
11 | "4oDiUTSEtPFUEkFkCsUkL6VOgkmULaInNGtox6O0BiFDbNg",
12 | "yCQ7tAap5DPglasdoYOcP6ZeeccI5TMx5tCok2yyHw1Xsr1guV"
13 | ],
14 | "bitly": "897931a5e3007cbb776210afcaef45f37e73cb53",
15 | "genius": "AKt8pOcmR7_52MxsSCKUEUabf9INI5rIBoSdrMbi2itDOZPt2xr3V35W858pinl4",
16 | "tech": "oymPi5-aDvvLO-bBVohC-nLtgbO-U6nWgX",
17 | "xyz": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Iml0em5nZ2EiLCJpYXQiOjE2MTc0OTA2NzgsImV4cCI6MTYyMDEyMDQ3OH0.oKt9tVjizdEyBK2jpKadqZWSF2V09I8wGnIrDk0bPro"
18 | },
19 | "rest-ip": {
20 | "xyz": "https://localhost/api/",
21 | "vhtear": "https://api.vhtear.com/",
22 | "tech": "https://api.i-tech.id/"
23 | },
24 | "vcard": {
25 | "cs": {
26 | "displayName": "XyZ Costumer Service",
27 | "vcard": "BEGIN:VCARD\nVERSION:3.0\nN:;XyZ Costumer Service;;;\nFN:XyZ Costumer Service\nitem1.TEL;waid=628568970792:+62 856-8970-792\nitem1.X-ABLabel:Ponsel\nX-WA-BIZ-DESCRIPTION:Layanan user XyZ BOT\nX-WA-BIZ-NAME:XyZ Costumer Service\nEND:VCARD"
28 | },
29 | "owner": {
30 | "displayName": "ItzNgga",
31 | "vcard": "BEGIN:VCARD\nVERSION:3.0\nN:H;ItzNgga;;;\nFN:ItzNgga\nitem1.TEL;waid=6281297980063:+62 812-9798-0063\nitem1.X-ABLabel:Ponsel\nitem2.EMAIL;type=INTERNET:rangganak094@gmail.com\nitem2.X-ABLabel:null\nEND:VCARD"
32 | }
33 | },
34 | "secret": "e9b6c679110e1a7b147041f74d2f8d84f5737d49",
35 | "ytCookie": "CONSENT=YES+ID.id+20160815-07-0; VISITOR_INFO1_LIVE=t1yYbMt8q9s; PREF=al=id; SID=3gfN_BjHoYL_pVI2CcHJUjYrF8IFbKsgsQiIavw_4R6s_iKOakX_Y-0jobvgMtCN9IBfuw.; __Secure-3PSID=3gfN_BjHoYL_pVI2CcHJUjYrF8IFbKsgsQiIavw_4R6s_iKOgT_wyufLYZZ8wdUDgwfyUg.; HSID=Am1IhSFJ3gXkvQrin; SSID=ApyxE9il-YU3SMoI_; APISID=tGzcj0BrrA6wnBcf/ATCE1aiHsDnTIdKb7; SAPISID=kwRMLvn9GlDZq_iM/AlnK_76UaTJqXzsZl; __Secure-3PAPISID=kwRMLvn9GlDZq_iM/AlnK_76UaTJqXzsZl; YSC=mSRhzosXYEk; LOGIN_INFO=AFmmF2swRAIgCnzME9fG22xlfe5Icee4bYn_0g1ly1BGFZDKT4NWPEkCICgI1xsEDLm963mXGRAD6FRxJhrFkGrgD5nPZkmhZJ2p:QUQ3MjNmejhoa2dpZndVTUc0ZktSUFNaeXpLX1BrNzFBMGtFekxqXzA4Y0h6VXJpWktKUjZROHA2S2NyUXFUdVFDZ0hmNTNlOXFoMGhoQjgxU2RQNkN2LWZqc0tPY0tvZTBiWDZsbFAxcjNoVjNqdkVweGwxUjRUS2tPMGo4SEwtZUpwLXhrcWd0YV85T3dhcFdCUGZuQjJCVEd3NnFUTWFzSV9idC04cWhvLWpmWkkwWDF2anFmZWc2ZlNvMjJJTkI4ZmFVUmh5RFN6; SIDCC=AJi4QfHvpYFQJkBTxFQjQqyLmaeg7PyCrRptLa02mmTNGWhMnfIf5TRZCOvsdwMmmoyQTaQccQ; __Secure-3PSIDCC=AJi4QfEog4hv0ikzZEbbrikkkkl9BliDU8szIQ8cZ7AJyRwSR01lvSN3dqfpg3vnkBQkUhyz2Q",
36 | "scdl": "38kZjAWhqvwrcMFKFo3496SY4OsSovTU",
37 | "ytIdentity": "QUFFLUhqbTdFR3A3aEIwUVlGUkFrd2k1MjlsaUFrVkpVQXw",
38 | "igCookie": "ig_did=BB01A774-7231-4721-87C4-5CBFAD80CCF3; mid=X3hMCwALAAGse8HQ2FDKtXFrjmGq; ig_nrcb=1; fbm_124024574287414=base_domain=.instagram.com; shbid=14122; shbts=1614939844.6190386; rur=PRN; ig_lang=id; csrftoken=Iy4fzIq91R15dxDbe7dln94tQSd32uEM; ds_user_id=46233450911; sessionid=46233450911:B9xoPbEjkovfpt:21; fbsr_124024574287414=g1kmxng_AFk22dMl_9LVgW-04od2ZfGxje1pX4WHV7g.eyJ1c2VyX2lkIjoiMTAwMDA5OTA3MTg0NTU2IiwiY29kZSI6IkFRQ29qRGs4bHFvWnpkT3NJTnZaVk5UVFhWc2FmWGVWdDJDa3E3dU92N2dodGRoU29qU1lBSVl4cUdobVZncXhQeHVBWFFobmhrQmxNWFdmS21lLTROVC01eFFiSVlpazBJOG5LUzRQTUZvRWVacDNkVlJsdjVnRmdkczhsX2NvTVhDZ0NGd19yeTRuM1prRVVWeG04Snh4TkEzUnFhakpHbi1oMDhOWTExZldPWFEzelg3WkhzdTUxQ05ROHBmNjVRZ2txVmp2UEVzbDRBWENIRzdSc2xERDVzSm1GNmttbXFNcnZBc2NuV2c0dWpKWERIZGxBeE4yUGVDdUNsbWc4TGlxUTRsa1NRcEpKRngxZGI2VHIzc3VvQi1aZHAxaXliOThrRTFSSVpLZlBPc1FneGo1aktfcHhwMFE1R1I2dlVleHdpcklGMjBsbjVudTA4eU1HWGVLIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCQUh4SGZLNGxKZGZNWkJGYkNaQm1PYTBvOGJqdkVDTUNnWkMzVG9hQ3daQnN1RTZRdDVCaGNXM3J6RWFNV0VMRlYxVTR2cENWbWpzRExjaFZlVTlKaEdaQ1RrWVpCSWhaQTk1MkQ1d1RMTXNMNXQ2ZmRYelpBVXBaQjlpS2ZnSFhRUTJGN2ZHWkN2dE9ueWJWUjVYWGVoM0ZkcGtIMXdTdmc3cUJXdGk0dERhSnZoN0YwQnNtZVF0UFFaRCIsImFsZ29yaXRobSI6IkhNQUMtU0hBMjU2IiwiaXNzdWVkX2F0IjoxNjE0OTQ4ODk2fQ"
39 | }
40 |
--------------------------------------------------------------------------------
/json/raw/count.json:
--------------------------------------------------------------------------------
1 | {
2 | "help": {
3 | "count": 0,
4 | "type": "member"
5 | },
6 | "kapan": {
7 | "count": 0,
8 | "type": "member"
9 | },
10 | "siapa": {
11 | "count": 0,
12 | "type": "member"
13 | },
14 | "apakah": {
15 | "count": 0,
16 | "type": "member"
17 | },
18 | "cmd": {
19 | "count": 0,
20 | "type": "member"
21 | },
22 | "custom cmd": {
23 | "count": 0,
24 | "type": "admin"
25 | },
26 | "mute": {
27 | "count": 0,
28 | "type": "member"
29 | },
30 | "unmute": {
31 | "count": 0,
32 | "type": "member"
33 | },
34 | "bug": {
35 | "count": 0,
36 | "type": "member"
37 | },
38 | "feature": {
39 | "count": 0,
40 | "type": "member"
41 | },
42 | "sticker": {
43 | "count": 0,
44 | "type": "member"
45 | },
46 | "ytmp4": {
47 | "count": 0,
48 | "type": "member"
49 | },
50 | "donasi": {
51 | "count": 0,
52 | "type": "member"
53 | },
54 | "bahasa": {
55 | "count": 0,
56 | "type": "member"
57 | },
58 | "list": {
59 | "count": 0,
60 | "type": "member"
61 | },
62 | "meme": {
63 | "count": 0,
64 | "type": "member"
65 | },
66 | "me": {
67 | "count": 0,
68 | "type": "member"
69 | },
70 | "food": {
71 | "count": 0,
72 | "type": "member"
73 | },
74 | "join": {
75 | "count": 0,
76 | "type": "member"
77 | },
78 | "bacot": {
79 | "count": 0,
80 | "type": "member"
81 | },
82 | "delete": {
83 | "count": 0,
84 | "type": "member"
85 | },
86 | "nulis": {
87 | "count": 0,
88 | "type": "member"
89 | },
90 | "ocr": {
91 | "count": 0,
92 | "type": "member"
93 | },
94 | "translate": {
95 | "count": 0,
96 | "type": "member"
97 | },
98 | "qnime": {
99 | "count": 0,
100 | "type": "member"
101 | },
102 | "speed": {
103 | "count": 0,
104 | "type": "member"
105 | },
106 | "qrcode": {
107 | "count": 0,
108 | "type": "member"
109 | },
110 | "igstalk": {
111 | "count": 0,
112 | "type": "member"
113 | },
114 | "add": {
115 | "count": 0,
116 | "type": "member"
117 | },
118 | "kick": {
119 | "count": 0,
120 | "type": "member"
121 | },
122 | "glist": {
123 | "count": 0,
124 | "type": "admin"
125 | },
126 | "yts": {
127 | "count": 0,
128 | "type": "member"
129 | },
130 | "exec": {
131 | "count": 0,
132 | "type": "admin"
133 | },
134 | "lirik": {
135 | "count": 0,
136 | "type": "member"
137 | },
138 | "ban": {
139 | "count": 0,
140 | "type": "admin"
141 | },
142 | "unban": {
143 | "count": 0,
144 | "type": "admin"
145 | },
146 | "gtts": {
147 | "count": 0,
148 | "type": "member"
149 | },
150 | "lang": {
151 | "count": 0,
152 | "type": "member"
153 | },
154 | "cmdlist": {
155 | "count": 0,
156 | "type": "member"
157 | },
158 | "retry": {
159 | "count": 0,
160 | "type": "member"
161 | },
162 | "delcmd": {
163 | "count": 0,
164 | "type": "member"
165 | },
166 | "wikipedia": {
167 | "count": 0,
168 | "type": "member"
169 | },
170 | "cekresi": {
171 | "count": 0,
172 | "type": "member"
173 | },
174 | "quran": {
175 | "count": 0,
176 | "type": "member"
177 | },
178 | "surah": {
179 | "count": 0,
180 | "type": "member"
181 | },
182 | "bmkg": {
183 | "count": 0,
184 | "type": "member"
185 | },
186 | "brainly": {
187 | "count": 0,
188 | "type": "member"
189 | },
190 | "google": {
191 | "count": 0,
192 | "type": "member"
193 | },
194 | "cuaca": {
195 | "count": 0,
196 | "type": "member"
197 | },
198 | "ttp": {
199 | "count": 0,
200 | "type": "member"
201 | },
202 | "ttd": {
203 | "count": 0,
204 | "type": "member"
205 | },
206 | "attp": {
207 | "count": 0,
208 | "type": "member"
209 | },
210 | "kbbi": {
211 | "count": 0,
212 | "type": "member"
213 | },
214 | "everyone": {
215 | "count": 0,
216 | "type": "member"
217 | },
218 | "status": {
219 | "count": 0,
220 | "type": "member"
221 | },
222 | "bc": {
223 | "count": 0,
224 | "type": "admin"
225 | },
226 | "leave": {
227 | "count": 0,
228 | "type": "member"
229 | },
230 | "bitly": {
231 | "count": 0,
232 | "type": "member"
233 | },
234 | "bot": {
235 | "count": 0,
236 | "type": "admin"
237 | },
238 | "chat": {
239 | "count": 0,
240 | "type": "member"
241 | },
242 | "creator": {
243 | "count": 0,
244 | "type": "member"
245 | },
246 | "ig": {
247 | "count": 0,
248 | "type": "member"
249 | },
250 | "twitter": {
251 | "count": 0,
252 | "type": "member"
253 | },
254 | "fb": {
255 | "count": 0,
256 | "type": "member"
257 | },
258 | "ytmp3": {
259 | "count": 0,
260 | "type": "member"
261 | },
262 | "imp3": {
263 | "count": 0,
264 | "type": "member"
265 | },
266 | "yt": {
267 | "count": 0,
268 | "type": "member"
269 | },
270 | "extract": {
271 | "count": 0,
272 | "type": "member"
273 | },
274 | "likee": {
275 | "count": 0,
276 | "type": "member"
277 | },
278 | "news": {
279 | "count": 0,
280 | "type": "member"
281 | },
282 | "kucing": {
283 | "count": 0,
284 | "type": "member"
285 | },
286 | "wallpaper": {
287 | "count": 0,
288 | "type": "member"
289 | },
290 | "corona": {
291 | "count": 0,
292 | "type": "member"
293 | },
294 | "quoteit": {
295 | "count": 0,
296 | "type": "member"
297 | },
298 | "quote": {
299 | "count": 0,
300 | "type": "member"
301 | },
302 | "compress": {
303 | "count": 0,
304 | "type": "member"
305 | },
306 | "wait": {
307 | "count": 0,
308 | "type": "member"
309 | },
310 | "anime": {
311 | "count": 0,
312 | "type": "member"
313 | },
314 | "simsimi": {
315 | "count": 0,
316 | "type": "member"
317 | },
318 | "salam": {
319 | "count": 0,
320 | "type": "admin"
321 | },
322 | "alquran": {
323 | "count": 0,
324 | "type": "member"
325 | },
326 | "resep": {
327 | "count": 0,
328 | "type": "member"
329 | },
330 | "tiktok": {
331 | "count": 0,
332 | "type": "member"
333 | },
334 | "quality": {
335 | "count": 0,
336 | "type": "member"
337 | },
338 | "mimic": {
339 | "count": 0,
340 | "type": "member"
341 | },
342 | "arch": {
343 | "count": 0,
344 | "type": "member"
345 | },
346 | "countpremi": {
347 | "count": 0,
348 | "type": "admin"
349 | },
350 | "feedback": {
351 | "count": 0,
352 | "type": "member"
353 | },
354 | "image": {
355 | "count": 0,
356 | "type": "member"
357 | },
358 | "ping": {
359 | "count": 0,
360 | "type": "member"
361 | },
362 | "cek": {
363 | "count": 0,
364 | "type": "member"
365 | },
366 | "refrence": {
367 | "count": 0,
368 | "type": "member"
369 | },
370 | "harta": {
371 | "count": 0,
372 | "type": "member"
373 | },
374 | "tahta": {
375 | "count": 0,
376 | "type": "member"
377 | },
378 | "cloud": {
379 | "count": 0,
380 | "type": "member"
381 | },
382 | "menu": {
383 | "count": 0,
384 | "type": "member"
385 | },
386 | "toimg": {
387 | "count": 0,
388 | "type": "member"
389 | },
390 | "inspect": {
391 | "count": 0,
392 | "type": "member"
393 | },
394 | "stiker": {
395 | "count": 0,
396 | "type": "member"
397 | },
398 | "suggest": {
399 | "count": 0,
400 | "type": "admin"
401 | },
402 | "changelog": {
403 | "count": 0,
404 | "type": "member"
405 | },
406 | "like": {
407 | "count": 0,
408 | "type": "member"
409 | },
410 | "owner": {
411 | "count": 0,
412 | "type": "member"
413 | },
414 | "tulis": {
415 | "count": 0,
416 | "type": "member"
417 | },
418 | "quotes": {
419 | "count": 0,
420 | "type": "member"
421 | },
422 | "twt": {
423 | "count": 0,
424 | "type": "member"
425 | },
426 | "triggered": {
427 | "count": 0,
428 | "type": "member"
429 | },
430 | "ss": {
431 | "count": 0,
432 | "type": "member"
433 | },
434 | "mine": {
435 | "count": 0,
436 | "type": "member"
437 | },
438 | "deepfry": {
439 | "count": 0,
440 | "type": "member"
441 | },
442 | "memegen": {
443 | "count": 0,
444 | "type": "member"
445 | },
446 | "thuglife": {
447 | "count": 0,
448 | "type": "member"
449 | },
450 | "burn": {
451 | "count": 0,
452 | "type": "member"
453 | },
454 | "tobe": {
455 | "count": 0,
456 | "type": "member"
457 | },
458 | "memegen2": {
459 | "count": 0,
460 | "type": "member"
461 | },
462 | "filter": {
463 | "count": 0,
464 | "type": "admin"
465 | },
466 | "count": {
467 | "count": 10,
468 | "type": "admin"
469 | },
470 | "gameLimit": {
471 | "count": 0,
472 | "type": "member"
473 | },
474 | "math": {
475 | "count": 0,
476 | "type": "member"
477 | },
478 | "chop": {
479 | "count": 0,
480 | "type": "member"
481 | },
482 | "dungeon": {
483 | "count": 0,
484 | "type": "member"
485 | },
486 | "dig": {
487 | "count": 0,
488 | "type": "member"
489 | },
490 | "fight": {
491 | "count": 0,
492 | "type": "member"
493 | },
494 | "hunt": {
495 | "count": 0,
496 | "type": "member"
497 | },
498 | "thief": {
499 | "count": 0,
500 | "type": "member"
501 | },
502 | "trade": {
503 | "count": 0,
504 | "type": "member"
505 | },
506 | "sholat": {
507 | "count": 0,
508 | "type": "member"
509 | },
510 | "wasted": {
511 | "count": 0,
512 | "type": "member"
513 | },
514 | "sha1": {
515 | "count": 0,
516 | "type": "member"
517 | },
518 | "wanted": {
519 | "count": 0,
520 | "type": "member"
521 | },
522 | "music": {
523 | "count": 0,
524 | "type": "member"
525 | },
526 | "rainbow": {
527 | "count": 0,
528 | "type": "member"
529 | },
530 | "getpic": {
531 | "count": 0,
532 | "type": "member"
533 | },
534 | "fuse": {
535 | "count": 0,
536 | "type": "member"
537 | },
538 | "fp": {
539 | "count": 0,
540 | "type": "member"
541 | },
542 | "md5": {
543 | "count": 0,
544 | "type": "member"
545 | },
546 | "gplay": {
547 | "count": 0,
548 | "type": "member"
549 | },
550 | "debug": {
551 | "count": 0,
552 | "type": "member"
553 | },
554 | "sha256": {
555 | "count": 0,
556 | "type": "member"
557 | },
558 | "imdb": {
559 | "count": 0,
560 | "type": "member"
561 | },
562 | "log": {
563 | "count": 0,
564 | "type": "admin"
565 | },
566 | "imdbs": {
567 | "count": 0,
568 | "type": "member"
569 | },
570 | "accept": {
571 | "count": 0,
572 | "type": "member"
573 | },
574 | "reply": {
575 | "count": 0,
576 | "type": "member"
577 | },
578 | "reverse": {
579 | "count": 0,
580 | "type": "member"
581 | },
582 | "sha3": {
583 | "count": 0,
584 | "type": "member"
585 | },
586 | "a-harta": {
587 | "count": 0,
588 | "type": "member"
589 | },
590 | "fire": {
591 | "count": 0,
592 | "type": "member"
593 | },
594 | "sha512": {
595 | "count": 0,
596 | "type": "member"
597 | },
598 | "mock": {
599 | "count": 0,
600 | "type": "member"
601 | },
602 | "youtube": {
603 | "count": 0,
604 | "type": "member"
605 | },
606 | "unsend": {
607 | "count": 0,
608 | "type": "member"
609 | },
610 | "getobj": {
611 | "count": 0,
612 | "type": "member"
613 | },
614 | "autoread": {
615 | "count": 0,
616 | "type": "member"
617 | },
618 | "hidetag": {
619 | "count": 0,
620 | "type": "member"
621 | },
622 | "waitfor": {
623 | "count": 0,
624 | "type": "member"
625 | },
626 | "distord": {
627 | "count": 0,
628 | "type": "member"
629 | },
630 | "destroy": {
631 | "count": 0,
632 | "type": "member"
633 | },
634 | "bass": {
635 | "count": 0,
636 | "type": "member"
637 | },
638 | "temp": {
639 | "count": 0,
640 | "type": "member"
641 | },
642 | "fitnah": {
643 | "count": 0,
644 | "type": "member"
645 | },
646 | "decrypt": {
647 | "count": 0,
648 | "type": "member"
649 | },
650 | "ytsearch": {
651 | "count": 0,
652 | "type": "member"
653 | },
654 | "quiz": {
655 | "count": 0,
656 | "type": "member"
657 | },
658 | "textpro": {
659 | "count": 0,
660 | "type": "member"
661 | },
662 | "photofunia": {
663 | "count": 0,
664 | "type": "member"
665 | },
666 | "facebook": {
667 | "count": 0,
668 | "type": "member"
669 | },
670 | "instagram": {
671 | "count": 0,
672 | "type": "member"
673 | },
674 | "copet": {
675 | "count": 0,
676 | "type": "member"
677 | },
678 | "group": {
679 | "count": 0,
680 | "type": "member"
681 | },
682 | "invite": {
683 | "count": 0,
684 | "type": "member"
685 | },
686 | "onlyadmin": {
687 | "count": 0,
688 | "type": "member"
689 | },
690 | "subject": {
691 | "count": 0,
692 | "type": "member"
693 | },
694 | "cak": {
695 | "count": 0,
696 | "type": "member"
697 | },
698 | "fakereply": {
699 | "count": 0,
700 | "type": "member"
701 | },
702 | "admin": {
703 | "count": 0,
704 | "type": "member"
705 | },
706 | "unadmin": {
707 | "count": 0,
708 | "type": "member"
709 | },
710 | "slots": {
711 | "count": 0,
712 | "type": "member"
713 | },
714 | "tictactoe": {
715 | "count": 0,
716 | "type": "member"
717 | },
718 | "caklontong": {
719 | "count": 0,
720 | "type": "member"
721 | },
722 | "detect": {
723 | "count": 0,
724 | "type": "member"
725 | },
726 | "8d": {
727 | "count": 0,
728 | "type": "member"
729 | },
730 | "eval": {
731 | "count": 0,
732 | "type": "member"
733 | },
734 | "fisheye": {
735 | "count": 0,
736 | "type": "member"
737 | },
738 | "prefix": {
739 | "count": 0,
740 | "type": "member"
741 | },
742 | "online": {
743 | "count": 0,
744 | "type": "member"
745 | },
746 | "captha": {
747 | "count": 0,
748 | "type": "member"
749 | },
750 | "upstory": {
751 | "count": 0,
752 | "type": "member"
753 | },
754 | "ss2": {
755 | "count": 0,
756 | "type": "member"
757 | },
758 | "upstatus": {
759 | "count": 0,
760 | "type": "member"
761 | },
762 | "public": {
763 | "count": 0,
764 | "type": "member"
765 | },
766 | "slist": {
767 | "count": 0,
768 | "type": "member"
769 | },
770 | "s": {
771 | "count": 0,
772 | "type": "member"
773 | },
774 | "sinfo": {
775 | "count": 0,
776 | "type": "member"
777 | },
778 | "supdate": {
779 | "count": 0,
780 | "type": "member"
781 | },
782 | "ssave": {
783 | "count": 0,
784 | "type": "member"
785 | },
786 | "info": {
787 | "count": 0,
788 | "type": "member"
789 | },
790 | "antivirtex": {
791 | "count": 0,
792 | "type": "member"
793 | },
794 | "profile": {
795 | "count": 0,
796 | "type": "member"
797 | }
798 | }
799 |
--------------------------------------------------------------------------------
/json/raw/genshin.json:
--------------------------------------------------------------------------------
1 | {
2 | "standart": {
3 | "fiveStarChar" : ["Jean","QiQi","Keqing","Mona","Diluc"],
4 | "fiveStarWeap" : ["Amos' Bow","Skyward Harp","Lost Prayer to the Sacred Winds","Skyward Atlas", "Wolf's Gravestone","Skyward Pride", "Primordial Jade Winged-Spear",
5 | "Skyward Spine", "Aquila Favonia","Skyward Blade"],
6 | "fourStarChar" : ["Sucrose","Chongyun","Kaeya","Fischl","Beidou","Razor","Lisa",
7 | "Noelle","Ningguang","Xingqiu","Barbara","Bennett","Xiangling","Amber","Diona","Xinyan"],
8 | "fourStarWeap" : ["Rust","Sacrificial Bow","The Stringless","Favonius Warbow", "Eye of Perception","Favonius Codex","Sacrificial Fragments","The Widsith",
9 | "Rainslasher","Sacrifical Greatsword","The Bell","Favonius Greatsword",
10 | "Favonius Lance","Dragon's Bane","Lion's Roar","Sacrificial Sword","The Flute",
11 | "Favonius Sword"],
12 | "threeStarWeap" : ["Slingshot","Raven Bow","Sharpshooter's Oath","Emerald Orb",
13 | "Thrilling Tales of Dragon Slayers","Magic Guide","Debate Club",
14 | "Bloodtainted Greatsword","Ferrous Shadow","Black Tassel","Skyrider Sword",
15 | "Harbinger of Dawn","Cool Steel"]
16 | },
17 | "character": {
18 | "rateUp5": "Albedo",
19 | "rateUp4": ["Fischl","Bennett","Sucrose"],
20 | "fiveStarChar": ["Albedo","Jean","QiQi","Keqing","Mona","Diluc"],
21 | "fourStarChar": ["Chongyun","Beidou",
22 | "Noelle","Ningguang","Xingqiu","Xiangling","Diona","Xinyan"],
23 | "fourStarWeap": ["Rust","Sacrificial Bow","The Stringless","Favonius Warbow","Eye of Perception","Favonius Codex","Sacrificial Fragments","The Widsith",
24 | "Rainslasher","Sacrifical Greatsword","The Bell","Favonius Greatsword",
25 | "Favonius Lance","Dragon's Bane","Lion's Roar","Sacrificial Sword","The Flute",
26 | "Favonius Sword"],
27 | "threeStarWeap": ["Slingshot","Raven Bow","Sharpshooter's Oath","Emerald Orb",
28 | "Thrilling Tales of Dragon Slayers","Magic Guide","Debate Club",
29 | "Bloodtainted Greatsword","Ferrous Shadow","Black Tassel","Skyrider Sword",
30 | "Harbinger of Dawn","Cool Steel"]
31 | },
32 | "weapon": {
33 | "rateUp5" : ["Summit Shaper","Skyward Atlas"],
34 | "rateUp4" : ["The Stringless","Sacrificial Fragments","Favonius Greatsword","Favonius Sword","Favonius Lance"],
35 | "fiveStarWeap" : ["Amos' Bow","Skyward Harp","Lost Prayer to the Sacred Winds",
36 | "Wolf's Gravestone","Skyward Pride", "Primordial Jade Winged-Spear",
37 | "Skyward Spine", "Aquila Favonia","Skyward Blade"],
38 | "fourStarChar" : ["Sucrose","Chongyun","Kaeya","Fischl","Beidou","Razor","Lisa",
39 | "Noelle","Ningguang","Xingqiu","Barbara","Bennett","Xiangling","Amber","Diona","Xinyan"],
40 | "fourStarWeap" : ["Rust","Sacrificial Bow","Favonius Warbow","Eye of Perception","Favonius Codex","The Widsith",
41 | "Rainslasher","Sacrifical Greatsword","The Bell","Dragon's Bane","Lion's Roar","Sacrificial Sword","The Flute"] ,
42 | "threeStarWeap" : ["Slingshot","Raven Bow","Sharpshooter's Oath","Emerald Orb",
43 | "Thrilling Tales of Dragon Slayers","Magic Guide","Debate Club",
44 | "Bloodtainted Greatsword","Ferrous Shadow","Black Tassel","Skyrider Sword",
45 | "Harbinger of Dawn","Cool Steel"]
46 | }
47 | }
--------------------------------------------------------------------------------
/json/raw/public.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/json/raw/reply.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/json/raw/setting.json:
--------------------------------------------------------------------------------
1 | {
2 | "sAdmin": "6281297980063@s.whatsapp.net",
3 | "costumerId": "628568970792@s.whatsapp.net",
4 | "restartState": false,
5 | "restartId": "undefined",
6 | "prefix": "/",
7 | "unSend": [],
8 | "autoRead": false,
9 | "autoReply": false,
10 | "pm2Id": "SELF",
11 | "fakeReply": false,
12 | "fakeText": "_*「 XyZ BOT 」*_\n_made by @itzngga_",
13 | "fakeJid": "0@s.whatsapp.net",
14 | "antiVirtex": false,
15 | "universalPublic": false,
16 | "absen": "",
17 | "voiceCmd": false,
18 | "mention": false,
19 | "mentionMsg": "",
20 | "antiTroli": false
21 | }
22 |
--------------------------------------------------------------------------------
/json/raw/sticker.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/json/surah.txt:
--------------------------------------------------------------------------------
1 | *Daftar Nomor Surah*
2 | 1. Al-Fatihah الفاتحة
3 | 2. Al-Baqarah البقرة
4 | 3. Ali ‘Imran آل عمران
5 | 4. An-Nisa’ النّساء
6 | 5. Al-Ma’idah المآئدة
7 | 6. Al-An’am الانعام
8 | 7. Al-A’raf الأعراف
9 | 8. Al-Anfal الأنفال
10 | 9. At-Taubah التوبة
11 | 10. Yunus ينوس
12 | 11. Hud هود
13 | 12. Yusuf يسوف
14 | 13. Ar-Ra’d الرّعد
15 | 14. Ibrahim إبراهيم
16 | 15. Al-Hijr الحجر
17 | 16. An-Nahl النّحل
18 | 17. Al-Isra’ بني إسرائيل
19 | 18. Al-Kahf الكهف
20 | 19. Maryam مريم
21 | 20. Ta Ha طه
22 | 21. Al-Anbiya الأنبياء
23 | 22. Al-Hajj الحجّ
24 | 23. Al-Mu’minun المؤمنون
25 | 24. An-Nur النّور
26 | 25. Al-Furqan الفرقان
27 | 26. Asy-Syu’ara’ الشّعراء
28 | 27. An-Naml النّمل
29 | 28. Al-Qasas القصص
30 | 29. Al-‘Ankabut العنكبوت
31 | 30. Ar-Rum الرّوم
32 | 31. Luqman لقمان
33 | 32. As-Sajdah السّجدة
34 | 33. Al-Ahzab الْأحزاب
35 | 34. Saba’ سبا
36 | 35. Fatir فاطر
37 | 36. Ya Sin يس
38 | 37. As-Saffat الصّافات
39 | 38. Sad ص
40 | 39. Az-Zumar الزّمر
41 | 40. Al-Mu’min المؤمن
42 | 41. Fussilat فصّلت
43 | 42. Asy-Syura الشّورى
44 | 43. Az-Zukhruf الزّخرف
45 | 44. Ad-Dukhan الدّخان
46 | 45. Al-Jasiyah الجاثية
47 | 46. Al-Ahqaf الَأحقاف
48 | 47. Muhammad محمّد
49 | 48. Al-Fath الفتح
50 | 49. Al-Hujurat الحجرات
51 | 50. Qaf ق
52 | 51. Az-Zariyat الذّاريات
53 | 52. At-Tur الطّور
54 | 53. An-Najm النّجْم
55 | 54. Al-Qamar القمر
56 | 55. Ar-Rahman الرّحْمن
57 | 56. Al-Waqi’ah الواقعه
58 | 57. Al-Hadid الحديد
59 | 58. Al-Mujadilah المجادلة
60 | 59. Al-Hasyr الحشْر
61 | 60. Al-Mumtahanah الممتحنة
62 | 61. As-Saff الصّفّ
63 | 62. Al-Jumu’ah الجمعة
64 | 63. Al-Munafiqun المنافقون
65 | 64. At-Tagabun التّغابن
66 | 65. At-Talaq الطّلاق
67 | 66. At-Tahrim التّحريم
68 | 67. Al-Mulk الملك
69 | 68. Al-Qalam القلم
70 | 69. Al-Haqqah الحآقّة
71 | 70. Al-Ma’arij المعارج
72 | 71. Nuh نوح
73 | 72. Al-Jinn الجنّ
74 | 73. Al-Muzzammil المزمّل
75 | 74. Al-Muddassir المدشّر
76 | 75. Al-Qiyamah القيمة
77 | 76. Al-Insan الْاٍنسان
78 | 77. Al-Mursalat المرسلات
79 | 78. An-Naba’ النّبا
80 | 79. An-Nazi’at النّازعات
81 | 80. ‘Abasa عبس
82 | 81. At-Takwir التّكوير
83 | 82. Al-Infitar الانفطار
84 | 83. Al-Tatfif المطفّفين
85 | 84. Al-Insyiqaq الانشقاق
86 | 85. Al-Buruj البروج
87 | 86. At-Tariq الطّارق
88 | 87. Al-A’la الْأعلى
89 | 88. Al-Gasyiyah الغاشية
90 | 89. Al-Fajr الفجر
91 | 90. Al-Balad البلد
92 | 91. Asy-Syams الشّمس
93 | 92. Al-Lail الّيل
94 | 93. Ad-Duha الضحى
95 | 94. Al-Insyirah الانشراح
96 | 95. At-Tin التِّينِ
97 | 96. Al-‘Alaq العَلَق
98 | 97. Al-Qadr الْقَدْرِ
99 | 98. Al-Bayyinah الْبَيِّنَةُ
100 | 99. Az-Zalzalah الزلزلة
101 | 100. Al-‘Adiyat العاديات
102 | 101. Al-Qari’ah القارعة
103 | 102. At-Takasur التكاثر
104 | 103. Al-‘Asr العصر
105 | 104. Al-Humazah الهُمَزة
106 | 105. Al-Fil الْفِيلِ
107 | 106.Quraisy قُرَيْشٍ
108 | 107. Al-Ma’un الْمَاعُونَ
109 | 108. Al-Kausar الكوثر
110 | 109. Al-Kafirun الْكَافِرُونَ
111 | 110. An-Nasr النصر
112 | 111. Al-Lahab المسد
113 | 112. Al-Ikhlas الإخلاص
114 | 113. Al-Falaq الْفَلَقِ
115 | 114. An-Nas النَّاسِ
--------------------------------------------------------------------------------
/json/textpro.json:
--------------------------------------------------------------------------------
1 | {
2 | "neonlight": {
3 | "type": 1,
4 | "link": "https://textpro.me/create-a-futuristic-technology-neon-light-text-effect-1006.html"
5 | },
6 | "snow": {
7 | "type": 1,
8 | "link": "https://textpro.me/create-snow-text-effects-for-winter-holidays-1005.html"
9 | },
10 | "cloud": {
11 | "type": 1,
12 | "link": "https://textpro.me/create-a-cloud-text-effect-on-the-sky-online-1004.html"
13 | },
14 | "luxury": {
15 | "type": 1,
16 | "link": "https://textpro.me/3d-luxury-gold-text-effect-online-1003.html"
17 | },
18 | "gradient": {
19 | "type": 1,
20 | "link": "https://textpro.me/3d-gradient-text-effect-online-free-1002.html"
21 | },
22 | "blackpink": {
23 | "type": 1,
24 | "link": "https://textpro.me/create-blackpink-logo-style-online-1001.html"
25 | },
26 | "vintage": {
27 | "type": 2,
28 | "link": "https://textpro.me/create-realistic-vintage-style-light-bulb-1000.html"
29 | },
30 | "sand": {
31 | "type": 1,
32 | "link": "https://textpro.me/write-in-sand-summer-beach-free-online-991.html"
33 | },
34 | "sand2": {
35 | "type": 1,
36 | "link": "https://textpro.me/sand-writing-text-effect-online-990.html"
37 | },
38 | "sand3": {
39 | "type": 1,
40 | "link": "https://textpro.me/sand-engraved-3d-text-effect-989.html"
41 | },
42 | "glue": {
43 | "type": 1,
44 | "link": "https://textpro.me/create-3d-glue-text-effect-with-realistic-style-986.html"
45 | },
46 | "space": {
47 | "type": 2,
48 | "link": "https://textpro.me/create-space-3d-text-effect-online-985.html"
49 | },
50 | "metaldark": {
51 | "type": 1,
52 | "link": "https://textpro.me/metal-dark-gold-text-effect-984.html"
53 | },
54 | "glitch": {
55 | "type": 2,
56 | "link": "https://textpro.me/create-glitch-text-effect-style-tik-tok-983.html"
57 | },
58 | "stone": {
59 | "type": 2,
60 | "link": "https://textpro.me/create-a-stone-text-effect-online-982.html"
61 | },
62 | "galaxy": {
63 | "type": 1,
64 | "link": "https://textpro.me/neon-light-text-effect-with-galaxy-style-981.html"
65 | },
66 | "1917": {
67 | "type": 1,
68 | "link": "https://textpro.me/1917-style-text-effect-online-980.html"
69 | },
70 | "minion": {
71 | "type": 1,
72 | "link": "https://textpro.me/minion-text-effect-3d-online-978.html"
73 | },
74 | "phub": {
75 | "type": 2,
76 | "link": "https://textpro.me/pornhub-style-logo-online-generator-free-977.html"
77 | },
78 | "holographic": {
79 | "type": 1,
80 | "link": "https://textpro.me/holographic-3d-text-effect-975.html"
81 | },
82 | "avenger": {
83 | "type": 2,
84 | "link": "https://textpro.me/create-3d-avengers-logo-online-974.html"
85 | },
86 | "pmetal": {
87 | "type": 1,
88 | "link": "https://textpro.me/metal-purple-dual-effect-973.html"
89 | },
90 | "marvel": {
91 | "type": 2,
92 | "link": "https://textpro.me/create-logo-style-marvel-studios-ver-metal-972.html"
93 | },
94 | "marvel2": {
95 | "type": 2,
96 | "link": "https://textpro.me/create-logo-style-marvel-studios-online-971.html"
97 | },
98 | "deluxe": {
99 | "type": 1,
100 | "link": "https://textpro.me/deluxe-silver-text-effect-970.html"
101 | },
102 | "glossy": {
103 | "type": 1,
104 | "link": "https://textpro.me/glossy-blue-metal-text-effect-967.html"
105 | },
106 | "neon": {
107 | "type": 1,
108 | "link": "https://textpro.me/neon-text-effect-online-963.html"
109 | },
110 | "wolf": {
111 | "type": 2,
112 | "link": "https://textpro.me/create-wolf-logo-black-white-937.html"
113 | },
114 | "wolf2": {
115 | "type": 2,
116 | "link": "https://textpro.me/create-wolf-logo-galaxy-online-936.html"
117 | },
118 | "ninja": {
119 | "type": 2,
120 | "link": "https://textpro.me/create-ninja-logo-online-935.html"
121 | },
122 | "lion": {
123 | "type": 2,
124 | "link": "https://textpro.me/create-lion-logo-mascot-online-938.html"
125 | },
126 | "joker": {
127 | "type": 2,
128 | "link": "https://textpro.me/create-logo-joker-online-934.html"
129 | },
130 | "fireworks": {
131 | "type": 1,
132 | "link": "https://textpro.me/firework-sparkle-text-effect-930.html"
133 | },
134 | "lava": {
135 | "type": 1,
136 | "link": "https://textpro.me/lava-text-effect-online-914.html"
137 | },
138 | "camerika": {
139 | "type": 1,
140 | "link": "https://textpro.me/captain-america-text-effect-905.html"
141 | },
142 | "equalizer": {
143 | "type": 1,
144 | "link": "https://textpro.me/rainbow-equalizer-text-effect-902.html"
145 | },
146 | "matrix": {
147 | "type": 1,
148 | "link": "https://textpro.me/matrix-style-text-effect-online-884.html"
149 | },
150 | "thunder": {
151 | "type": 1,
152 | "link": "https://textpro.me/thunder-text-effect-online-881.html"
153 | },
154 | "gneon": {
155 | "type": 1,
156 | "link": "https://textpro.me/green-neon-text-effect-874.html"
157 | },
158 | "glow": {
159 | "type": 1,
160 | "link": "https://textpro.me/advanced-glow-text-effect-873.html"
161 | },
162 | "ice": {
163 | "type": 1,
164 | "link": "https://textpro.me/ice-cold-text-effect-862.html"
165 | }
166 | }
--------------------------------------------------------------------------------
/lib/Canvas.ts:
--------------------------------------------------------------------------------
1 | import {createCanvas, Image} from 'canvas';
2 |
3 | export function greyscale(
4 | ctx: any,
5 | x: number,
6 | y: number,
7 | width: number,
8 | height: number
9 | ) {
10 | const data = ctx.getImageData(x, y, width, height);
11 | for (let i = 0; i < data.data.length; i += 4) {
12 | const brightness =
13 | 0.34 * data.data[i] + 0.5 * data.data[i + 1] + 0.16 * data.data[i + 2];
14 | data.data[i] = brightness;
15 | data.data[i + 1] = brightness;
16 | data.data[i + 2] = brightness;
17 | }
18 | ctx.putImageData(data, x, y);
19 | return ctx;
20 | }
21 |
22 | export function invert(
23 | ctx: any,
24 | x: number,
25 | y: number,
26 | width: number,
27 | height: number
28 | ) {
29 | const data = ctx.getImageData(x, y, width, height);
30 | for (let i = 0; i < data.data.length; i += 4) {
31 | data.data[i] = 255 - data.data[i];
32 | data.data[i + 1] = 255 - data.data[i + 1];
33 | data.data[i + 2] = 255 - data.data[i + 2];
34 | }
35 | ctx.putImageData(data, x, y);
36 | return ctx;
37 | }
38 |
39 | export function silhouette(
40 | ctx: any,
41 | x: number,
42 | y: number,
43 | width: number,
44 | height: number
45 | ) {
46 | const data = ctx.getImageData(x, y, width, height);
47 | for (let i = 0; i < data.data.length; i += 4) {
48 | data.data[i] = 0;
49 | data.data[i + 1] = 0;
50 | data.data[i + 2] = 0;
51 | }
52 | ctx.putImageData(data, x, y);
53 | return ctx;
54 | }
55 |
56 | export function sepia(
57 | ctx: any,
58 | x: number,
59 | y: number,
60 | width: number,
61 | height: number
62 | ) {
63 | const data = ctx.getImageData(x, y, width, height);
64 | for (let i = 0; i < data.data.length; i += 4) {
65 | const brightness =
66 | 0.34 * data.data[i] + 0.5 * data.data[i + 1] + 0.16 * data.data[i + 2];
67 | data.data[i] = brightness + 100;
68 | data.data[i + 1] = brightness + 50;
69 | data.data[i + 2] = brightness;
70 | }
71 | ctx.putImageData(data, x, y);
72 | return ctx;
73 | }
74 |
75 | export function contrast(
76 | ctx: any,
77 | x: number,
78 | y: number,
79 | width: number,
80 | height: number
81 | ) {
82 | const data = ctx.getImageData(x, y, width, height);
83 | const factor = 259 / 100 + 1;
84 | const intercept = 128 * (1 - factor);
85 | for (let i = 0; i < data.data.length; i += 4) {
86 | data.data[i] = data.data[i] * factor + intercept;
87 | data.data[i + 1] = data.data[i + 1] * factor + intercept;
88 | data.data[i + 2] = data.data[i + 2] * factor + intercept;
89 | }
90 | ctx.putImageData(data, x, y);
91 | return ctx;
92 | }
93 |
94 | export function desaturate(
95 | ctx: any,
96 | level: number,
97 | x: number,
98 | y: number,
99 | width: number,
100 | height: number
101 | ) {
102 | const data = ctx.getImageData(x, y, width, height);
103 | for (let i = 0; i < height; i++) {
104 | for (let j = 0; j < width; j++) {
105 | const dest = (i * width + j) * 4;
106 | const grey = Number.parseInt(
107 | 0.2125 * data.data[dest] +
108 | 0.7154 * data.data[dest + 1] +
109 | (0.0721 * data.data[dest + 2]).toString(),
110 | 10
111 | );
112 | data.data[dest] += level * (grey - data.data[dest]);
113 | data.data[dest + 1] += level * (grey - data.data[dest + 1]);
114 | data.data[dest + 2] += level * (grey - data.data[dest + 2]);
115 | }
116 | }
117 | ctx.putImageData(data, x, y);
118 | return ctx;
119 | }
120 |
121 | export function distort(
122 | ctx: any,
123 | amplitude: number,
124 | x: number,
125 | y: number,
126 | width: number,
127 | height: number,
128 | strideLevel = 4
129 | ) {
130 | const data = ctx.getImageData(x, y, width, height);
131 | const temp = ctx.getImageData(x, y, width, height);
132 | const stride = width * strideLevel;
133 | for (let i = 0; i < width; i++) {
134 | for (let j = 0; j < height; j++) {
135 | const xs = Math.round(
136 | amplitude * Math.sin(2 * Math.PI * 3 * (j / height))
137 | );
138 | const ys = Math.round(
139 | amplitude * Math.cos(2 * Math.PI * 3 * (i / width))
140 | );
141 | const dest = j * stride + i * strideLevel;
142 | const src = (j + ys) * stride + (i + xs) * strideLevel;
143 | data.data[dest] = temp.data[src];
144 | data.data[dest + 1] = temp.data[src + 1];
145 | data.data[dest + 2] = temp.data[src + 2];
146 | }
147 | }
148 | ctx.putImageData(data, x, y);
149 | return ctx;
150 | }
151 |
152 | export function fishEye(
153 | ctx: any,
154 | level: number,
155 | x: number,
156 | y: number,
157 | width: number,
158 | height: number
159 | ) {
160 | const frame = ctx.getImageData(x, y, width, height);
161 | const source = new Uint8Array(frame.data);
162 | for (let i = 0; i < frame.data.length; i += 4) {
163 | const sx = (i / 4) % frame.width;
164 | const sy = Math.floor(i / 4 / frame.width);
165 | const dx = Math.floor(frame.width / 2) - sx;
166 | const dy = Math.floor(frame.height / 2) - sy;
167 | const dist = Math.sqrt(dx * dx + dy * dy);
168 | const x2 = Math.round(
169 | frame.width / 2 - dx * Math.sin(dist / (level * Math.PI) / 2)
170 | );
171 | const y2 = Math.round(
172 | frame.height / 2 - dy * Math.sin(dist / (level * Math.PI) / 2)
173 | );
174 | const i2 = (y2 * frame.width + x2) * 4;
175 | frame.data[i] = source[i2];
176 | frame.data[i + 1] = source[i2 + 1];
177 | frame.data[i + 2] = source[i2 + 2];
178 | frame.data[i + 3] = source[i2 + 3];
179 | }
180 | ctx.putImageData(frame, x, y);
181 | return ctx;
182 | }
183 |
184 | export function pixelize(
185 | ctx: any,
186 | canvas: any,
187 | image: any,
188 | level: number,
189 | x: number,
190 | y: number,
191 | width: number,
192 | height: number
193 | ) {
194 | ctx.imageSmoothingEnabled = false;
195 | ctx.drawImage(image, x, y, width * level, height * level);
196 | ctx.drawImage(
197 | canvas,
198 | x,
199 | y,
200 | width * level,
201 | height * level,
202 | x,
203 | y,
204 | width,
205 | height
206 | );
207 | ctx.imageSmoothingEnabled = true;
208 | return ctx;
209 | }
210 |
211 | export function hasAlpha(image: Image) {
212 | const canvas = createCanvas(image.width, image.height);
213 | const ctx = canvas.getContext('2d');
214 | ctx.drawImage(image, 0, 0);
215 | const data: any = ctx.getImageData(0, 0, canvas.width, canvas.height);
216 | let hasAlphaPixels = false;
217 | for (let i = 3; i < data.data.length; i += 4) {
218 | if (data.data[i] < 255) {
219 | hasAlphaPixels = true;
220 | break;
221 | }
222 | }
223 | return hasAlphaPixels;
224 | }
225 |
226 | export function drawImageWithTint(
227 | ctx: any,
228 | image: any,
229 | color: string,
230 | x: number,
231 | y: number,
232 | width: number,
233 | height: number
234 | ) {
235 | const {fillStyle, globalAlpha} = ctx;
236 | ctx.fillStyle = color;
237 | ctx.drawImage(image, x, y, width, height);
238 | ctx.globalAlpha = 0.5;
239 | ctx.fillRect(x, y, width, height);
240 | ctx.fillStyle = fillStyle;
241 | ctx.globalAlpha = globalAlpha;
242 | }
243 |
244 | export function shortenText(ctx: any, text: string, maxWidth: number) {
245 | let shorten = false;
246 | while (ctx.measureText(`${text}...`).width > maxWidth) {
247 | if (!shorten) shorten = true;
248 | text = text.substr(0, text.length - 1);
249 | }
250 | return shorten ? `${text}...` : text;
251 | }
252 |
253 | export function wrapText(ctx: any, text: string, maxWidth: number) {
254 | return new Promise(resolve => {
255 | if (ctx.measureText(text).width < maxWidth) return resolve([text]);
256 | if (ctx.measureText('W').width > maxWidth) return resolve(null);
257 | const words = text.split(' ');
258 | const lines = [];
259 | let line = '';
260 | while (words.length > 0) {
261 | let split = false;
262 | while (ctx.measureText(words[0]).width >= maxWidth) {
263 | const temp: any = words[0];
264 | words[0] = temp.slice(0, -1);
265 | if (split) {
266 | words[1] = `${temp.slice(-1)}${words[1]}`;
267 | } else {
268 | split = true;
269 | words.splice(1, 0, temp.slice(-1));
270 | }
271 | }
272 | if (ctx.measureText(`${line}${words[0]}`).width < maxWidth) {
273 | line += `${words.shift()} `;
274 | } else {
275 | lines.push(line.trim());
276 | line = '';
277 | }
278 | if (words.length === 0) lines.push(line.trim());
279 | }
280 | return resolve(lines);
281 | });
282 | }
283 |
284 | export function centerImage(base: any, data: any) {
285 | const dataRatio = data.width / data.height;
286 | const baseRatio = base.width / base.height;
287 | let {width, height} = data;
288 | let x = 0;
289 | let y = 0;
290 | if (baseRatio < dataRatio) {
291 | height = data.height;
292 | width = base.width * (height / base.height);
293 | x = (data.width - width) / 2;
294 | y = 0;
295 | } else if (baseRatio > dataRatio) {
296 | width = data.width;
297 | height = base.height * (width / base.width);
298 | x = 0;
299 | y = (data.height - height) / 2;
300 | }
301 | return {x, y, width, height};
302 | }
303 |
304 | export function centerImagePart(
305 | data: any,
306 | maxWidth: number,
307 | maxHeight: number,
308 | widthOffset: number,
309 | heightOffest: number
310 | ) {
311 | let {width, height} = data;
312 | if (width > maxWidth) {
313 | const ratio = maxWidth / width;
314 | width = maxWidth;
315 | height *= ratio;
316 | }
317 | if (height > maxHeight) {
318 | const ratio = maxHeight / height;
319 | height = maxHeight;
320 | width *= ratio;
321 | }
322 | const x = widthOffset + (maxWidth / 2 - width / 2);
323 | const y = heightOffest + (maxHeight / 2 - height / 2);
324 | return {x, y, width, height};
325 | }
326 |
--------------------------------------------------------------------------------
/lib/canvacord.ts:
--------------------------------------------------------------------------------
1 | const fs: any = require('fs-extra');
2 | const canvacord: any = require('canvacord');
3 | const canvas = canvacord.Canvas;
4 | import {createCanvas, loadImage, registerFont} from 'canvas';
5 | const {spawn}: any = require('child_process');
6 | import {
7 | desaturate,
8 | contrast,
9 | wrapText,
10 | greyscale,
11 | drawImageWithTint,
12 | fishEye,
13 | } from '../lib/Canvas';
14 | registerFont('../fonts/Impact.ttf', {family: 'Impact'});
15 | registerFont('../fonts/Noto-Regular.ttf', {family: 'Noto'});
16 | registerFont('../fonts/Noto-CJK.otf', {family: 'Noto'});
17 | registerFont('../fonts/Noto-Emoji.ttf', {family: 'Noto'});
18 | const fires = () => {
19 | return {
20 | frame_1: fs.readFileSync('../gif/api/1.jpg'),
21 | frame_2: fs.readFileSync('../gif/api/2.jpg'),
22 | frame_3: fs.readFileSync('../gif/api/3.jpg'),
23 | };
24 | };
25 |
26 | export const triggered = (buffer: Buffer, id: string): Promise =>
27 | new Promise(resolve => {
28 | canvas.trigger(buffer).then((res: Buffer) => {
29 | fs.writeFile(`./temp/${id}.gif`, res).then(() => {
30 | spawn('ffmpeg', [
31 | '-i',
32 | `./temp/${id}.gif`,
33 | '-vcodec',
34 | 'libwebp',
35 | '-lossless',
36 | '1',
37 | '-loop',
38 | '0',
39 | '-s',
40 | '150:150',
41 | `./temp/${id}.webp`,
42 | ])
43 | .on('exit', () => {
44 | const mediaData = fs.readFileSync(`./temp/${id}.webp`);
45 | fs.unlink(`./temp/${id}.gif`, () => {
46 | fs.unlink(`./temp/${id}.webp`, () => {});
47 | });
48 | return resolve(mediaData);
49 | })
50 | .on('error', (err: any) => console.log(err));
51 | });
52 | });
53 | });
54 |
55 | export const wasted = (buffer: Buffer): Promise =>
56 | new Promise(resolve => {
57 | canvas.wasted(buffer).then((res: Buffer) => {
58 | return resolve(res);
59 | });
60 | });
61 |
62 | export const wanted = (buffer: Buffer): Promise =>
63 | new Promise(resolve => {
64 | canvas.wanted(buffer).then((res: Buffer) => {
65 | return resolve(res);
66 | });
67 | });
68 |
69 | export const rainbow = (buffer: Buffer): Promise =>
70 | new Promise(resolve => {
71 | canvas.rainbow(buffer).then((res: Buffer) => {
72 | return resolve(res);
73 | });
74 | });
75 |
76 | export const facepalm = (buffer: Buffer): Promise =>
77 | new Promise(resolve => {
78 | canvas.facepalm(buffer).then((res: Buffer) => {
79 | return resolve(res);
80 | });
81 | });
82 |
83 | export const fuse = (buffer1: Buffer, buffer2: Buffer): Promise =>
84 | new Promise(resolve => {
85 | canvas.fuse(buffer1, buffer2).then((res: Buffer) => {
86 | return resolve(res);
87 | });
88 | });
89 |
90 | const fuse2 = (buffer1: Buffer, buffer2: Buffer): Promise =>
91 | new Promise(async resolve => {
92 | const Canvas = require('canvas');
93 | const img1 = await Canvas.loadImage(buffer1);
94 | const img2 = await Canvas.loadImage(buffer2);
95 |
96 | const canvas = Canvas.createCanvas(img1.width, img1.height);
97 | const ctx = canvas.getContext('2d');
98 | ctx.drawImage(img1, 0, 0);
99 | ctx.globalAlpha = 0.35;
100 | ctx.drawImage(img2, 0, 0, canvas.width, canvas.height);
101 | return resolve(canvas.toBuffer());
102 | });
103 | export const fire = (buffer: Buffer): Promise =>
104 | new Promise(resolve => {
105 | fuse2(buffer, fires().frame_1).then(res1 => {
106 | fs.writeFileSync('./gif/api_result/frame_1.jpg', res1);
107 | fuse2(buffer, fires().frame_2).then(res2 => {
108 | fs.writeFileSync('./gif/api_result/frame_2.jpg', res2);
109 | fuse2(buffer, fires().frame_3).then(res3 => {
110 | fs.writeFileSync('./gif/api_result/frame_2.jpg', res3);
111 | const anjay = spawn('convert', [
112 | '-delay',
113 | '70',
114 | './gif/api_result/*.jpg',
115 | '-scale',
116 | '150:150',
117 | './gif/api.gif',
118 | ]);
119 | anjay.on('close', () => {
120 | const mediaData = fs.readFileSync('./gif/api.gif');
121 | fs.unlink('./gif/api.gif').then(() => {});
122 | return resolve(mediaData);
123 | });
124 | });
125 | });
126 | });
127 | });
128 | export const deepfry = (buffer: Buffer): Promise =>
129 | new Promise(async (resolve, reject) => {
130 | try {
131 | const data = await loadImage(buffer);
132 | const canvas = createCanvas(data.width, data.height);
133 | const ctx = canvas.getContext('2d');
134 | ctx.drawImage(data, 0, 0);
135 | desaturate(ctx, -20, 0, 0, data.width, data.height);
136 | contrast(ctx, 0, 0, data.width, data.height);
137 | const attachment = canvas.toBuffer('image/jpeg', {quality: 0.2});
138 | return resolve(attachment);
139 | } catch (err) {
140 | return reject(
141 | `Oh no, an error occurred: \`${err.message}\`. Try again later!`
142 | );
143 | }
144 | });
145 |
146 | export const memegen = (
147 | top: string,
148 | bottom: string,
149 | image: Buffer
150 | ): Promise =>
151 | new Promise(async (resolve, reject) => {
152 | try {
153 | const base = await loadImage(image);
154 | const canvas = createCanvas(base.width, base.height);
155 | const ctx = canvas.getContext('2d');
156 | ctx.drawImage(base, 0, 0);
157 | const fontSize = Math.round(base.height / 10);
158 | ctx.font = `${fontSize}px Impact`;
159 | ctx.fillStyle = 'white';
160 | ctx.textAlign = 'center';
161 | ctx.textBaseline = 'top';
162 | const topLines: any = await wrapText(ctx, top, base.width - 10);
163 | if (!topLines)
164 | return reject(
165 | "There's not enough width to make a meme with this image."
166 | );
167 | for (let i = 0; i < topLines.length; i++) {
168 | const textHeight = i * fontSize + i * 10;
169 | ctx.strokeStyle = 'black';
170 | ctx.lineWidth = 5;
171 | ctx.strokeText(topLines[i], base.width / 2, textHeight);
172 | ctx.fillStyle = 'white';
173 | ctx.fillText(topLines[i], base.width / 2, textHeight);
174 | }
175 | const bottomLines: any = await wrapText(ctx, bottom, base.width - 10);
176 | if (!bottomLines)
177 | return reject(
178 | "There's not enough width to make a meme with this image."
179 | );
180 | ctx.textBaseline = 'bottom';
181 | const initial =
182 | base.height -
183 | (bottomLines.length - 1) * fontSize -
184 | (bottomLines.length - 1) * 10;
185 | for (let i = 0; i < bottomLines.length; i++) {
186 | const textHeight = initial + i * fontSize + i * 10;
187 | ctx.strokeStyle = 'black';
188 | ctx.lineWidth = 5;
189 | ctx.strokeText(bottomLines[i], base.width / 2, textHeight);
190 | ctx.fillStyle = 'white';
191 | ctx.fillText(bottomLines[i], base.width / 2, textHeight);
192 | }
193 | const attachment = canvas.toBuffer();
194 | return resolve(attachment);
195 | } catch (err) {
196 | return reject(
197 | `Oh no, an error occurred: \`${err.message}\`. Try again later!`
198 | );
199 | }
200 | });
201 |
202 | export const thuglife = (buffer: Buffer): Promise =>
203 | new Promise(async (resolve, reject) => {
204 | try {
205 | const base = await loadImage('./image/thug-life.png');
206 | const data = await loadImage(buffer);
207 | const canvas = createCanvas(data.width, data.height);
208 | const ctx = canvas.getContext('2d');
209 | ctx.drawImage(data, 0, 0);
210 | greyscale(ctx, 0, 0, data.width, data.height);
211 | const ratio = base.width / base.height;
212 | const width = data.width / 2;
213 | const height = Math.round(width / ratio);
214 | ctx.drawImage(
215 | base,
216 | data.width / 2 - width / 2,
217 | data.height - height,
218 | width,
219 | height
220 | );
221 | const attachment = canvas.toBuffer();
222 | return resolve(attachment);
223 | } catch (err) {
224 | return reject(
225 | `Oh no, an error occurred: \`${err.message}\`. Try again later!`
226 | );
227 | }
228 | });
229 |
230 | export const burn = (burn: string): Promise =>
231 | new Promise(async resolve => {
232 | const base = await loadImage('./image/spongebob-burn.png');
233 | const canvas = createCanvas(base.width, base.height);
234 | const ctx = canvas.getContext('2d');
235 | ctx.drawImage(base, 0, 0);
236 | ctx.fillStyle = 'black';
237 | ctx.textBaseline = 'top';
238 | ctx.font = '35px Noto';
239 | let fontSize = 35;
240 | while (ctx.measureText(burn).width > 400) {
241 | fontSize--;
242 | ctx.font = `${fontSize}px Noto`;
243 | }
244 | const lines: any = await wrapText(ctx, burn, 180);
245 | ctx.fillText(lines.join('\n'), 55, 103);
246 | return resolve(canvas.toBuffer());
247 | });
248 |
249 | export const tobecontinue = (buffer: Buffer): Promise =>
250 | new Promise(async (resolve, reject) => {
251 | try {
252 | const base = await loadImage('./image/to-be-continued.png');
253 | const data = await loadImage(buffer);
254 | const canvas = createCanvas(data.width, data.height);
255 | const ctx = canvas.getContext('2d');
256 | drawImageWithTint(ctx, data, '#704214', 0, 0, data.width, data.height);
257 | const ratio = base.width / base.height;
258 | const width = canvas.width / 2;
259 | const height = Math.round(width / ratio);
260 | ctx.drawImage(base, 0, canvas.height - height, width, height);
261 | return resolve(canvas.toBuffer());
262 | } catch (err) {
263 | return reject(
264 | `Oh no, an error occurred: \`${err.message}\`. Try again later!`
265 | );
266 | }
267 | });
268 |
269 | export const fisheye = (
270 | buffer: Buffer,
271 | level: number
272 | ): Promise =>
273 | new Promise(async (resolve, reject) => {
274 | try {
275 | const data = await loadImage(buffer);
276 | const canvas = createCanvas(data.width, data.height);
277 | const ctx = canvas.getContext('2d');
278 | ctx.drawImage(data, 0, 0);
279 | fishEye(ctx, level, 0, 0, data.width, data.height);
280 | return resolve(canvas.toBuffer());
281 | } catch (err) {
282 | return reject(
283 | `Oh no, an error occurred: \`${err.message}\`. Try again later!`
284 | );
285 | }
286 | });
287 | export const memegen2 = (
288 | buffer: Buffer,
289 | text: string
290 | ): Promise =>
291 | new Promise(async (resolve, reject) => {
292 | try {
293 | const base = await loadImage(buffer);
294 | const canvas = createCanvas(base.width, base.height);
295 | const ctx = canvas.getContext('2d');
296 | ctx.font = '40px Noto';
297 | const lines: any = await wrapText(ctx, text, base.width - 10);
298 | const lineBreakLen = text.split('\n').length;
299 | const linesLen =
300 | 40 * lines.length +
301 | 40 * (lineBreakLen - 1) +
302 | 14 * lines.length +
303 | 14 * (lineBreakLen - 1) +
304 | 14;
305 | canvas.height += linesLen;
306 | ctx.font = '40px Noto';
307 | ctx.textBaseline = 'top';
308 | ctx.fillStyle = 'white';
309 | ctx.fillRect(0, 0, base.width, linesLen);
310 | ctx.fillStyle = 'black';
311 | ctx.fillText(lines.join('\n'), 5, 5);
312 | ctx.drawImage(base, 0, linesLen);
313 | return resolve(canvas.toBuffer());
314 | } catch (err) {
315 | return reject(
316 | `Oh no, an error occurred: \`${err.message}\`. Try again later!`
317 | );
318 | }
319 | });
320 |
--------------------------------------------------------------------------------
/lib/cloud.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs-extra'
2 | import { DB } from 'src/login';
3 | import { cloud, configType } from 'types';
4 | const cryptojs = require('crypto-js');
5 | export default class Cloud {
6 | private cloud: cloud
7 | private config: configType
8 | constructor(private DB: DB){
9 | this.cloud = this.DB.cloud
10 | this.config = this.DB.config
11 | }
12 | rawCloud (path: string, format: string, time: string){
13 | return {
14 | path: path,
15 | format: format,
16 | timestamp: time,
17 | };
18 | }
19 | saveJSON() {
20 | return this.DB.cloud = this.cloud
21 | }
22 | getHash(key: string): string {
23 | return cryptojs.HmacSHA256(key, this.config.secret).toString();
24 | }
25 | findCloud (id: string): Promise {
26 | const key = this.getHash(id);
27 | if (Object.prototype.hasOwnProperty.call(this.cloud, key)) {
28 | return Promise.resolve(this.cloud[key]!.path);
29 | } else {
30 | return Promise.reject('Anda belum mengupload file apapun ke cloud!');
31 | }
32 | }
33 | async addCloud(asu: string,buffer: Buffer,format: string,time: string): Promise{
34 | const id = this.getHash(asu);
35 | if (!Object.prototype.hasOwnProperty.call(this.cloud, id)) {
36 | this.cloud[id] = this.rawCloud('../cloud/' + id + '.' + format, format, time);
37 | return fs.writeFile('../cloud/' + id + '.' + format, buffer).then(() => {
38 | this.saveJSON();
39 | return Promise.resolve('Sukses menambah file ke cloud!');
40 | });
41 | } else {
42 | return Promise.reject('Maaf, setiap user hanya boleh menyimpan 1 file di cloud!');
43 | }
44 | }
45 | async removeCloud(asu: string): Promise{
46 | const id = this.getHash(asu);
47 | if (Object.prototype.hasOwnProperty.call(this.cloud, id)) {
48 | return fs.unlink('../cloud/' + id + '.' + this.cloud[id]?.format).then(() => {
49 | delete this.cloud[id];
50 | this.saveJSON();
51 | return Promise.resolve('File cloud berhasil di hapus!');
52 | });
53 | } else {
54 | return Promise.reject('Anda belum mengupload file apapun ke cloud!');
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/lib/exif.js:
--------------------------------------------------------------------------------
1 | const stickerpackid =
2 | 'com.snowcorp.stickerly.android.stickercontentprovider b5e7275f-f1de-4137-961f-57becfad34f2'; //not sure what this does
3 | const packname = 'XyZ BOT';
4 | const author = '@itzngga';
5 | const googlelink =
6 | 'https://play.google.com/store/apps/details?id=com.marsvard.stickermakerforwhatsapp';
7 | const applelink =
8 | 'https://itunes.apple.com/app/sticker-maker-studio/id1443326857';
9 | const json = {
10 | 'sticker-pack-name': '@itzngga',
11 | 'sticker-pack-publisher': 'XyZ BOT',
12 | };
13 | let len = JSON.stringify(json).length;
14 |
15 | function exif() {
16 | const f = Buffer.from([
17 | 0x49,
18 | 0x49,
19 | 0x2a,
20 | 0x00,
21 | 0x08,
22 | 0x00,
23 | 0x00,
24 | 0x00,
25 | 0x01,
26 | 0x00,
27 | 0x41,
28 | 0x57,
29 | 0x07,
30 | 0x00,
31 | ]);
32 | const aaa = [0x00, 0x00, 0x16, 0x00, 0x00, 0x00];
33 | if (len > 256) {
34 | len = len - 256;
35 | aaa.unshift(0x01);
36 | } else {
37 | aaa.unshift(0x00);
38 | }
39 | const fff = Buffer.from(aaa);
40 | const ffff = Buffer.from(JSON.stringify(json));
41 | if (len < 16) {
42 | len = len.toString(16);
43 | len = '0' + len;
44 | } else {
45 | len = len.toString(16);
46 | }
47 | const ff = Buffer.from(len, 'hex');
48 | return Buffer.concat([f, ff, fff, ffff]);
49 | }
50 |
51 | module.exports = exif();
52 |
--------------------------------------------------------------------------------
/lib/extract.ts:
--------------------------------------------------------------------------------
1 | import {Readable} from 'stream';
2 | const ffmpeg: any = require('fluent-ffmpeg');
3 |
4 | function bufferToStream(buffer: Buffer) {
5 | const readable = new Readable();
6 | readable._read = () => {};
7 | readable.push(buffer);
8 | readable.push(null);
9 | return readable;
10 | }
11 |
12 | export default (buffer: Buffer, id: string): Promise =>
13 | new Promise(resolve => {
14 | const stream = bufferToStream(buffer);
15 | ffmpeg(stream)
16 | .inputFormat('mp4')
17 | .audioCodec('aac')
18 | .addOutputOptions('-map', '0:a')
19 | .save(`./temp/${id}.m4a`)
20 | .on('end', () => {
21 | stream.destroy();
22 | return resolve(true);
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/lib/games.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-explicit-any */
2 | /* eslint-disable no-self-assign */
3 | import {createCanvas, registerFont} from 'canvas';
4 | import {MessageType, WAContextInfo, WAMessage} from '@adiwajshing/baileys';
5 | import fs from 'fs-extra';
6 | import { Index } from 'index';
7 | const pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ23456789'.split(
8 | ''
9 | );
10 | const nums = ['1️⃣', '2️⃣', '3️⃣', '4️⃣', '5️⃣', '6️⃣', '7️⃣', '8️⃣', '9️⃣'];
11 | const {stripIndents}: any = require('common-tags');
12 | const tictactoe: any = require('tictactoe-minimax-ai');
13 | const cakLontong = fs.readJSONSync('../json/caklontong.json');
14 | const slots = ['🍇', '🍊', '🍐', '🍒', '🍋', '🍌', '🔔'];
15 | const game: Set = new Set();
16 | registerFont('../fonts/Captcha.ttf', {family: 'Captcha'});
17 |
18 | // high 56
19 | // low 55
20 |
21 | // bj 10-30 / undefined
22 | // csn kebanyakan
23 | function randomText(len: number): string {
24 | const result = [];
25 | for (let i = 0; i < len; i++)
26 | result.push(pool[Math.floor(Math.random() * pool.length)]);
27 | return result.join('');
28 | }
29 | function is_undefined(input: string): boolean {
30 | const u = void 0;
31 | return input === u;
32 | }
33 | export default class Game {
34 | constructor(private client: Index){
35 | this.client = client
36 | }
37 | async sendText (
38 | from: string,
39 | teks: string,
40 | context?: WAContextInfo
41 | ) {
42 | return this.client.sendMessage(
43 | from,
44 | teks,
45 | MessageType.text,
46 | context ? {contextInfo: context} : {}
47 | );
48 | }
49 | async reply (
50 | from: string,
51 | teks: string,
52 | msg: any,
53 | context?: WAContextInfo
54 | ) {
55 | return this.client.sendMessage(
56 | from,
57 | teks,
58 | MessageType.text,
59 | context ? {quoted: msg, contextInfo: context} : {quoted: msg}
60 | );
61 | }
62 | async capca(
63 | from: string,
64 | serial: string,
65 | message: WAMessage
66 | ): Promise {
67 | try {
68 | if (game.has(serial))
69 | return this.client.sendMessage(
70 | from,
71 | 'Mohon selesaikan game sebelumnya!',
72 | MessageType.text,
73 | {quoted: message}
74 | );
75 | game.add(serial);
76 | const canvas = createCanvas(125, 32);
77 | const ctx = canvas.getContext('2d');
78 | const teks = randomText(5);
79 | ctx.fillStyle = 'white';
80 | ctx.fillRect(0, 0, canvas.width, canvas.height);
81 | ctx.beginPath();
82 | ctx.strokeStyle = 'black';
83 | ctx.font = '26px Captcha';
84 | ctx.rotate(-0.05);
85 | ctx.strokeText(teks, 15, 26);
86 | await this.client.sendMessage(from, canvas.toBuffer(), MessageType.image, {
87 | caption: 'Anda memiliki waktu 15 detik untuk menebak apa ini',
88 | quoted: message,
89 | });
90 | this.client
91 | .waitMessage({type: 'text', query: teks, sender: serial}, 15000)
92 | .then(res => {
93 | this.client.sendMessage(
94 | from,
95 | 'Good Job, Jawaban anda benar!',
96 | MessageType.text,
97 | {quoted: res}
98 | );
99 | game.delete(serial);
100 | })
101 | .catch(() => {
102 | this.client.sendMessage(
103 | from,
104 | 'Maaf, waktu habis!\n\nJawabanya adalah *' + teks + '*',
105 | MessageType.text,
106 | {quoted: message}
107 | );
108 | game.delete(serial);
109 | });
110 | } catch (error) {
111 | console.log(error);
112 | }
113 | }
114 | async cakLontong(
115 | from: string,
116 | serial: string,
117 | message: WAMessage
118 | ): Promise {
119 | try {
120 | if (game.has(serial))
121 | return this.client.sendMessage(
122 | from,
123 | 'Mohon selesaikan game sebelumnya!',
124 | MessageType.text,
125 | {quoted: message}
126 | );
127 | game.add(serial);
128 | const quiz = cakLontong[Math.floor(Math.random() * cakLontong.length)];
129 | quiz.answer = quiz.answer.toLowerCase();
130 | await this.client.sendMessage(
131 | from,
132 | `*Anda memiliki waktu 15detik untuk menjawab pertanyaan dibawah.*\n\n${quiz.quiz}`,
133 | MessageType.text,
134 | {quoted: message}
135 | );
136 | this.client
137 | .waitMessage({type: 'text', query: quiz.answer, sender: serial}, 15000)
138 | .then(res => {
139 | this.client.sendMessage(
140 | from,
141 | 'Jawaban anda benar!\n\n' + quiz.detail,
142 | MessageType.text,
143 | {quoted: res}
144 | );
145 | game.delete(serial);
146 | })
147 | .catch(() => {
148 | this.client.sendMessage(
149 | from,
150 | 'Maaf, waktu habis!\n\nJawabanya adalah *' +
151 | quiz.answer +
152 | '*\n_' +
153 | quiz.detail +
154 | '_',
155 | MessageType.text,
156 | {quoted: message}
157 | );
158 | game.delete(serial);
159 | });
160 | } catch (error) {
161 | console.log(error);
162 | }
163 | }
164 | async mathquiz(
165 | diff: number,
166 | from: string,
167 | serial: string,
168 | message: WAMessage
169 | ): Promise {
170 | const operations = ['+', '-', '*'];
171 | const maxValues: any = {
172 | ez: 10,
173 | easy: 50,
174 | medium: 100,
175 | hard: 500,
176 | extreme: 1000,
177 | impossible: Number.MAX_SAFE_INTEGER,
178 | };
179 | const maxMultiplyValues: any = {
180 | ez: 5,
181 | easy: 12,
182 | medium: 30,
183 | hard: 50,
184 | extreme: 100,
185 | impossible: Number.MAX_SAFE_INTEGER,
186 | };
187 | try {
188 | if (game.has(serial))
189 | return this.client.sendMessage(
190 | from,
191 | 'Mohon selesaikan game sebelumnya!',
192 | MessageType.text,
193 | {quoted: message}
194 | );
195 | game.add(serial);
196 | const operation =
197 | operations[Math.floor(Math.random() * operations.length)];
198 | let answer: any, value1, value2;
199 | switch (operation) {
200 | case '+':
201 | value1 = Math.floor(Math.random() * maxValues[diff]) + 1;
202 | value2 = Math.floor(Math.random() * maxValues[diff]) + 1;
203 | answer = value1 + value2;
204 | break;
205 | case '-':
206 | value1 = Math.floor(Math.random() * maxValues[diff]) + 1;
207 | value2 = Math.floor(Math.random() * maxValues[diff]) + 1;
208 | answer = value1 - value2;
209 | break;
210 | case '*':
211 | value1 = Math.floor(Math.random() * maxMultiplyValues[diff]) + 1;
212 | value2 = Math.floor(Math.random() * maxMultiplyValues[diff]) + 1;
213 | answer = value1 * value2;
214 | break;
215 | }
216 | answer = answer.toString().replace('*', '×');
217 | this.client.sendMessage(
218 | from,
219 | `*Anda memiliki waktu 15detik untuk menjawab pertanyaan dibawah.*\n\n${value1} ${operation} ${value2}`,
220 | MessageType.text,
221 | {quoted: message}
222 | );
223 | this.client
224 | .waitMessage(
225 | {type: 'text', query: answer.toString(), sender: serial},
226 | 15000
227 | )
228 | .then(res => {
229 | this.client.sendMessage(
230 | from,
231 | 'Good Job, Jawaban anda benar!',
232 | MessageType.text,
233 | {quoted: res}
234 | );
235 | game.delete(serial);
236 | })
237 | .catch(() => {
238 | this.client.sendMessage(
239 | from,
240 | 'Maaf, waktu habis!\n\nJawabanya adalah *' +
241 | answer.toString() +
242 | '*',
243 | MessageType.text,
244 | {quoted: message}
245 | );
246 | game.delete(serial);
247 | });
248 | } catch (error) {
249 | console.log(error);
250 | }
251 | }
252 | async slots(from: string, message: WAMessage): Promise {
253 | const slotOne = Math.floor(Math.random() * slots.length);
254 | const slotTwo = Math.floor(Math.random() * slots.length);
255 | const slotThree = Math.floor(Math.random() * slots.length);
256 | return this.reply(
257 | from,
258 | stripIndents`
259 | \`\`\`╭ : : SLOTS : : ╮
260 | ┝•---------------
261 | ┝• ${this.wrapSlots(slotOne, false)} : ${this.wrapSlots(
262 | slotTwo,
263 | false
264 | )} : ${this.wrapSlots(slotThree, false)}
265 | ┝> ${slots[slotOne]} : ${slots[slotTwo]} : ${slots[slotThree]}
266 | ┝• ${this.wrapSlots(slotOne, true)} : ${this.wrapSlots(
267 | slotTwo,
268 | true
269 | )} : ${this.wrapSlots(slotThree, true)}
270 | ┝•---------------
271 | ╰ : : ${
272 | slotOne === slotTwo && slotOne === slotThree ? ' WIN! ' : ' LOST '
273 | } : : ╯\`\`\`
274 | `,
275 | message
276 | );
277 | }
278 | wrapSlots(slot: number, add: boolean) {
279 | if (add) {
280 | if (slot + 1 > slots.length - 1) return slots[0];
281 | return slots[slot + 1];
282 | }
283 | if (slot - 1 < 0) return slots[slots.length - 1];
284 | return slots[slot - 1];
285 | }
286 | async tictactoe(
287 | gid: string,
288 | from: any,
289 | opponent: any,
290 | message: WAMessage
291 | ): Promise {
292 | if (game.has(gid))
293 | return this.reply(gid, 'Tolong tunggu game sebelumnya berakhir!', message);
294 | game.add(gid);
295 | try {
296 | if (!opponent.bot) {
297 | await this.client.sendMessage(
298 | gid,
299 | `@${opponent.id.replace(
300 | '@s.whatsapp.net',
301 | ''
302 | )}\nterima tantangan game ini?\n\n*yes/no*`,
303 | MessageType.text,
304 | {quoted: message, contextInfo: {mentionedJid: [opponent.id]}}
305 | );
306 | const verification = await this.client
307 | .waitMessage(
308 | {type: 'regex', query: '/yes|no/g', sender: opponent.id},
309 | 15000
310 | )
311 | .then(res => {
312 | if (res.body[0] === 'yes') return true;
313 | if (res.body[0] === 'no') return false;
314 | return false;
315 | })
316 | .catch(err => {
317 | console.log(err);
318 | return false;
319 | });
320 | if (!verification) {
321 | game.delete(gid);
322 | return this.reply(gid, 'Sepertinya dia menolak...', message);
323 | }
324 | }
325 | const sides = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];
326 | const taken: string[] = [];
327 | let userTurn = true;
328 | let winner = null;
329 | while (!winner && taken.length < 9) {
330 | const user: any = userTurn ? from : opponent;
331 | const sign: boolean | string = userTurn ? 'X' : 'O';
332 | let choice;
333 | if (opponent.bot && !userTurn) {
334 | choice = tictactoe.bestMove(this.convertBoard(sides), {
335 | computer: 'x',
336 | opponent: 'o',
337 | });
338 | } else {
339 | await this.client.sendMessage(
340 | gid,
341 | stripIndents`
342 | @${user.id.replace(
343 | '@s.whatsapp.net',
344 | ''
345 | )}\nbagian apa yang anda pilih?\nbalas *end* untuk mengakhiri game
346 | ${this.displayBoard(sides)}
347 | `,
348 | MessageType.text,
349 | {quoted: message, contextInfo: {mentionedJid: [user.id]}}
350 | );
351 | await this.client
352 | .waitMessage(
353 | {type: 'regex', query: '/[0-9]|end/g', sender: user.id},
354 | 30000
355 | )
356 | .then(res => {
357 | choice = res.body[0];
358 | if (choice === 'end') return true;
359 | if (taken.includes(choice)) {
360 | this.sendText(gid, 'Maaf, box tersebut telah terpakai!');
361 | choice = Math.floor(Math.random() * sides.length);
362 | return true;
363 | }
364 | return sides.includes(choice) && !taken.includes(choice);
365 | })
366 | .catch(() => {
367 | choice = 'timeout';
368 | });
369 | choice = choice;
370 | if (choice === 'end') {
371 | winner = userTurn ? opponent : from;
372 | break;
373 | } else if (choice === 'timeout') {
374 | winner = 'time';
375 | break;
376 | }
377 | }
378 | sides[
379 | opponent.bot && !userTurn ? choice : Number.parseInt(choice, 10) - 1
380 | ] = sign;
381 | taken.push(choice);
382 | const win = this.verifyWin(sides, from, opponent);
383 | if (win) winner = win;
384 | userTurn = !userTurn;
385 | }
386 | game.delete(gid);
387 | if (winner === 'tie')
388 | return this.reply(
389 | gid,
390 | stripIndents`
391 | Game ini berakhir seri!\n\n${this.displayBoard(sides)}`,
392 | message
393 | );
394 | if (!is_undefined(winner.bot))
395 | return this.reply(
396 | gid,
397 | stripIndents`
398 | Bot XyZ menang!\n\n${this.displayBoard(sides)}`,
399 | message
400 | );
401 | if (winner === 'time')
402 | return this.reply(
403 | gid,
404 | stripIndents`Game otomatis berakhir karena tidak ada respon.
405 | \n${this.displayBoard(sides)}`,
406 | message
407 | );
408 | return this.client.sendMessage(
409 | gid,
410 | stripIndents`
411 | Game ini dimenangkan oleh, @${winner.id.replace('@s.whatsapp.net', '')}!\n
412 | ${this.displayBoard(sides)}
413 | `,
414 | MessageType.text,
415 | {quoted: message, contextInfo: {mentionedJid: [winner.id]}}
416 | );
417 | } catch (err) {
418 | game.delete(gid);
419 | throw err;
420 | }
421 | }
422 | verifyWin(
423 | sides: string[],
424 | player1: {id: string; bot: boolean} | string,
425 | player2: {id: string; bot: boolean} | string
426 | ): any {
427 | const evaluated = tictactoe.boardEvaluate(this.convertBoard(sides)).status;
428 | if (evaluated === 'win') return player1;
429 | if (evaluated === 'loss') return player2;
430 | if (evaluated === 'tie') return 'tie';
431 | return false;
432 | }
433 |
434 | convertBoard(board: string[]) {
435 | const newBoard: any = [[], [], []];
436 | let col = 0;
437 | for (const piece of board) {
438 | if (piece === 'X') {
439 | newBoard[col].push('x');
440 | } else if (piece === 'O') {
441 | newBoard[col].push('o');
442 | } else {
443 | newBoard[col].push('_');
444 | }
445 | if (newBoard[col].length === 3) col++;
446 | }
447 | return newBoard;
448 | }
449 |
450 | displayBoard(board: string[]) {
451 | let str = '';
452 | for (let i = 0; i < board.length; i++) {
453 | if (board[i] === 'X') {
454 | str += '❌';
455 | } else if (board[i] === 'O') {
456 | str += '⭕';
457 | } else {
458 | str += nums[i];
459 | }
460 | if (i % 3 === 2) str += '\n';
461 | }
462 | return str;
463 | }
464 | }
465 |
--------------------------------------------------------------------------------
/lib/gify.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs-extra';
2 | import ffmpeg from 'fluent-ffmpeg';
3 | const {spawn} = require('child_process');
4 | import {Readable} from 'stream';
5 |
6 | function bufferToStream(buffer: Buffer) {
7 | const readable = new Readable();
8 | readable._read = () => {};
9 | readable.push(buffer);
10 | readable.push(null);
11 | return readable;
12 | }
13 |
14 | function modifExif(id: string, callback: (Buff: Buffer) => void) {
15 | spawn('webpmux', [
16 | '-set',
17 | 'exif',
18 | '../src/data.exif',
19 | '../temp/' + id + '.webp',
20 | '-o',
21 | '../temp/' + id + '.webp',
22 | ]).on('exit', () => {
23 | callback(fs.readFileSync('../temp/' + id + '.webp'));
24 | fs.unlink('../temp/' + id + '.webp').then(() => {});
25 | });
26 | }
27 |
28 | export default function (
29 | id: string,
30 | buffers: Buffer,
31 | qty: number
32 | ): Promise {
33 | return new Promise(resolve => {
34 | const stream = bufferToStream(buffers);
35 | const options = quality(qty);
36 | ffmpeg(stream)
37 | .inputFormat('mp4')
38 | .addOutputOptions(options)
39 | .save(`../temp/${id}.webp`)
40 | .on('end', () => {
41 | stream.destroy();
42 | modifExif(id, res => {
43 | return resolve(res);
44 | });
45 | });
46 | });
47 | }
48 |
49 | function quality(qts: number): string[] {
50 | switch (qts) {
51 | case 1: {
52 | //very high
53 | const arr = [
54 | '-vcodec',
55 | 'libwebp',
56 | '-vf',
57 | 'scale=512:512,setsar=1,fps=25',
58 | '-lossless',
59 | '1',
60 | '-preset',
61 | 'default',
62 | '-an',
63 | '-vsync',
64 | '0',
65 | ];
66 | return arr;
67 | }
68 | case 2: {
69 | //high
70 | const arr1 = [
71 | '-vcodec',
72 | 'libwebp',
73 | '-vf',
74 | 'scale=200:200,setsar=1,fps=15',
75 | '-lossless',
76 | '1',
77 | '-preset',
78 | 'default',
79 | '-an',
80 | '-vsync',
81 | '0',
82 | ];
83 | return arr1;
84 | }
85 |
86 | case 3: {
87 | //medium
88 | const arr2 = [
89 | '-vcodec',
90 | 'libwebp',
91 | '-vf',
92 | 'scale=150:150,setsar=1,fps=10',
93 | '-lossless',
94 | '1',
95 | '-preset',
96 | 'default',
97 | '-an',
98 | '-vsync',
99 | '0',
100 | ];
101 | return arr2;
102 | }
103 | case 4: {
104 | //low
105 | const arr3 = [
106 | '-vcodec',
107 | 'libwebp',
108 | '-vf',
109 | 'scale=150:150,setsar=1,fps=7',
110 | '-lossless',
111 | '1',
112 | '-preset',
113 | 'default',
114 | '-an',
115 | '-vsync',
116 | '0',
117 | ];
118 | return arr3;
119 | }
120 | case 5: {
121 | //very low
122 | const arr4 = [
123 | '-vcodec',
124 | 'libwebp',
125 | '-vf',
126 | 'scale=100:100,setsar=1,fps=5',
127 | '-lossless',
128 | '1',
129 | '-preset',
130 | 'default',
131 | '-an',
132 | '-vsync',
133 | '0',
134 | ];
135 | return arr4;
136 | }
137 |
138 | default: {
139 | const arr5 = [
140 | '-vcodec',
141 | 'libwebp',
142 | '-vf',
143 | 'scale=150:150,setsar=1,fps=10',
144 | '-lossless',
145 | '1',
146 | '-preset',
147 | 'default',
148 | '-an',
149 | '-vsync',
150 | '0',
151 | ];
152 | return arr5;
153 | }
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/lib/group.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable prefer-spread */
2 | /* eslint-disable prefer-rest-params */
3 | import fs from 'fs-extra';
4 | import {group} from '../types';
5 |
6 | if (typeof Array.prototype.splice === 'undefined') {
7 | Array.prototype.splice = function (index: number, howmanys: number) {
8 | const howmany = howmanys || this.length;
9 | const elems = Array.prototype.slice.call(arguments, 2);
10 | let newArr = this.slice(0, index);
11 | const last = this.slice(index + howmany);
12 | newArr = newArr.concat.apply(newArr, elems);
13 | newArr = newArr.concat.apply(newArr, last);
14 | return newArr;
15 | };
16 | }
17 |
18 | function isGroupAdded(gid: string) {
19 | return new Promise(resolve => {
20 | fs.access(
21 | './groups/' + gid + '/' + gid + '.json',
22 | fs.constants.F_OK,
23 | (err: any) => {
24 | if (err) {
25 | const obj = defaultFormat(gid);
26 | fs.ensureDirSync('./groups/' + gid);
27 | fs.writeJSONSync('./groups/' + gid + '/' + gid + '.json', obj);
28 | return resolve(obj);
29 | } else {
30 | return resolve(
31 | fs.readJSONSync('./groups/' + gid + '/' + gid + '.json')
32 | );
33 | }
34 | }
35 | );
36 | });
37 | }
38 |
39 | export function isCmd(gid: string, cmd: string) {
40 | return new Promise(resolve => {
41 | isGroupAdded(gid).then((res: any) => {
42 | const i = res.command.find((x: any) => x.cmd === cmd);
43 | if (i) {
44 | return resolve(i);
45 | }
46 | });
47 | });
48 | }
49 | export function addCmd(gid: string, cmd: string, result: string) {
50 | return new Promise((resolve, reject) => {
51 | isGroupAdded(gid).then((res: any) => {
52 | const i = res.command.find((x: any) => x.cmd === cmd);
53 | if (i) {
54 | return reject('[ERROR] custom command are exist');
55 | } else {
56 | res.command.push({
57 | cmd: cmd,
58 | result: result,
59 | });
60 | fs.ensureDirSync('./groups/' + gid);
61 | fs.writeJSONSync('./groups/' + gid + '/' + gid + '.json', res);
62 | return resolve('Menambah custom command ke group berhasil!');
63 | }
64 | });
65 | });
66 | }
67 | export function addMedia(
68 | gid: string,
69 | cmd: string,
70 | media: Buffer,
71 | mimetype: string
72 | ) {
73 | return new Promise((resolve, reject) => {
74 | try {
75 | isGroupAdded(gid).then((res: any) => {
76 | const i = res.command.find((x: any) => x.cmd === cmd);
77 | if (i) {
78 | return reject('[ERROR] custom command are exist');
79 | } else {
80 | const formated =
81 | './groups/' + gid + '/' + cmd + '.' + mimetype.split('/')[1];
82 | res.command.push({
83 | cmd: cmd,
84 | result: '',
85 | isMedia: formated,
86 | format: mimetype.split('/')[1],
87 | });
88 | fs.ensureDirSync('./groups/' + gid);
89 | fs.writeJSONSync('./groups/' + gid + '/' + gid + '.json', res);
90 | fs.writeFileSync(formated, media);
91 | return resolve('Menambah custom command ke group berhasil!');
92 | }
93 | });
94 | } catch (error) {
95 | return reject(error);
96 | }
97 | });
98 | }
99 | export function rmvCmd(gid: string, cmd: string) {
100 | return new Promise((resolve, reject) => {
101 | isGroupAdded(gid).then((res: any) => {
102 | const i = res.command.findIndex((x: any) => x.cmd === cmd);
103 | if (i === -1) {
104 | return reject(`[ERROR] custom command ${cmd} tidak ada!`);
105 | } else {
106 | if (!res.command[i].result) {
107 | fs.unlinkSync(res.command[i].isMedia);
108 | res.command.splice(i, 1);
109 | fs.writeJSONSync('./groups/' + gid + '/' + gid + '.json', res);
110 | return resolve(`Command ${cmd} telah di hapus dari custom command!`);
111 | } else {
112 | res.command.splice(i, 1);
113 | fs.writeJSONSync('./groups/' + gid + '/' + gid + '.json', res);
114 | return resolve(`Command ${cmd} telah di hapus dari custom command!`);
115 | }
116 | }
117 | });
118 | });
119 | }
120 |
121 | export function cmdList(gid: string) {
122 | return new Promise((resolve, reject) => {
123 | isGroupAdded(gid).then((res: any) => {
124 | if (!res.command.length) {
125 | return reject('Custom command belum di tambahkan ke group ini!');
126 | } else {
127 | let hasil =
128 | '*XyZ BOT Group Custom Command*\n-------------------------------------------------------------------\n',
129 | counter = 1;
130 | for (const i of res.command) {
131 | hasil += `${counter++}. ${i.cmd}\n`;
132 | }
133 | return resolve(hasil);
134 | }
135 | });
136 | });
137 | }
138 | export const getComs = (gid: string): Promise =>
139 | isGroupAdded(gid).then((res: any) => {
140 | if (!res.command.length) {
141 | return 0;
142 | } else {
143 | let counter = 1;
144 | for (const i of res.command) {
145 | counter++;
146 | }
147 | return counter;
148 | }
149 | });
150 | const defaultFormat = (gid: string): group => {
151 | return {
152 | gid: gid,
153 | command: [],
154 | settings: {},
155 | };
156 | };
157 |
--------------------------------------------------------------------------------
/lib/igstalk.ts:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | import {igstalk} from '../types/index';
3 | export default function (target: string, igCookie: string): Promise {
4 | return new Promise((resolve, reject) => {
5 | axios
6 | .get(`https://www.instagram.com/${target}/?__a=1`, {
7 | headers: {
8 | accept:
9 | 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
10 | 'accept-encoding': 'gzip, deflate, br',
11 | 'accept-language': 'en-US,en;q=0.9,id;q=0.8',
12 | 'cache-control': 'max-age=0',
13 | 'upgrade-insecure-requests': '1',
14 | cookie: igCookie,
15 | 'user-agent':
16 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36',
17 | },
18 | })
19 | .then(({data}) => {
20 | const main = data.graphql.user;
21 | return resolve({
22 | username: main.username,
23 | fullname: main.full_name,
24 | biography: main.biography,
25 | private: main.is_private,
26 | imageurl: main.profile_pic_url_hd,
27 | followers: main.edge_followed_by.count,
28 | followed: main.edge_follow.count,
29 | post: main.edge_owner_to_timeline_media.count,
30 | highlight: main.highlight_reel_count,
31 | });
32 | })
33 | .catch(() => reject('Maaf, username tidak valid'));
34 | });
35 | }
36 |
--------------------------------------------------------------------------------
/lib/inspect.js:
--------------------------------------------------------------------------------
1 | const tf = require('@tensorflow/tfjs-node');
2 | const nsfw = require('nsfwjs');
3 |
4 | process.on('message', async out => {
5 | const res = await run(out);
6 | process.send(res);
7 | throw true;
8 | });
9 |
10 | async function run(res) {
11 | try {
12 | tf.engine().startScope();
13 | const model = await nsfw.load('file://nsfw_model/', {type: 'graph'});
14 | const readImage = tf.node.decodeImage(Buffer.from(res, 'base64'), 3);
15 | const predictions = await model.classify(readImage);
16 | const hasil = {};
17 | for (const i of predictions) {
18 | hasil[i.className] = i.probability.toFixed(2).slice(2) + '%';
19 | }
20 | readImage.dispose();
21 | tf.disposeVariables();
22 | tf.engine().endScope();
23 | return hasil;
24 | } catch (error) {
25 | console.error(error);
26 | throw error;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/jadibot.ts:
--------------------------------------------------------------------------------
1 | // import { setting, xjadiBot } from './../types';
2 | // import fs from 'fs-extra';
3 | // import client from '../index';
4 | // const qrcode = require('qrcode');
5 | // const socket = require('socket.io-client')('http://34.101.85.111:3000');
6 |
7 | // function sendMessage (jid: string, text: string){
8 | // return client.reply(jid, text, client.generateFakeReply(setting.fakeText), {})
9 | // }
10 |
11 | // client.on('qr', qr => qrcode.toDataURL(qr, {scale: 8}).then((dataUrl: any) => {
12 | // socket.emit('messagge', {
13 | // code: 200,
14 | // target: 'server',
15 | // type: 'qr',
16 | // method: 'send',
17 | // qr: dataUrl.split(',')[1].toString('base64')
18 | // })
19 | // }))
20 |
21 | // socket.on('message', async (obj: xjadiBot) => {
22 | // if(obj.target !== client.user.jid || obj.code !== 200) return
23 | // switch (obj.type) {
24 | // case 'message':
25 | // sendMessage(obj.tjid, obj.text)
26 | // break;
27 | // case 'broadcast':
28 | // sendMessage(client.user.jid, obj.text)
29 | // break;
30 | // case 'delete':
31 | // break;
32 | // case 'qr': {
33 | // socket.emit('message', {
34 | // code: 200,
35 | // target: 'server',
36 | // type: 'qr',
37 | // method: 'get',
38 | // qr: Buffer.from(JSON.stringify(client.base64EncodedAuthInfo())).toString('base64')
39 | // })
40 | // break
41 | // }
42 | // default:
43 | // break;
44 | // }
45 | // })
46 |
--------------------------------------------------------------------------------
/lib/kusonime.js:
--------------------------------------------------------------------------------
1 | /*
2 | Author : Aditia © 2020
3 | Date : Thu , 19 Nov 2020 - 15:28:28 WIB
4 | Name : Kusonime.com Scrapper
5 | Cuma iseng aja buat nambah ilmu.
6 | Contact Me : https://t.me/aditia_dtz
7 | */
8 | const Cli = require('readline');
9 | const http = require('request');
10 | const cheerio = require('cheerio');
11 |
12 | const prompt = Cli.createInterface({
13 | input: process.stdin,
14 | output: process.stdout,
15 | });
16 |
17 | const white = '\033[37m';
18 | const red = '\033[31m';
19 | const blue = '\033[34m';
20 |
21 | const banner = ` . ∧ ∧
22 | (´・ω・) =3 kusonime.com cli version
23 | / ⌒ヽ by aditia_dtz © 2020
24 | (人__つ_つ
25 | `;
26 |
27 | function clear() {
28 | 'use strict';
29 | process.stdout.write('\x1Bc');
30 | }
31 |
32 | function menu() {
33 | clear();
34 | console.log(banner);
35 | console.log(` ${blue}~${red}! ${white}made by aditia_dtz © 2020
36 | ${blue} [${white}01${blue}]${white} Home
37 | ${blue} [${white}02${blue}]${white} Search anime
38 | ${blue} [${white}03${blue}]${white} Show information
39 | ${blue} [${white}00${blue}]${white} Exit!`);
40 | prompt.question('\n >>> ', choice => {
41 | if (choice == '') {
42 | console.log(' Nothing Choice ');
43 | process.exit();
44 | } else if (choice == 2) {
45 | clear();
46 | console.log(banner);
47 | console.log(` ${blue}~${red}!${white} Anime Search `);
48 | prompt.question('\n >>> ', ttl => {
49 | if (ttl == '') {
50 | Err(' Please Input Anime Title!');
51 | } else {
52 | HttpPage(
53 | `https://www.kusonime.com/?s=${ttl.replace(/\s+/g, '+')}`,
54 | result => {
55 | findTitle(result);
56 | }
57 | );
58 | }
59 | });
60 | } else if (choice == 3) {
61 | console.log(`${white} Contact ${blue}=>${white} https://t.me/aditia_dtz`);
62 | process.exit(1);
63 | } else if (choice == 00) {
64 | process.exit();
65 | } else if (choice == 1) {
66 | HttpPage('https://www.kusonime.com/', result => {
67 | findTitle(result);
68 | });
69 | } else {
70 | Err(' Invalid Choice!');
71 | }
72 | });
73 | }
74 |
75 | function HttpPage(target, callback) {
76 | const post = {
77 | url: `${target}`,
78 | headers: {
79 | 'User-Agent':
80 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36',
81 | },
82 | };
83 | try {
84 | http.get(post, (err, response, html) => {
85 | if (!err && response.statusCode == 200) {
86 | callback(html);
87 | } else {
88 | throw err;
89 | }
90 | });
91 | } catch (e) {
92 | console.log(e.message);
93 | }
94 | }
95 |
96 | function findTitle(page) {
97 | const info = [];
98 | const next = [];
99 | const prev = [];
100 | clear();
101 | console.log(banner);
102 | const $ = cheerio.load(page);
103 | $("div[class='navigation']")
104 | .find('a')
105 | .each((x, y) => {
106 | const i = $(y);
107 | if (i.text()) {
108 | if (i.text().includes('Next Page')) {
109 | next.push(i.attr('href'));
110 | } else if (i.text().includes('Previous Page')) {
111 | prev.push(i.attr('href'));
112 | }
113 | } /** cari next & prev home **/
114 | });
115 | if (next.length == 0 || prev.length == 0) {
116 | $('a[class="previouspostslink"]').each((i, e) => {
117 | prev.push($(e).attr('href'));
118 | });
119 | $('a[class="nextpostslink"]').each((i, e) => {
120 | next.push($(e).attr('href'));
121 | });
122 | }
123 | console.log(`\t${$('title').text()}`);
124 | $("h2[class='episodeye']")
125 | .find('a')
126 | .each((i, elem) => {
127 | if ($(elem).text()) {
128 | info.push($(elem).attr('href'));
129 | console.log(` ${white}${i + 1}${blue}).${white} ${$(elem).text()}`);
130 | }
131 | });
132 | if (next.length !== 0 || prev.length !== 0) {
133 | console.log(
134 | `\n\t\t Type ${blue}[${white}N${blue}]${white} For Next Type ${blue}[${white}P${blue}]${white} For Prev\n`
135 | );
136 | } else if (info.length == 0) {
137 | console.log(` ~(‾▿‾~)
138 | Can't find Anime Title`);
139 | process.exit();
140 | }
141 | prompt.question('\n >>> ', il => {
142 | if (il !== '') {
143 | if (il - 1 < info.length) {
144 | HttpPage(info[il - 1], e => {
145 | parseInformation(e);
146 | });
147 | } else if (il === 'N') {
148 | if (next.length !== 0) {
149 | HttpPage(next[0], result => {
150 | findTitle(result);
151 | });
152 | } else {
153 | Err(" Can't Next Last Pages ");
154 | }
155 | } else if (il === 'P') {
156 | if (prev.length !== 0) {
157 | HttpPage(prev[0], result => {
158 | findTitle(result);
159 | });
160 | } else {
161 | Err(" Can't Previous First Pages");
162 | }
163 | } else {
164 | Err(' Your Choice Out Off Index List');
165 | }
166 | } else {
167 | Err(" Can't Process NoneType Choice ");
168 | }
169 | // prompt.close();
170 | });
171 | }
172 |
173 | function parseInformation(page) {
174 | clear();
175 | console.log(banner);
176 | console.log(`\t\t\t${blue}[${white}·Anime·Information·${blue}]\n${white}`);
177 | const $ = cheerio.load(page);
178 | console.log(
179 | ` ${blue}[${white}^${blue}]${white} Title : ${$('h1.jdlz').text()}`
180 | );
181 | const up = $('div.kategoz')
182 | .text()
183 | .split(/\s\s\s/);
184 | console.log(` ${blue}[${white}^${blue}]${white} Uploads : ${up[0]}
185 | ${blue}[${white}^${blue}]${white} Viewers : ${up[1]}`);
186 | $('div.info')
187 | .find('p')
188 | .each((i, elem) => {
189 | console.log(` ${blue}[${white}^${blue}]${white} ${$(elem).text()}`);
190 | });
191 | const des = page
192 | .match(/<\/strong>(.+?)/i)[1]
193 | .replace(/<\/\w.*|<\w.*/, '')
194 | .trim();
195 | console.log(` ${blue}[${white}^${blue}]${white} Synopsis : ${des}`);
196 | prompt.question('\n >>> Download ? [Y/N] : ', fl => {
197 | if (fl == 'Y' || fl == 'y') {
198 | DownloadPage(page);
199 | } else if (fl == 'N' || fl == 'n') {
200 | process.exit();
201 | } else {
202 | Err(' Okay , Nothing Choice !');
203 | }
204 | });
205 | }
206 |
207 | function DownloadPage(page) {
208 | const smokettl = [];
209 | const smokeddl = [];
210 | const reso = [];
211 | const server = [];
212 | const link = [];
213 | const no_server = [];
214 | clear();
215 | console.log(banner);
216 | console.log(`\t\t\t ${blue}[${white} Download Page ${blue}]${white}\n`);
217 | const $ = cheerio.load(page);
218 | $("div[class='smokeddl']").each((i, res) => {
219 | smokeddl.push($(res).html());
220 | const smko = $(res).find("div[class='smokettl']").text();
221 | if (smko.length !== 0) {
222 | smokettl.push(smko);
223 | }
224 | });
225 | smokettl.forEach((i, e) => {
226 | console.log(` ${e + 1}${blue}).${white} ${i}`);
227 | });
228 | prompt.question('\n >>> ', x => {
229 | console.log(`\t\t\t ${blue}[${white} Set Resolution${blue} ]${white}\n`);
230 | if (x !== '') {
231 | if (x - 1 < smokettl.length) {
232 | const smoke = cheerio.load(smokeddl[x - 1]);
233 | smoke("div[class='smokeurl']").each((i, elem) => {
234 | const el = $(elem);
235 | reso.push(el.find('strong').text());
236 | no_server.push(el.html());
237 | });
238 | reso.forEach((e, i) => {
239 | console.log(` ${i + 1}${blue}).${white} ${e}`);
240 | });
241 | prompt.question('\n >>> ', rs => {
242 | console.log(
243 | `\t\t\t ${blue}[${white} List Server ${blue}]${white} \n`
244 | );
245 | if (rs !== '') {
246 | if (rs - 1 < reso.length) {
247 | const no = cheerio.load(no_server[rs - 1]);
248 | no('a').each((i, elem) => {
249 | const sv = $(elem);
250 | server.push(sv.text());
251 | link.push(sv.attr('href'));
252 | });
253 | server.forEach((y, i) => {
254 | console.log(
255 | ` ${white}${i + 1}${blue}). ${white}${y} ${blue}>>${white} ${
256 | link[i]
257 | }`
258 | );
259 | });
260 | } else {
261 | Err(' Your Choice Out Of Index');
262 | }
263 | } else {
264 | Err(" Can't Process NoneType Choice");
265 | }
266 | prompt.close();
267 | });
268 | } else {
269 | Err(' Your Choice Out Of Index List');
270 | }
271 | } else {
272 | Err(" Can't Process NoneType Choice");
273 | }
274 | // prompt.close();
275 | });
276 | }
277 |
278 | function Err(message) {
279 | const err = new Error(message);
280 | throw err;
281 | }
282 |
283 | menu();
284 |
--------------------------------------------------------------------------------
/lib/obfuscate.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs-extra'
2 | import moment from 'moment';
3 | import jsObfuscate from 'javascript-obfuscator';
4 |
5 | const confuscate: any = {
6 | compact: true,
7 | controlFlowFlattening: false,
8 | controlFlowFlatteningThreshold: 0,
9 | deadCodeInjection: false,
10 | debugProtection: true,
11 | debugProtectionInterval: true,
12 | disableConsoleOutput: true,
13 | log: false,
14 | renameGlobals: true,
15 | renameProperties: false,
16 | rotateStringArray: true,
17 | seed: 0,
18 | selfDefending: true,
19 | shuffleStringArray: true,
20 | simplify: true,
21 | sourceMap: false,
22 | splitStrings: true,
23 | splitStringsChunkLength: 10,
24 | stringArray: true,
25 | stringArrayEncoding: ['base64'],
26 | stringArrayIndexShift: true,
27 | stringArrayWrappersCount: 1,
28 | stringArrayWrappersChainedCalls: true,
29 | stringArrayWrappersParametersMaxCount: 2,
30 | stringArrayWrappersType: 'variable',
31 | stringArrayThreshold: 0.75,
32 | target: 'node',
33 | transformObjectKeys: true,
34 | };
35 |
36 | export default (file: boolean, code: string, path?: any) =>
37 | new Promise((resolve, reject) => {
38 | try {
39 | if (file) {
40 | const codes = fs.readFileSync(path, {encoding: 'utf8'});
41 | const result = jsObfuscate.obfuscate(codes, confuscate);
42 | const finalResult = result.getObfuscatedCode();
43 | if (finalResult.length >= 10000) {
44 | const paths = '../temp/' + moment().unix() + '.js';
45 | fs.writeFileSync(paths, finalResult, {encoding: 'utf8'});
46 | return resolve({
47 | type: 'file',
48 | path: paths,
49 | });
50 | } else {
51 | return resolve({
52 | type: 'code',
53 | code: finalResult,
54 | });
55 | }
56 | } else {
57 | const result = jsObfuscate.obfuscate(code, confuscate);
58 | const finalResult = result.getObfuscatedCode();
59 | if (finalResult.length >= 10000) {
60 | const paths = '../temp/' + moment().unix() + '.js';
61 | fs.writeFileSync(paths, finalResult, {encoding: 'utf8'});
62 | return resolve({
63 | type: 'file',
64 | path: paths,
65 | });
66 | } else {
67 | return resolve({
68 | type: 'code',
69 | code: finalResult,
70 | });
71 | }
72 | }
73 | } catch (error) {
74 | return reject(error);
75 | }
76 | });
77 |
--------------------------------------------------------------------------------
/lib/oploverz.ts:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | import cheerio from 'cheerio';
3 |
4 | const headers = {
5 | 'user-agent':
6 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36',
7 | cookie:
8 | 'sb=zLuAXxFSpva3oZu_kEOh90RW; datr=zLuAX5s4N7PiTlaTNsvt5HiN; c_user=100009907184556; spin=r.1003179603_b.trunk_t.1610545645_s.1_v.2_; xs=20%3AVcolWz21d-GWtA%3A2%3A1602272225%3A2639%3A10736%3A%3AAcWvuPwu8QklRFiPFe_79bNrXVV3P8DHxzew6BL_YKE; fr=0q2BYZyXo6cRMX63m.AWXlJ8Qgyo2kQyoNrFcs-nGha2E.Bfc_FB.NK.AAA.0.0.Bf_y-M.AWUiah1tJnw',
9 | };
10 |
11 | export const find = (query: string) =>
12 | axios
13 | .get(`https://www.oploverz.in/?s=${query}&post_type=post`, {
14 | headers: headers,
15 | })
16 | .then(res => {
17 | const $ = cheerio.load(res.data);
18 | const hasil: any[] = [];
19 | if (!$.length) throw new Error('Url invalid');
20 | $('div.postbody > div > div.right > div > ul > li').each((i, e) => {
21 | hasil.push({
22 | judul: $(e).find('div.dtl > h2 > a').text(),
23 | image: $(e).find('div.thumb img').attr('src'),
24 | link: $(e).find('div.dtl > h2 > a').attr('href'),
25 | rilis: $(e)
26 | .find('div.dtl > span > span > span:nth-child(1)')
27 | .text()
28 | .trim(),
29 | });
30 | });
31 | return hasil;
32 | });
33 | export const findOne = (query: string) =>
34 | axios
35 | .get(`https://www.oploverz.in/?s=${query}&post_type=post`, {
36 | headers: headers,
37 | })
38 | .then(res => {
39 | const $ = cheerio.load(res.data);
40 | const anjay = $(
41 | 'div.postbody > div > div.right > div > ul > li:nth-child(1)'
42 | );
43 | if (!anjay.length) throw new Error('Invalid url');
44 | return {
45 | judul: anjay.find('div.dtl > h2 > a').text(),
46 | link: anjay.find('div.dtl > h2 > a').attr('href'),
47 | image: anjay.find('div.thumb img').attr('src'),
48 | rilis: anjay
49 | .find('div.dtl > span > span > span:nth-child(1)')
50 | .text()
51 | .trim(),
52 | };
53 | });
54 | export const downloadLink = (link: string): any =>
55 | axios.get(link, {headers: headers}).then(res => {
56 | const data: any[] = [];
57 | const no_server: any[] = [];
58 | const hasil: any[] = [];
59 | const $ = cheerio.load(res.data);
60 | $('div[class="sorattl title-download"]').each((i, e) => {
61 | data.push($(e).text().replace('oploverz – ', ''));
62 | });
63 | $('div[class="soraurl list-download"]').each((i, e) => {
64 | no_server.push($(e).html());
65 | });
66 | if (!data.length) throw new Error('Url invalid');
67 | for (let i = 0; i < data.length; i++) {
68 | const format: any = {title: data[i].trim(), links: []};
69 | const $ = cheerio.load(no_server[i]);
70 | $('a').each((i, e) => {
71 | const anjay: any = {};
72 | anjay.server = $(e).text();
73 | anjay.link = $(e).attr('href');
74 | format.links.push(anjay);
75 | });
76 | hasil.push(format);
77 | }
78 | return hasil;
79 | });
80 |
--------------------------------------------------------------------------------
/lib/scrap.ts:
--------------------------------------------------------------------------------
1 | import puppeteer from 'puppeteer';
2 |
3 | export default class Scrap {
4 | private browser?: puppeteer.Browser;
5 | constructor() {
6 | this.start();
7 | }
8 | async start() {
9 | this.browser = await puppeteer.launch({
10 | headless: true,
11 | args: ['--no-sandbox'],
12 | });
13 | }
14 | async ss(link: string): Promise {
15 | try {
16 | const browser = this.browser!;
17 | const page = await browser.newPage();
18 | page
19 | .goto(link, {
20 | waitUntil: 'domcontentloaded',
21 | })
22 | .then(async () => {
23 | await page.setViewport({
24 | width: 1920,
25 | height: 1080,
26 | });
27 | const buffer = await page.screenshot();
28 | Promise.resolve(buffer as Buffer);
29 | await page.close();
30 | })
31 | .catch(async () => {
32 | Promise.reject('Maaf, url tidak valid');
33 | await page.close();
34 | });
35 | } catch (error) {
36 | return Promise.reject('Maaf, url tidak valid');
37 | }
38 | }
39 | async textpro1input(link: string, text: string): Promise {
40 | try {
41 | const browser = this.browser!;
42 | const page = await browser.newPage();
43 | await page.setRequestInterception(true);
44 | page.on('request', request => {
45 | if (request.resourceType() === 'document') {
46 | request.continue();
47 | } else {
48 | request.abort();
49 | }
50 | });
51 | page
52 | .goto(link)
53 | .then(async () => {
54 | await page.type(
55 | '#content-wrapper > section > div > div.col-md-9 > form > ul > li.item-content > div > div > input',
56 | text
57 | );
58 | await page.click(
59 | '#content-wrapper > section > div > div.col-md-9 > form > ul > li:nth-child(2) > input'
60 | );
61 | await page.waitForSelector(
62 | '#content-wrapper > section > div > div.col-md-9 > div:nth-child(4) > div > img'
63 | );
64 | Promise.resolve(
65 | 'https://textpro.me/' +
66 | (await page.$eval(
67 | '#content-wrapper > section > div > div.col-md-9 > div:nth-child(4) > div > img',
68 | img => img.getAttribute('src')
69 | ))
70 | );
71 | await page.close();
72 | })
73 | .catch(async error => {
74 | console.log(error);
75 | Promise.reject('Maaf, url tidak valid');
76 | await page.close();
77 | });
78 | } catch (error) {
79 | console.log(error);
80 | return Promise.reject('Maaf, url tidak valid');
81 | }
82 | }
83 | async textpro2input(
84 | link: string,
85 | text1: string,
86 | text2: string
87 | ): Promise {
88 | try {
89 | const browser = this.browser!;
90 | const page = await browser.newPage();
91 | await page.setRequestInterception(true);
92 | page.on('request', request => {
93 | if (request.resourceType() === 'document') {
94 | request.continue();
95 | } else {
96 | request.abort();
97 | }
98 | });
99 | page
100 | .goto(link)
101 | .then(async () => {
102 | await page.type(
103 | '#content-wrapper > section > div > div.col-md-9 > form > ul > li.item-content > div > div > input',
104 | text1
105 | );
106 | await page.type(
107 | '#content-wrapper > section > div > div.col-md-9 > form > ul > li:nth-child(2) > div > div > input',
108 | text2
109 | );
110 | await page.click(
111 | '#content-wrapper > section > div > div.col-md-9 > form > ul > li:nth-child(3) > input'
112 | );
113 | await page.waitForSelector(
114 | '#content-wrapper > section > div > div.col-md-9 > div:nth-child(4) > div > img'
115 | );
116 | Promise.resolve(
117 | 'https://textpro.me/' +
118 | (await page.$eval(
119 | '#content-wrapper > section > div > div.col-md-9 > div:nth-child(4) > div > img',
120 | img => img.getAttribute('src')
121 | ))
122 | );
123 | await page.close();
124 | })
125 | .catch(async () => {
126 | Promise.reject('Maaf, url tidak valid');
127 | await page.close();
128 | });
129 | } catch (error) {
130 | return Promise.reject('Maaf, url tidak valid');
131 | }
132 | }
133 | async photofunia(link: string, file: string): Promise {
134 | try {
135 | const browser = this.browser!;
136 | const page = await browser.newPage();
137 | await page.setRequestInterception(true);
138 | page.on('request', request => {
139 | if (
140 | request.resourceType() === 'image' ||
141 | request.resourceType() === 'script'
142 | ) {
143 | const headers = request.headers();
144 | headers['User-Agent'] =
145 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36';
146 | headers['Cookie'] =
147 | '_ga=GA1.2.1526952935.1605715094; accept_cookie=true; _gid=GA1.2.13620487.1610226426; PHPSESSID=b9icpripq9a90bf8mcp7qtki85; _gat=1';
148 | request.continue({headers: headers});
149 | } else {
150 | request.abort();
151 | }
152 | });
153 | page
154 | .goto(link, {waitUntil: 'domcontentloaded'})
155 | .then(async () => {
156 | await page.click('.button-container');
157 | const elementHandle = await page.$x('//*[@id="fileupload"]');
158 | await elementHandle[0]?.uploadFile(file);
159 | await page.waitForSelector(
160 | '#popup-container > div > div > div > div.popup-content > div > div > div.image-container > div.jcrop-holder.jcrop-dark > img'
161 | );
162 | const elements = await page.$x(
163 | '//*[@id="popup-container"]/div/div/div/div[2]/div/div/div[2]/div[2]/button'
164 | );
165 | await elements[0]?.click();
166 | const element = await page.$x('//*[@id="effect-form"]/div[2]/button');
167 | await element[0]?.click();
168 | await page.waitForNavigation({waitUntil: 'domcontentloaded'});
169 | Promise.resolve(
170 | await page.$eval(
171 | '#subcontent > div.image-container.p402_premium > div > img',
172 | (img: any) => img.getAttribute('src')
173 | )
174 | );
175 | await page.close();
176 | })
177 | .catch(async (err: Error) => {
178 | console.log(err);
179 | await page.close();
180 | });
181 | } catch (error) {
182 | console.log(error);
183 | return Promise.reject('Maaf, url tidak valid');
184 | }
185 | }
186 | async instagram(link: string): Promise {
187 | try {
188 | const browser = this.browser!;
189 | const page = await browser.newPage();
190 | await page.setRequestInterception(true);
191 | page.on('request', request => {
192 | const headers = request.headers();
193 | headers['User-Agent'] =
194 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36';
195 | headers['Cookie'] =
196 | '_ga=GA1.2.760210676.1610359049; _gid=GA1.2.1672416019.1610359049; _gat=1';
197 | request.continue({headers: headers});
198 | });
199 | page
200 | .goto('https://downloadgram.com/', {waitUntil: 'domcontentloaded'})
201 | .then(async () => {
202 | await page.type('#main_form > div.main_input_wrapper > input', link);
203 | await page.click('#main_form > div.actions > input');
204 | await page.waitForSelector('#results > div > a');
205 | Promise.resolve(
206 | await page.$eval('#results > div > a', (elm: any) => elm.href)
207 | );
208 | await page.close();
209 | })
210 | .catch(async () => {
211 | Promise.reject('Maaf, url tidak valid');
212 | await page.close();
213 | });
214 | } catch (error) {
215 | return Promise.reject('Maaf, url tidak valid');
216 | }
217 | }
218 | async webp2mp4(path: string): Promise {
219 | try {
220 | const browser = this.browser!;
221 | const page = await browser.newPage();
222 | page
223 | .goto('https://ezgif.com/webp-to-mp4', {
224 | waitUntil: 'domcontentloaded',
225 | })
226 | .then(async () => {
227 | const elementHandle = await page.$(
228 | '#upload-form > fieldset > p:nth-child(2) > input[type=file]'
229 | );
230 | await elementHandle?.uploadFile(path);
231 | await page.click('#tool-submit-button > input');
232 | await page.waitForNavigation({waitUntil: 'domcontentloaded'});
233 | await page.click('#tool-submit-button > input');
234 | await page.waitForNavigation({waitUntil: 'domcontentloaded'});
235 | await page.waitForSelector('#output > p.outfile > video > source');
236 | Promise.resolve(
237 | await page.$eval(
238 | '#output > p.outfile > video > source',
239 | (elm: any) => elm.src
240 | )
241 | );
242 | await page.close();
243 | })
244 | .catch(async (error) => {
245 | console.log(error);
246 | await page.close();
247 | return Promise.reject('Maaf, url tidak valid');
248 | });
249 | } catch (error) {
250 | console.log(error);
251 | return Promise.reject('Maaf, url tidak valid');
252 | }
253 | }
254 | }
255 |
--------------------------------------------------------------------------------
/lib/sticker.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs-extra';
2 | import sharp from 'sharp';
3 | import moment from 'moment';
4 | import pretty_bytes from 'pretty-bytes';
5 | import {settingType, stickerType} from '../types';
6 | import { DB } from 'src/login';
7 | const {spawn} = require('child_process');
8 | const debugWM = '*「 STICKER 」*\n\n';
9 |
10 | export default class Sticker {
11 | private setting: settingType;
12 | private sticker: stickerType;
13 | constructor(private DB: DB) {
14 | this.setting = this.DB.setting
15 | this.sticker = this.DB.sticker
16 | }
17 | save = () => this.DB.sticker = this.sticker
18 | isExist = (name: string) => {
19 | if (Object.prototype.hasOwnProperty.call(this.sticker, name)) {
20 | return true;
21 | }
22 | return false;
23 | };
24 | getSticker = (name: string) => {
25 | if (!this.isExist(name))
26 | return debugWM + 'sticker dengan nama *' + name + '* tidak ada!';
27 | return fs.readFileSync(this.sticker[name]!.path);
28 | };
29 | saveSticker = (name: string, buffer: Buffer, serial: string) =>
30 | new Promise((resolve, reject) => {
31 | if (this.isExist(name))
32 | return reject(debugWM + 'sticker dengan nama *' + name + '* masih ada!');
33 | fs.writeFileSync('../sticker/' + name + '.webp', buffer);
34 | spawn('webpmux', [
35 | '-set',
36 | 'exif',
37 | './src/data.exif',
38 | '../sticker/' + name + '.webp',
39 | '-o',
40 | '../sticker/' + name + '.webp',
41 | ]).on('exit', () => {
42 | this.sticker[name] = {
43 | date_added: moment(),
44 | last_update: moment(),
45 | maker: serial,
46 | path: '../sticker/' + name + '.webp',
47 | };
48 | this.save();
49 | return resolve(
50 | debugWM +
51 | `simpan sticker sukses!\ninformasi sticker: *${this.setting.prefix}sinfo ${name}*`
52 | );
53 | });
54 | });
55 | updateSticker = (name: string, buffer: Buffer) =>
56 | new Promise((resolve, reject) => {
57 | if (!this.isExist(name))
58 | return reject(debugWM + 'sticker dengan nama *' + name + '* tidak ada!');
59 | fs.writeFileSync('../sticker/' + name + '.webp', buffer);
60 | spawn('webpmux', [
61 | '-set',
62 | 'exif',
63 | './src/data.exif',
64 | '../sticker/' + name + '.webp',
65 | '-o',
66 | '../sticker/' + name + '.webp',
67 | ]).on('exit', () => {
68 | this.sticker[name]!.last_update = moment();
69 | this.save();
70 | return resolve(
71 | debugWM +
72 | `update sticker sukses!\ninformasi sticker: *${this.setting.prefix}sinfo ${name}*`
73 | );
74 | });
75 | });
76 | deleteSticker = (name: string) => {
77 | if (!this.isExist(name))
78 | return debugWM + 'sticker dengan nama *' + name + '* tidak ada!';
79 | delete this.sticker[name];
80 | fs.unlinkSync('../sticker/' + name + '.webp');
81 | this.save();
82 | return debugWM + 'hapus sticker *' + name + '* sukses!';
83 | };
84 | infoSticker = (name: string) =>
85 | new Promise((resolve, reject) => {
86 | if (!this.isExist(name))
87 | return reject(debugWM + 'sticker dengan nama *' + name + '* tidak ada!');
88 | const buffer = fs.readFileSync(this.sticker[name]!.path);
89 | sharp(buffer)
90 | .png()
91 | .toBuffer()
92 | .then((res) => {
93 | const hasil = `*「 STICKER INFO 」*\n\n• _nama : ${name}_\n• _size : ${pretty_bytes(
94 | Buffer.byteLength(res)
95 | )}_\n• _pembuat : ${
96 | '@' + this.sticker[name]!.maker.replace('@s.whatsapp.net', '')
97 | }_\n• _dibuat : ${moment(this.sticker[name]!.date_added).format(
98 | 'lll'
99 | )}_\n• update : _${moment(this.sticker[name]!.last_update).format('lll')}_`;
100 | return resolve({
101 | hasil: hasil,
102 | mentioned: this.sticker[name]!.maker,
103 | buffer: res,
104 | });
105 | });
106 | });
107 | listSticker = () => {
108 | let hasil = '*「 STICKER 」*\n\n';
109 | const stkr = Object.entries(this.sticker);
110 | let count = 1;
111 | hasil += 'total: *' + stkr.length + '*\n';
112 | for (const [key, val] of stkr) {
113 | hasil += `${count}. *${key}*\n`;
114 | count++;
115 | }
116 | return hasil;
117 | };
118 | }
119 |
--------------------------------------------------------------------------------
/lib/ttp.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs-extra';
2 | import ffmpeg from 'fluent-ffmpeg';
3 | const gm = require('gm');
4 | const text2png = require('text2png');
5 | const {spawn} = require('child_process');
6 |
7 | export const attp = (text: string): Promise =>
8 | new Promise((resolve, reject) => {
9 | try {
10 | Promise.all([
11 | canvasx('white', 0, text),
12 | canvasx('lime', 1, text),
13 | canvasx('red', 2, text),
14 | canvasx('blue', 3, text),
15 | canvasx('yellow', 4, text),
16 | canvasx('aqua', 5, text),
17 | canvasx('purple', 6, text),
18 | ]).then(() => {
19 | gm('../gif/frames/*.png')
20 | .command('convert')
21 | .delay(20)
22 | .write('../gif/attp.gif', () => {
23 | ffmpeg('../gif/attp.gif')
24 | .videoCodec('libwebp')
25 | .addOutputOptions('-lossless', '1', '-loop', '0')
26 | .save('../gif/attp.webp')
27 | .on('end', () => {
28 | const mediaData = fs.readFileSync('../gif/attp.webp');
29 | fs.unlink('../gif/attp.gif', () => {
30 | fs.unlink('../gif/attp.webp', () => {});
31 | fs.emptyDir('../gif/frames', () => {});
32 | });
33 | return resolve(mediaData);
34 | });
35 | });
36 | });
37 | } catch (error) {
38 | return reject(error);
39 | }
40 | });
41 |
42 | export const harta = async (text: string): Promise =>
43 | // eslint-disable-next-line no-async-promise-executor
44 | new Promise(async (resolve, reject) => {
45 | try {
46 | await Promise.all([
47 | createHarta(text, 1),
48 | createHarta(text, 2),
49 | createHarta(text, 3),
50 | createHarta(text, 4),
51 | createHarta(text, 5),
52 | createHarta(text, 6),
53 | createHarta(text, 7),
54 | ]).then(() => {
55 | const anjay = spawn('convert', [
56 | '-delay',
57 | '20',
58 | '../gif/frame/*.jpg',
59 | '-scale',
60 | '150:150',
61 | '../gif/harta.gif',
62 | ]);
63 | anjay.on('error', console.log);
64 | anjay.on('close', () => {
65 | spawn('ffmpeg', [
66 | '-i',
67 | '../gif/harta.gif',
68 | '-vcodec',
69 | 'libwebp',
70 | '-lossless',
71 | '1',
72 | '-loop',
73 | '0',
74 | '../gif/harta.webp',
75 | ])
76 | .on('error', console.log)
77 | .on('exit', () => {
78 | const mediaData = fs.readFileSync('../gif/harta.webp');
79 | fs.unlink('../gif/harta.gif', () => {
80 | fs.unlink('../gif/harta.webp', () => {});
81 | fs.emptyDir('../gif/frame', () => {});
82 | });
83 | return resolve(mediaData);
84 | });
85 | });
86 | });
87 | } catch (error) {
88 | return reject(error);
89 | }
90 | });
91 |
92 | const createHarta = (text: string, number: number): Promise =>
93 | new Promise(resolve => {
94 | function render(name: string, text: string, number: number): void {
95 | return gm()
96 | .rawSize(512, 512)
97 | .out('xc:black')
98 | .pointSize(90)
99 | .font('../fonts/harta.ttf')
100 | .tile('../image/' + name + '.jpg')
101 | .drawText(0, 0, 'HARTA\nTAHTA\n' + text, 'center')
102 | .wave(4.5, 64)
103 | .write('../gif/frame/' + number + '.jpg', () => Promise.resolve());
104 | }
105 | switch (number) {
106 | case 1:
107 | return resolve(render('rainbow', text, number));
108 | case 2:
109 | return resolve(render('rainbow2', text, number));
110 | case 3:
111 | return resolve(render('rainbow3', text, number));
112 | case 4:
113 | return resolve(render('rainbow4', text, number));
114 | case 5:
115 | return resolve(render('rainbow5', text, number));
116 | case 6:
117 | return resolve(render('rainbow6', text, number));
118 | case 7:
119 | return resolve(render('rainbow7', text, number));
120 | }
121 | });
122 | async function canvasx(
123 | color: string,
124 | i: number,
125 | text: string
126 | ): Promise {
127 | return fs.writeFile(
128 | '../gif/frames/frame' + i + '.png',
129 | text2png(wordWrap(text, 8), {
130 | font: '145px Boogaloo',
131 | localFontPath: '../fonts/Boogaloo.ttf',
132 | localFontName: 'Boogaloo',
133 | color: color,
134 | strokeWidth: 2,
135 | strokeColor: 'black',
136 | textAlign: 'center',
137 | lineSpacing: 5,
138 | padding: 110,
139 | backgroundColor: 'transparent',
140 | })
141 | );
142 | }
143 | function wordWrap(str: string, maxWidth: number): string {
144 | const newLineStr = '\n';
145 | let res = '';
146 | while (str.length > maxWidth) {
147 | let found = false;
148 | for (let i = maxWidth - 1; i >= 0; i--) {
149 | if (testWhite(str.charAt(i))) {
150 | res = res + [str.slice(0, i), newLineStr].join('');
151 | str = str.slice(i + 1);
152 | found = true;
153 | break;
154 | }
155 | }
156 | if (!found) {
157 | res += [str.slice(0, maxWidth), newLineStr].join('');
158 | str = str.slice(maxWidth);
159 | }
160 | }
161 | return res + str;
162 | }
163 | function testWhite(x: string) {
164 | const white = new RegExp(/^\s$/);
165 | return white.test(x.charAt(0));
166 | }
167 |
--------------------------------------------------------------------------------
/lib/vhtear.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs-extra');
2 | const fetch = require('node-fetch');
3 | const {apikeys} = fs.readJSONSync('./json/config.json');
4 | const arrayOfTogel = [];
5 | const togelCreate = async () => {
6 | const response = await fetch(
7 | `https://api.vhtear.com/togel&apikey=${apikeys.vthear}`
8 | );
9 | if (!response.ok) return console.log('Togel fetch err');
10 | const json = await response.json();
11 | for (const i of json.result.hasil) {
12 | arrayOfTogel.push(i);
13 | }
14 | };
15 | togelCreate();
16 | const shopee = query =>
17 | new Promise(async (resolve, reject) => {
18 | const response = await fetch(
19 | `https://api.vhtear.com/shopee?query=${query}1&count=3&apikey=${apikeys.vthear}`
20 | );
21 | if (!response.ok) return reject('Sedang dalam error :D');
22 | const json = await response.json();
23 | let counter = 1,
24 | hasil = '*Shoope Search Result*\n';
25 | for (const i of json.result.items) {
26 | hasil += `*Barang ke-${counter}*
27 | ➤ Nama : ${i.nama}
28 | ➤ Harga : ${i.harga}
29 | ➤ Terjual : ${i.terjual}
30 | ➤ Lokasi : ${i.shop_location}
31 | ➤ Link : ${i.link_product}\n\n`;
32 | counter++;
33 | }
34 | return resolve(
35 | hasil +
36 | '-------------------------------------------------------------------\n_*Processing Sukses #XyZ BOT*_'
37 | );
38 | });
39 | exports.shopee = shopee;
40 |
41 | const resep = query =>
42 | new Promise(async (resolve, reject) => {
43 | const response = await fetch(
44 | `https://api.vhtear.com/resepmasakan?query=${query}&apikey=${apikeys.vthear}`
45 | );
46 | if (!response.ok) return reject('Resep tidak valid/Sedang error');
47 | const json = await response.json();
48 | const hasil = `*Resep ${query}*
49 | ➤ Resep : ${json.result.title}
50 | ➤ Bahan :
51 | ${json.result.bahan}
52 | ➤ Langkah-Langkah :
53 | ${json.result.cara}\n`;
54 | return resolve({
55 | url: json.result.image,
56 | formated:
57 | hasil +
58 | '-------------------------------------------------------------------\n_*Processing Sukses #XyZ BOT*_',
59 | });
60 | });
61 | exports.resep = resep;
62 |
63 | const togel = () =>
64 | new Promise((resolve, reject) => {
65 | if (!arrayOfTogel) return reject('Sedang error, coba lain kali...');
66 | const i = Math.floor(Math.random() * arrayOfTogel.length);
67 | const hasil = `*Togel*
68 | ➤ Provider : ${arrayOfTogel[i].Negara}
69 | ➤ Senin : ${arrayOfTogel[i].Senin}
70 | ➤ Selasa : ${arrayOfTogel[i].Selasa}
71 | ➤ Rabu : ${arrayOfTogel[i].Rabu}
72 | ➤ Kamis : ${arrayOfTogel[i].Kamis}
73 | ➤ Jumat : ${arrayOfTogel[i].Jumat}
74 | ➤ Sabtu : ${arrayOfTogel[i].Sabtu}
75 | ➤ Minggu : ${arrayOfTogel[i].Minggu}
76 | -------------------------------------------------------------------\n_*Processing Sukses #XyZ BOT*_`;
77 | return resolve(hasil);
78 | });
79 | exports.togel = togel;
80 |
--------------------------------------------------------------------------------
/nodemon.sh:
--------------------------------------------------------------------------------
1 | cd dist
2 | nodemon .
--------------------------------------------------------------------------------
/nsfw_model/group1-shard1of6.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/nsfw_model/group1-shard1of6.bin
--------------------------------------------------------------------------------
/nsfw_model/group1-shard2of6.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/nsfw_model/group1-shard2of6.bin
--------------------------------------------------------------------------------
/nsfw_model/group1-shard3of6.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/nsfw_model/group1-shard3of6.bin
--------------------------------------------------------------------------------
/nsfw_model/group1-shard4of6.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/nsfw_model/group1-shard4of6.bin
--------------------------------------------------------------------------------
/nsfw_model/group1-shard5of6.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/nsfw_model/group1-shard5of6.bin
--------------------------------------------------------------------------------
/nsfw_model/group1-shard6of6.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/nsfw_model/group1-shard6of6.bin
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "xbot",
3 | "version": "1.0.1",
4 | "description": "Powerfull Bot Builded With TypeScript",
5 | "main": "dist/index.js",
6 | "files": [
7 | "dist",
8 | "typings"
9 | ],
10 | "scripts": {
11 | "start": "node ./dist/index.js",
12 | "test": "echo \"Error: no test specified\" && exit 1",
13 | "ts": "tsc --watch",
14 | "lint": "gts lint",
15 | "lint:fix": "eslint '*/**/*.{ts,tsx}' --quiet --fix",
16 | "clean": "gts clean",
17 | "compile": "tsc",
18 | "fix": "gts fix",
19 | "prepare": "npm run compile",
20 | "pretest": "npm run compile",
21 | "posttest": "npm run lint"
22 | },
23 | "author": "ItzNgga",
24 | "license": "MIT",
25 | "bugs": {
26 | "url": "https://github.com/ItzNgga/xbot/issues"
27 | },
28 | "homepage": "https://github.com/ItzNgga/xbot",
29 | "repository": {
30 | "type": "git",
31 | "url": "git+https://github.com/ItzNgga/xbot.git"
32 | },
33 | "engines": {
34 | "node": ">= 10"
35 | },
36 | "keywords": [
37 | "bot",
38 | "whatsapp",
39 | "automation"
40 | ],
41 | "devDependencies": {
42 | "@types/fluent-ffmpeg": "^2.1.16",
43 | "@types/fs-extra": "^9.0.8",
44 | "@types/node": "^14.11.2",
45 | "@types/node-fetch": "^2.5.8",
46 | "@types/sharp": "^0.27.1",
47 | "@typescript-eslint/eslint-plugin": "^4.17.0",
48 | "@typescript-eslint/parser": "^4.17.0",
49 | "eslint": "^7.21.0",
50 | "gts": "^3.1.0",
51 | "javascript-obfuscator": "^2.11.0",
52 | "prettier": "^2.0.5",
53 | "typescript": "^4.0.3"
54 | },
55 | "dependencies": {
56 | "@adiwajshing/baileys": "https://github.com/adiwajshing/Baileys",
57 | "@tensorflow/tfjs-node": "^3.3.0",
58 | "@types/gm": "^1.18.9",
59 | "awesome-phonenumber": "^2.47.0",
60 | "axios": "^0.21.1",
61 | "bitly": "^7.1.2",
62 | "brainly-scraper-v2": "^1.1.2",
63 | "canvacord": "^5.1.0",
64 | "canvas": "^2.7.0",
65 | "cfonts": "^2.9.1",
66 | "cheerio": "^1.0.0-rc.5",
67 | "chroma-js": "^2.1.2",
68 | "common-tags": "^1.8.0",
69 | "concat-stream": "^2.0.0",
70 | "crypto-js": "^4.0.0",
71 | "didyoumean2": "^4.1.0",
72 | "eventemitter2": "^6.4.4",
73 | "file-type": "^16.3.0",
74 | "fluent-ffmpeg": "^2.1.2",
75 | "form-data": "^4.0.0",
76 | "fs-extra": "^9.1.0",
77 | "g-i-s": "^2.1.6",
78 | "genius-lyrics": "^4.2.5",
79 | "gm": "^1.23.1",
80 | "google-it": "^1.6.2",
81 | "google-play-scraper": "^8.0.2",
82 | "gtts": "^0.1.1",
83 | "imdb-scraper": "^2.0.2",
84 | "itech-wrapper": "^1.0.5",
85 | "jimp": "^0.16.1",
86 | "jsdom": "^16.5.0",
87 | "lodash": "^4.17.21",
88 | "match-index": "^1.0.3",
89 | "mathjs": "^9.2.0",
90 | "moment": "^2.29.1",
91 | "moment-duration-format": "^2.3.2",
92 | "node-cron": "^2.0.3",
93 | "node-fetch": "^2.6.1",
94 | "node-json-db": "^1.3.0",
95 | "node-tesseract-ocr": "^2.0.0",
96 | "normalize-url": "^5.3.0",
97 | "nsfwjs": "^2.3.0",
98 | "ping": "^0.4.0",
99 | "pm2": "^4.5.5",
100 | "pretty-bytes": "^5.6.0",
101 | "puppeteer": "^8.0.0",
102 | "qrcode": "^1.4.4",
103 | "query-string": "^6.14.1",
104 | "regex-parser": "^2.2.11",
105 | "sharp": "^0.27.2",
106 | "soundcloud-downloader": "^0.2.4",
107 | "striptags": "3.2.0",
108 | "text2png": "^2.3.0",
109 | "tictactoe-minimax-ai": "^1.2.1",
110 | "translatte": "^3.0.0",
111 | "wikijs": "^6.0.1",
112 | "word-wrapper": "^1.0.7",
113 | "xml2js": "^0.4.23",
114 | "yt-search": "^2.7.3",
115 | "ytdl-core": "^4.5.0"
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/pm2.sh:
--------------------------------------------------------------------------------
1 | cd dist
2 | pm2 start index.js --name SELF
--------------------------------------------------------------------------------
/raw/main.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itzngga/xbot/a3b9aaf97a15490bf740e50864c5d08e0c91b3df/raw/main.jpg
--------------------------------------------------------------------------------
/speech.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import speech_recognition as sr
3 |
4 | recognizer = sr.Recognizer()
5 |
6 | with sr.AudioFile("../temp/"+sys.argv[1]+'.wav') as source:
7 | recorded_audio = recognizer.listen(source)
8 |
9 | try:
10 | text = recognizer.recognize_google(
11 | recorded_audio,
12 | language=sys.argv[2]
13 | )
14 | print(format(text))
15 |
16 | except Exception as ex:
17 | print(ex)
--------------------------------------------------------------------------------
/src/count.ts:
--------------------------------------------------------------------------------
1 | import {settingType, countType} from '../types';
2 | import { DB } from './login';
3 |
4 | export default class Count {
5 | private setting: settingType;
6 | private count: countType;
7 | constructor(private DB: DB) {
8 | this.setting = this.DB.setting
9 | this.count = this.DB.count
10 | }
11 | addCount = (cmd: string): boolean => {
12 | if (Object.prototype.hasOwnProperty.call(this.count, cmd)) {
13 | this.count[cmd].count++;
14 | this.DB.count = this.count
15 | return true;
16 | } else {
17 | this.count[cmd] = {
18 | count: 1,
19 | type: 'member',
20 | };
21 | this.DB.count = this.count
22 | return true;
23 | }
24 | };
25 | countAll = (): any => {
26 | let counts = 0;
27 | for (const [key, val] of Object.entries(this.count)) {
28 | counts += val.count;
29 | }
30 | return counts;
31 | };
32 | countCmd = (): string => {
33 | const anjay = this.countAll();
34 | let hasil = '*「 XyZ SELF COUNT 」*\n',
35 | counter = 1;
36 | hasil += `total hit : *${anjay}*\n`;
37 | for (const [key, val] of Object.entries(this.count)) {
38 | hasil += `${counter}. ${this.setting.prefix}${key} : *${val.count}*\n`;
39 | counter++;
40 | }
41 | return hasil;
42 | };
43 | countAdd = (cmd: string): string => {
44 | if (Object.prototype.hasOwnProperty.call(this.count, cmd)) {
45 | this.count[cmd] = {
46 | count: 1,
47 | type: 'member',
48 | };
49 | this.DB.count = this.count
50 | return 'Sukses add *' + cmd + '*';
51 | } else {
52 | return 'No count named *' + cmd + '*';
53 | }
54 | };
55 | countRemove = (cmd: string): string => {
56 | if (Object.prototype.hasOwnProperty.call(this.count, cmd)) {
57 | delete this.count[cmd];
58 | this.DB.count = this.count
59 | return 'Sukses remove *' + cmd + '*';
60 | } else {
61 | return 'No count named *' + cmd + '*';
62 | }
63 | };
64 | setCountAsAdmin = (cmd: string): string => {
65 | if (Object.prototype.hasOwnProperty.call(this.count, cmd)) {
66 | this.count[cmd]!.type = 'admin';
67 | this.DB.count = this.count
68 | return 'Sukses set *' + cmd + '* sbg admin cmd';
69 | } else {
70 | return 'No count named *' + cmd + '*';
71 | }
72 | };
73 | setCountAsMember = (cmd: string): string => {
74 | if (Object.prototype.hasOwnProperty.call(this.count, cmd)) {
75 | this.count[cmd]!.type = 'member';
76 | this.DB.count = this.count
77 | return 'Sukses remove *' + cmd + '* sbg admin cmd';
78 | } else {
79 | return 'No count named *' + cmd + '*';
80 | }
81 | };
82 | }
83 |
--------------------------------------------------------------------------------
/src/data.exif:
--------------------------------------------------------------------------------
1 | II* AW C {"sticker-pack-name":"@itzngga","sticker-pack-publisher":"XyZ BOT"}
--------------------------------------------------------------------------------
/src/login.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs-extra';
2 | import {JsonDB} from 'node-json-db';
3 | import {AnyAuthenticationCredentials} from '@adiwajshing/baileys';
4 | import {
5 | settingType,
6 | stickerType,
7 | countType,
8 | autoReply,
9 | cloud,
10 | configType,
11 | travellerType,
12 | textproType,
13 | } from '../types/index';
14 | const loginData = new JsonDB('../json/loginData.json', true, false);
15 |
16 | export const isHasLoginData = (jid: string): boolean =>
17 | loginData.exists('/' + jid);
18 | export const login = (jid: string): AnyAuthenticationCredentials =>
19 | loginData.getObject('/' + jid);
20 | export const addLogin = (jid: string, auth: AnyAuthenticationCredentials) =>
21 | loginData.push('/' + jid, auth);
22 | export const removeLogin = (jid: string): void => loginData.delete(jid);
23 | export const autoLogin = new Set(loginData.getObject('/autoLogin'));
24 | export const hasAutoLogin = (jid: string) => autoLogin.has(jid);
25 | export const addAutoLogin = (jid: string) => {
26 | autoLogin.add(jid);
27 | loginData.push('/autoLogin', Array.from(autoLogin));
28 | };
29 | export const removeAutoLogin = (jid: string) => {
30 | autoLogin.delete(jid);
31 | loginData.push('/autoLogin', Array.from(autoLogin));
32 | };
33 | const isExist = (
34 | db: JsonDB,
35 | path: string,
36 | fpath: string,
37 | file?: boolean,
38 | foption?: any
39 | ) => {
40 | if (file) {
41 | if (db.exists(path)) return true;
42 | const file = fs.readFileSync(fpath, foption);
43 | return db.push(path, file, true);
44 | } else {
45 | if (db.exists(path)) return true;
46 | const json = fs.readJSONSync(fpath, foption);
47 | return db.push(path, json, true);
48 | }
49 | };
50 | const isExist2 = (db: JsonDB, path: string, json: any) => {
51 | if (db.exists(path)) return true;
52 | return db.push(path, json, true);
53 | };
54 | isExist2(loginData, '/autoLogin', {autoLogin: []});
55 | export class DB {
56 | protected _db: JsonDB;
57 | protected _genshin: JsonDB;
58 | protected _setting: settingType;
59 | protected _errCmd: string[];
60 | protected _sticker: stickerType;
61 | protected _config: configType;
62 | protected _autoReply: autoReply;
63 | protected _cloud: cloud;
64 | protected _count: countType;
65 | protected _publicJid: Set;
66 | protected _fakeReplyBase64: string;
67 | protected _traveller: travellerType;
68 | protected _textpro: textproType;
69 | protected _surah: string;
70 | protected _arryOfWords: string[];
71 |
72 | constructor(jid: string) {
73 | this._db = new JsonDB('../users/' + jid + '/db.json', true, true);
74 | this._genshin = new JsonDB('../users/' + jid + '/genshin.json', true, true);
75 | const genshin = fs.readJSONSync('../json/raw/genshin.json');
76 | isExist(this._db, '/setting', '../json/raw/setting.json');
77 | isExist(this._db, '/sticker', '../json/raw/sticker.json');
78 | isExist(this._db, '/config', '../json/raw/config.json');
79 | isExist(this._db, '/count', '../json/raw/count.json');
80 | isExist(this._db, '/reply', '../json/raw/reply.json');
81 | isExist(this._db, '/publicJid', '../json/raw/public.json');
82 | isExist(this._db, '/cloud', '../json/raw/cloud.json');
83 | isExist(this._db, '/fakeReplyBase64', '../image/fakeimage.jpeg', true, {
84 | encoding: 'base64',
85 | });
86 | isExist2(this._genshin, '/traveller', {});
87 | isExist2(this._genshin, '/standart', genshin.standart);
88 | isExist2(this._genshin, '/character', genshin.character);
89 | isExist2(this._genshin, '/weapon', genshin.weapon);
90 | this._setting = this._db.getObject('/setting');
91 | this._sticker = this._db.getObject('/sticker');
92 | this._config = this._db.getObject('/config');
93 | this._autoReply = this._db.getObject('/reply');
94 | this._cloud = this._db.getObject('/cloud');
95 | this._count = this._db.getObject('/count');
96 | this._publicJid = new Set(this._db.getObject('/publicJid'));
97 | this._fakeReplyBase64 = this._db.getObject('/fakeReplyBase64');
98 | this._traveller = this._genshin.getObject('/traveller');
99 | this._errCmd = fs.readJSONSync('../json/error.json');
100 | this._textpro = fs.readJSONSync('../json/textpro.json');
101 | this._arryOfWords = fs.readJSONSync('../json/filters.json');
102 | this._surah = fs.readFileSync('../json/surah.txt', {encoding: 'utf-8'});
103 | !fs.existsSync('../dist/nsfw_model') &&
104 | fs.copySync('../nsfw_model', '../dist/nsfw_model');
105 | }
106 | public get db() {
107 | return this._db;
108 | }
109 | public set db(db: JsonDB) {
110 | this._db = db;
111 | }
112 | public get genshin() {
113 | return this._genshin;
114 | }
115 | public set genshin(genshin: JsonDB) {
116 | this._genshin = genshin;
117 | }
118 | public get setting() {
119 | return this._setting;
120 | }
121 | public set setting(setting: settingType) {
122 | this._setting = setting;
123 | this._db.push('/setting', setting);
124 | }
125 | public get errCmd() {
126 | return this._errCmd;
127 | }
128 | public get surah() {
129 | return this._surah;
130 | }
131 | public get arryOfWords() {
132 | return this._arryOfWords;
133 | }
134 | public set arryOfWords(arryOfWords: string[]) {
135 | this._arryOfWords = arryOfWords;
136 | fs.writeJSONSync('../json/filters.json', arryOfWords);
137 | }
138 | public get textpro() {
139 | return this._textpro;
140 | }
141 | public get sticker() {
142 | return this._sticker;
143 | }
144 | public set sticker(sticker: stickerType) {
145 | this._sticker = sticker;
146 | this._db.push('/sticker', sticker);
147 | }
148 | public get config() {
149 | return this._config;
150 | }
151 | public set config(config: configType) {
152 | this._config = config;
153 | this._db.push('/config', config);
154 | }
155 | public get autoReply() {
156 | return this._autoReply;
157 | }
158 | public set autoReply(autoReply: autoReply) {
159 | this._autoReply = autoReply;
160 | this._db.push('/autoReply', autoReply);
161 | }
162 | public get cloud() {
163 | return this._cloud;
164 | }
165 | public set cloud(cloud: cloud) {
166 | this._cloud = cloud;
167 | this._db.push('/cloud', cloud);
168 | }
169 | public get count() {
170 | return this._count;
171 | }
172 | public set count(count: countType) {
173 | this._count = count;
174 | this._db.push('/count', count);
175 | }
176 | public get traveller() {
177 | return this._traveller;
178 | }
179 | public set traveller(traveller: travellerType) {
180 | this._traveller = traveller;
181 | this._genshin.push('/traveller', traveller);
182 | }
183 | public get fakeReplyBase64() {
184 | return this._fakeReplyBase64;
185 | }
186 | public set fakeReplyBase64(fakeReplyBase64: string) {
187 | this._fakeReplyBase64 = fakeReplyBase64;
188 | this._db.push('/fakeReplyBase64', fakeReplyBase64);
189 | }
190 | public get publicJid() {
191 | return this._publicJid;
192 | }
193 | public set publicJid(publicJid: Set) {
194 | this._publicJid = publicJid;
195 | this._db.push('/publicJid', Array.from(publicJid));
196 | }
197 | }
198 |
--------------------------------------------------------------------------------
/src/reply.ts:
--------------------------------------------------------------------------------
1 | import { autoReply } from "types";
2 | import { DB } from "./login";
3 | export default class Reply {
4 | private reply: autoReply;
5 | constructor(private DB: DB) {
6 | this.reply = this.DB.autoReply
7 | }
8 | saveReply = () => this.DB.autoReply = this.reply
9 | isReply = (cmd: string) => Object.prototype.hasOwnProperty.call(this.reply, cmd);
10 |
11 | getReply = (cmd: string) => {
12 | if (Object.prototype.hasOwnProperty.call(this.reply, cmd)) {
13 | return this.reply[cmd]!.answer;
14 | } else {
15 | return false;
16 | }
17 | };
18 |
19 | addReply = (cmd: string, answer: string) => {
20 | if (Object.prototype.hasOwnProperty.call(this.reply, cmd)) {
21 | return 'Gagal, reply masih tersedia!';
22 | } else {
23 | this.reply[cmd] = {
24 | answer: answer.slice(cmd.length),
25 | };
26 | this.saveReply();
27 | return 'Sukses add reply!';
28 | }
29 | };
30 |
31 | removeReply = (cmd: string) => {
32 | if (Object.prototype.hasOwnProperty.call(this.reply, cmd)) {
33 | delete this.reply[cmd];
34 | return 'Sukses remove reply!';
35 | } else {
36 | return 'Gagal, reply tidak ada!';
37 | }
38 | };
39 |
40 | allReply = () => {
41 | let hasil = '*XyZ BOT AutoReply*\n\n',
42 | counter = 1;
43 | for (const [key, val] of Object.entries(this.reply)) {
44 | hasil += `${counter}. _${key}_\n Answer: *${val.answer}*\n`;
45 | counter++;
46 | }
47 | return hasil;
48 | };
49 | }
50 |
--------------------------------------------------------------------------------
/src/template.ts:
--------------------------------------------------------------------------------
1 | export function help(prefix: string) {
2 | const hasil = `*「 XyZ SELF 」*
3 |
4 | *MAIN*
5 | • prefix: *「$prefix」*
6 | • name: *$name*
7 | • creator: *@itzngga*
8 | • cmd-count: *$hit times*
9 | • runtime: *$runtime*
10 | • servertime:
11 | *_<%>_*
12 |
13 | *GAME*
14 | • ${prefix}rank
15 | • ${prefix}mine
16 | • ${prefix}chop
17 | • ${prefix}dig
18 | • ${prefix}trade
19 | • ${prefix}hunt
20 | • ${prefix}thief
21 | • ${prefix}fight
22 | • ${prefix}dungeon
23 | • ${prefix}level
24 | • ${prefix}gameLimit
25 | • ${prefix}level help
26 | • ${prefix}quiz *{difficult}*
27 | • ${prefix}tictactoe *[tag]*
28 | • ${prefix}caklontong
29 | • ${prefix}captha
30 | • ${prefix}slots
31 |
32 | *TEXT*
33 | • ${prefix}md5 *{teks}*
34 | • ${prefix}sha1 *{teks}*
35 | • ${prefix}sha3 *{teks}*
36 | • ${prefix}sha256 *{teks}*
37 | • ${prefix}sha512 *{teks}*
38 | • ${prefix}mock *{teks}*
39 | • ${prefix}math *{teks}*
40 | • ${prefix}reverse *{teks}*
41 |
42 | *STICKER*
43 | • ${prefix}slist
44 | • ${prefix}s *{sticker name}*
45 | • ${prefix}ssave *(reply img)*
46 | • ${prefix}supdate *(reply img)*
47 | • ${prefix}sdelete *{sticker name}*
48 | • ${prefix}sinfo *{sticker name}*
49 | • ${prefix}sticker *(send video)*
50 | • ${prefix}sticker *{url gambar}*
51 |
52 | *IMAGE*
53 | • ${prefix}fp *atau [tag]*
54 | • ${prefix}burn *{teks}*
55 | • ${prefix}fisheye *[int]*
56 | • ${prefix}wasted *atau [tag]*
57 | • ${prefix}wanted *atau [tag]*
58 | • ${prefix}rainbow *atau [tag]*
59 | • ${prefix}fuse *[tag1] [tag2]*
60 | • ${prefix}thuglife *atau [tag]*
61 | • ${prefix}triggered *atau [tag]*
62 | • ${prefix}tobe */ (reply image)*
63 | • ${prefix}deepfry */ (reply image)*
64 | • ${prefix}triggered *atau [tag]*
65 | • ${prefix}memegen *{text atas} | {text bwh}*
66 | • ${prefix}memegen2 *{text}*
67 |
68 | *AUDIO*
69 | • ${prefix}8d (reply audio)
70 | • ${prefix}destroy (reply media)
71 | • ${prefix}bass *atau [DB] [FREQ]*
72 |
73 | *MEDIA*
74 | • ${prefix}meme
75 | • ${prefix}quote
76 | • ${prefix}bacot
77 | • ${prefix}qnime
78 | • ${prefix}kucing
79 | • ${prefix}sticker
80 | • ${prefix}compress
81 | • ${prefix}wallpaper
82 | • ${prefix}ss *{link}*
83 | • ${prefix}ss2 *{link}*
84 | • ${prefix}attp *[teks]*
85 | • ${prefix}a-harta *[teks]*
86 | • ${prefix}tahta *[teks]*
87 | • ${prefix}harta *[teks]*
88 | • ${prefix}nulis *{teks}*
89 | • ${prefix}bitly *[link]*
90 | • ${prefix}image *{query}*
91 | • ${prefix}ocr *(reply gambar)*
92 | • ${prefix}steal *(reply sticker)*
93 | • ${prefix}qnime char *[char]*
94 | • ${prefix}extract *(send video)*
95 | • ${prefix}qnime anime *[anime]*
96 | • ${prefix}inspect *(reply gambar)*
97 | • ${prefix}translate *[kode bahasa] [teks]*
98 | • ${prefix}lang *[kode bahasa] [teks]*
99 | • ${prefix}quoteit *[author]* | *[teks]*
100 | • ${prefix}bacot add *[quote]*
101 | • ${prefix}qrcode *[teks]*
102 | • ${prefix}gtts *[teks]*
103 | • ${prefix}ttp *[teks]*
104 | • ${prefix}ttd *[teks]*
105 |
106 | *DOWNLOADER*
107 | • ${prefix}yt *[url]*
108 | • ${prefix}fb *[url]*
109 | • ${prefix}ig *[url]*
110 | • ${prefix}twt *[url]*
111 | • ${prefix}ytmp3 *[url]*
112 | • ${prefix}likee *[url]*
113 | • ${prefix}tiktok *[url]*
114 | • ${prefix}imp3 *[query]*
115 | • ${prefix}music *[query]*
116 |
117 | *INFORMATION*
118 | • ${prefix}bmkg
119 | • ${prefix}wait
120 | • ${prefix}corona
121 | • ${prefix}cek *[nomor]*
122 | • ${prefix}yts *{query}*
123 | • ${prefix}imdb *{query}*
124 | • ${prefix}imdbs *{query}*
125 | • ${prefix}gplay *{query}*
126 | • ${prefix}kbbi *[kata]*
127 | • ${prefix}cuaca *[kota]*
128 | • ${prefix}resep *{query}*
129 | • ${prefix}google *{query}*
130 | • ${prefix}shopee *{query}*
131 | • ${prefix}refrence *{query}*
132 | • ${prefix}news *{pencarian}*
133 | • ${prefix}lirik *{nama lagu}*
134 | • ${prefix}anime *{nama anime}*
135 | • ${prefix}igstalk *[username]*
136 | • ${prefix}brainly *{pertanyaan}*
137 | • ${prefix}wikipedia *{pencarian}*
138 | • ${prefix}cekresi *[no resi] [kurir]*
139 | • ${prefix}corona prov *[nama provinsi]*
140 |
141 | *ISLAMIC*
142 | • ${prefix}quran
143 | • ${prefix}list surah
144 | • ${prefix}sholat *[kota]*
145 | • ${prefix}surah *[no surah]*
146 | • ${prefix}surah *[no surah] ayat [ayat]*
147 |
148 | *KERANG AJAIB*
149 | • ?kapan *[pertanyaan]*
150 | • ?apakah *[pertanyaan]*
151 | • ?siapakah *[pertanyaan]*
152 |
153 | *CLOUD STORAGE*
154 | • ${prefix}cloud
155 | • ${prefix}cloud add
156 | • ${prefix}cloud help
157 | • ${prefix}cloud remove
158 |
159 | *UTILITAS*
160 | • ${prefix}me
161 | • ${prefix}cmdlist
162 | • ${prefix}everyone
163 | • ${prefix}getPic *[tag]*
164 | • ${prefix}join *[link group]*
165 | • ${prefix}delcmd *[perintah]*
166 | • ${prefix}cmd *[perintah]* | *[balasan]*
167 | • ${prefix}cmd *[perintah]* (kirim media)
168 |
169 | *SELF*
170 | • ${prefix}count
171 | • ${prefix}prefix *[prefix]*
172 | • ${prefix}upname *{name}*
173 | • ${prefix}uprofile *(reply img)*
174 | • ${prefix}upstatus *{status}*
175 | • ${prefix}upstory *{story}*
176 | • ${prefix}upstory *(reply img)*
177 | • ${prefix}upstory *(reply video)*
178 | • ${prefix}antivirtex *[on/off]*
179 | • ${prefix}autoread *[on/off]*
180 | • ${prefix}suggest *[on/off]*
181 | • ${prefix}unsend *[on/off]*
182 | • ${prefix}log *[on/off]*
183 | • ${prefix}debug *[on/off]*
184 | • ${prefix}eval *{js}*
185 | • ${prefix}exec *{cmd}*
186 | • ${prefix}getobj *{js/obj}*
187 | • ${prefix}reply
188 | • ${prefix}reply *[on/off]*
189 | • ${prefix}reply add *[word]* *{reply}*
190 | • ${prefix}reply remove *[word]*
191 | • ${prefix}fitnah *[tag]* | *{text1}* | *{text2}*
192 | • ${prefix}fakereply *[on/off]*
193 | • ${prefix}fakereply jid *{id}*
194 | • ${prefix}fakereply *{reply text}*
195 | • ${prefix}fakereply *(reply img)*
196 | • ${prefix}public *[tag]* (group)
197 | • ${prefix}public (chat)
198 | • ${prefix}public *[on/off]* (universal)
199 |
200 |
201 | *BOT*
202 | • ${prefix}mute
203 | • ${prefix}unmute
204 | • ${prefix}arch
205 | • ${prefix}ping
206 | • ${prefix}info
207 | • ${prefix}error
208 | • ${prefix}limit
209 | • ${prefix}speed
210 | • ${prefix}status
211 | • ${prefix}delete
212 | • ${prefix}quality
213 | • ${prefix}changelog
214 | • ${prefix}temp
215 | • ${prefix}temp clear
216 | • ${prefix}hidetag *{text}*
217 | • ${prefix}retry (reply media)
218 | • ${prefix}feature *{saran fitur}*
219 | • ${prefix}decrypt (reply sticker)
220 | • ${prefix}gift *[jmlah] [tag/nomor]*
221 | • ${prefix}feedback *{kirim feedback}*
222 | • ${prefix}bug *{laporan masalah}*
223 | • ${prefix}bot restart
224 | • ${prefix}bot block *[number]*
225 | • ${prefix}bot unblock *[number]*
226 | • ${prefix}bot leaveall
227 | • ${prefix}bot clearall
228 | • ${prefix}bot chatclear
229 |
230 | *GROUP*
231 | • ${prefix}leave
232 | • ${prefix}invite
233 | • ${prefix}tagall
234 | • ${prefix}everyone
235 | • ${prefix}onlyadmin
236 | • ${prefix}desc {teks}
237 | • ${prefix}subject {teks}
238 | • ${prefix}add [tag]
239 | • ${prefix}kick [tag]
240 | • ${prefix}admin [tag]
241 | • ${prefix}unadmin [tag]
242 |
243 | _*「 XyZ BOT Automation 」*_`;
244 | return hasil;
245 | }
246 | export function quality(prefix: string) {
247 | return `*Animated Sticker Quality*
248 | • *1*
249 | very high, cocok untuk video pendek
250 | • *2*
251 | high, cocok untuk video menengah
252 | • *3*
253 | medium, cocok untuk video panjang
254 | • *4*
255 | low, cocok untuk video panjang
256 | • *5*
257 | very low, cocok untuk video panjang
258 |
259 | Contoh: ${prefix}sticker 1
260 | Kualitas default: *3*`;
261 | }
262 | export function donasi() {
263 | let hasil = `)%%%Jika bot ini dirasa bermanfaat
264 | marilah berdonasi agar bot bisa
265 | terus aktif dan update%%%.
266 |
267 | • SAWERIA: https://saweria.co/donate/ItzNgga
268 | • OVO: 081297980063
269 | • DANA: 081297980063
270 | • GOPAY: 081297980063
271 | • INDOSAT: 08568970792
272 |
273 | • Costumer Service ▼▼▼`;
274 | hasil = hasil.replace(/%%%/g, '```');
275 | return hasil;
276 | }
277 | export function cloudHelp(prefix: string) {
278 | return `*XyZ BOT Cloud*
279 |
280 | • Apa itu cloud?
281 | - penyimpanan server
282 | • Apakah cloud XyZ aman?
283 | - Aman, data anda di enkripsi dan tidak dapat dibuka oleh siapapun
284 | • Berapa file yg dapat disimpan?
285 | - Maksimal hanya 1 file
286 | • Apakah file bisa hilang?
287 | - Ya, karena server tidak tetap
288 |
289 | Perintah:
290 | • ${prefix}cloud
291 | _mengirimkan file yg ada di cloud_
292 | • ${prefix}cloud add
293 | _menambahkan media ke cloud_
294 | • ${prefix}cloud help
295 | _penjelasan cloud_
296 | • ${prefix}cloud remove
297 | _hapus file di cloud_
298 |
299 | *usahakan tidak menyimpan file penting*`;
300 | }
301 | export function bahasa() {
302 | return `*List kode Bahasa*\n
303 | *Code Bahasa*
304 | sq Albanian
305 | ar Arabic
306 | hy Armenian
307 | ca Catalan
308 | zh Chinese
309 | zh-cn Chinese (China)
310 | zh-tw Chinese (Taiwan)
311 | zh-yue Chinese (Cantonese)
312 | hr Croatian
313 | cs Czech
314 | da Danish
315 | nl Dutch
316 | en English
317 | en-au English (Australia)
318 | en-uk English (United Kingdom)
319 | en-us English (United States)
320 | eo Esperanto
321 | fi Finnish
322 | fr French
323 | de German
324 | el Greek
325 | ht Haitian Creole
326 | hi Hindi
327 | hu Hungarian
328 | is Icelandic
329 | id Indonesian
330 | it Italian
331 | ja Japanese
332 | ko Korean
333 | la Latin
334 | lv Latvian
335 | mk Macedonian
336 | no Norwegian
337 | pl Polish
338 | pt Portuguese
339 | pt-br Portuguese (Brazil)
340 | ro Romanian
341 | ru Russian
342 | sr Serbian
343 | sk Slovak
344 | es Spanish
345 | es-es Spanish (Spain)
346 | es-us Spanish (United States)
347 | sw Swahili
348 | sv Swedish
349 | ta Tamil
350 | th Thai
351 | tr Turkish
352 | vi Vietnamese
353 | cy Welsh`;
354 | }
355 |
--------------------------------------------------------------------------------
/src/util.ts:
--------------------------------------------------------------------------------
1 | import {Readable} from 'stream';
2 |
3 | export function uInt8(str: string): Uint8Array {
4 | return new Uint8Array(Buffer.from(str));
5 | }
6 |
7 | /**
8 | * Convert Buffer to Readable Stream
9 | * @param {Buffer} buffer
10 | * @returns {ReadableStream}
11 | */
12 | export function buffer2Stream(buffer: Buffer): Readable {
13 | return new Readable({
14 | read() {
15 | this.push(buffer);
16 | this.push(null);
17 | },
18 | });
19 | }
20 |
21 | export function gmToBuffer(data: any) {
22 | return new Promise((resolve, reject) => {
23 | data.stream((err: any, stdout: any, stderr: any) => {
24 | if (err) {
25 | return reject(err);
26 | }
27 | const chunks: any = [];
28 | stdout.on('data', (chunk: any) => {
29 | chunks.push(chunk);
30 | });
31 | stdout.once('end', () => {
32 | resolve(Buffer.concat(chunks));
33 | });
34 | stderr.once('data', (data: string) => {
35 | reject(String(data));
36 | });
37 | });
38 | });
39 | }
40 |
--------------------------------------------------------------------------------
/start.sh:
--------------------------------------------------------------------------------
1 | cd dist
2 | node .
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | { "extends": "./node_modules/gts/tsconfig-google.json",
2 | "compilerOptions": {
3 | "rootDir": "./",
4 | "baseUrl": "./",
5 | "outDir": "dist",
6 | "target": "ES2020",
7 | "noEmitOnError": false,
8 | "esModuleInterop": true,
9 | "sourceMap": false,
10 | "skipLibCheck": true,
11 | "noImplicitReturns": false,
12 | "typeRoots": ["./node_modules/@types", "./types"]
13 | },
14 | "include": [
15 | "src/**/*.ts",
16 | "index.ts",
17 | "types**/*.ts",
18 | "nsfw_model"
19 | ],
20 | "exclude": ["temp", "sticker", "json", "image", "groups", "gif", "fonts", "cloud", "users"]
21 | }
--------------------------------------------------------------------------------
/types/index.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-explicit-any */
2 | /* eslint-disable @typescript-eslint/no-namespace */
3 | import {Moment} from 'moment';
4 | import {
5 | WAGroupMetadata,
6 | WAGroupParticipant,
7 | WAMessage,
8 | } from '@adiwajshing/baileys';
9 |
10 | export const updateObj = (name: string) => {
11 | eval(name);
12 | };
13 | export interface getFileResponse {
14 | buffer: Buffer;
15 | mimetype: MimeType;
16 | }
17 |
18 | export type groupAcceptCode = {
19 | code: number;
20 | gid: string;
21 | };
22 |
23 | export type settingType = {
24 | sAdmin: string;
25 | costumerId: string;
26 | restartState: boolean;
27 | restartId: string;
28 | prefix: string;
29 | unSend: string[];
30 | autoRead: boolean;
31 | autoReply: boolean;
32 | pm2Id: string;
33 | fakeReply: boolean;
34 | fakeText: string;
35 | fakeJid: string;
36 | antiVirtex: boolean;
37 | universalPublic: boolean;
38 | absen: string;
39 | voiceCmd: boolean;
40 | mention: boolean;
41 | mentionMsg: string;
42 | antiTroli: boolean;
43 | };
44 |
45 | export type waitMessageObj = {
46 | sender: string;
47 | query: string;
48 | type: string;
49 | callback?: boolean;
50 | };
51 |
52 | export type cloud = {
53 | [key: string]: {
54 | path: string;
55 | format: string;
56 | timestamp: string;
57 | };
58 | };
59 | export type countType = {
60 | [key: string]: {
61 | count: number;
62 | type: string;
63 | };
64 | };
65 | export interface configType {
66 | apikeys: {
67 | vthear: string;
68 | cekresi?: string[];
69 | keepsaveit?: string[];
70 | bitly: string;
71 | genius: string;
72 | tech: string;
73 | xyz: string;
74 | };
75 | 'rest-ip': {
76 | xyz: string;
77 | vhtear: string;
78 | tech: string;
79 | }
80 | vcard: {
81 | cs: {
82 | displayName: string;
83 | vcard: string;
84 | };
85 | owner: {
86 | displayName: string;
87 | vcard: string;
88 | };
89 | };
90 | secret: string;
91 | ytCookie: string;
92 | scdl: string;
93 | ytIdentity: string;
94 | igCookie: string;
95 | }
96 |
97 | export type autoReply = {
98 | [key: string]: {
99 | answer: string;
100 | };
101 | }
102 |
103 | export type group = {
104 | gid: string;
105 | command: string[];
106 | settings: Object;
107 | };
108 |
109 | export type stickerType = {
110 | [key: string]: {
111 | date_added: Moment;
112 | last_update: Moment;
113 | maker: string;
114 | path: string;
115 | };
116 | };
117 |
118 | export type textproType = {
119 | [key: string]: {
120 | type: number;
121 | link: string;
122 | };
123 | };
124 |
125 | export interface igstalk {
126 | username: string;
127 | fullname: string;
128 | biography: string;
129 | private: boolean;
130 | imageurl: string;
131 | followers: number;
132 | followed: number;
133 | post: number;
134 | highlight: number;
135 | }
136 | interface Group extends WAGroupMetadata {
137 | descTime: number;
138 | }
139 |
140 | export interface handlerType {
141 | message: WAMessage;
142 | fromMe: boolean;
143 | chatId: string;
144 | msgId: string;
145 | from: string;
146 | botNumber: string;
147 | isGroupMsg: boolean;
148 | serial: string;
149 | isSadmin: boolean;
150 | type: string;
151 | isQuoted: boolean;
152 | body: string;
153 | t: number;
154 | time: string;
155 | cmd: string;
156 | args: any[];
157 | replyMode: WAMessage;
158 | groupMetadata: Group;
159 | groupName: string;
160 | groupId: string;
161 | groupDesc: string | undefined;
162 | groupMembers: WAGroupParticipant[];
163 | groupAdmins: string[];
164 | isBotGroupAdmins: boolean;
165 | isGroupAdmins: boolean;
166 | isGroupAdminOnly: string | undefined;
167 | isMedia: boolean;
168 | isImage: boolean;
169 | isVideo: boolean;
170 | isAudio: boolean;
171 | isSticker: boolean;
172 | isDocument: boolean;
173 | isQuotedText: boolean;
174 | isQuotedImage: boolean;
175 | isQuotedVideo: boolean;
176 | isQuotedAudio: boolean;
177 | isQuotedSticker: boolean;
178 | isQuotedDocument: boolean;
179 | content: () => string | boolean;
180 | quotedMsgObj: () => any;
181 | getQuotedText: () => any;
182 | getQuotedImage: () => any;
183 | getQuotedVideo: () => any;
184 | getQuotedAudio: () => any;
185 | getQoutedSticker: () => any;
186 | getQuotedDocument: () => any;
187 | fileSize: (quoted: boolean) => number;
188 | pushname: (target?: string) => string;
189 | mentionedJidList: () => string[];
190 | }
191 |
192 | export type travellerType = {
193 | [user: string]: {
194 | primogems: number;
195 | interwined: number;
196 | acquaint: number;
197 | standard5pity: number;
198 | standard4pity: number;
199 | char5pity: number;
200 | char4pity: number;
201 | weap5pity: number;
202 | weap4pity: number;
203 | chars: string[];
204 | weapons: string[];
205 | };
206 | };
207 |
208 | export type standart = {
209 | fiveStarChar: string[];
210 | fiveStarWeap: string[];
211 | fourStarChar: string[];
212 | fourStarWeap: string[];
213 | threeStarWeap: string[];
214 | };
215 |
216 | export type character = {
217 | rate5up: string[];
218 | rate4up: string[];
219 | fiveStarChar: string[];
220 | fourStarChar: string[];
221 | fourStarWeap: string[];
222 | threeStarWeap: string[];
223 | };
224 |
225 | export type weapon = {
226 | rate5up: string[];
227 | rate4up: string[];
228 | fiveStarWeap: string[];
229 | fourStarChar: string[];
230 | fourStarWeap: string[];
231 | threeStarWeap: string[];
232 | };
233 |
234 | export interface xjadiBot {
235 | code: number;
236 | target: string;
237 | type: 'message' | 'broadcast' | 'update' | 'delete' | 'qr' | 'get-scan';
238 | method?: 'send' | 'received' | 'get';
239 | tjid?: string;
240 | text?: string;
241 | qr?: any;
242 | }
243 |
244 | export type loginData = {
245 | clientID: string;
246 | serverToken: string;
247 | clientToken: string;
248 | encKey: string;
249 | macKey: string;
250 | }
251 | declare global {
252 | interface String {
253 | splice(index: number, howmanys: number): string[];
254 | insert(index: number, string: string): string;
255 | repeat(times: number, separator?: string): string;
256 | rupiah(): string;
257 | }
258 | }
259 |
--------------------------------------------------------------------------------
/users/6281297980063@s.whatsapp.net/genshin.json:
--------------------------------------------------------------------------------
1 | {
2 | "traveller": {
3 | "6281297980063@s.whatsapp.net": {
4 | "primogems": 9999805599,
5 | "interwined": 20,
6 | "acquaint": 0,
7 | "standard5pity": 43,
8 | "standard4pity": 2,
9 | "char5pity": 29,
10 | "char4pity": 9,
11 | "weap5pity": 0,
12 | "weap4pity": 0,
13 | "chars": [
14 | "Xinyan (★★★★)",
15 | "Noelle (★★★★)",
16 | "Diona (★★★★)",
17 | "Ningguang (★★★★)",
18 | "Xingqiu (★★★★)",
19 | "Beidou (★★★★)",
20 | "Xinyan (★★★★)",
21 | "undefined (★★★★★)",
22 | "Xingqiu (★★★★)",
23 | "Diona (★★★★)",
24 | "Ningguang (★★★★)",
25 | "Chongyun (★★★★)",
26 | "Diona (★★★★)",
27 | "Ningguang (★★★★)",
28 | "Albedo (★★★★★)",
29 | "Raven Bow (★★★)",
30 | "Keqing (★★★★★)"
31 | ],
32 | "weapons": [
33 | "Emerald Orb (★★★)",
34 | "Magic Guide (★★★)",
35 | "Debate Club (★★★)",
36 | "Cool Steel (★★★)",
37 | "Emerald Orb (★★★)",
38 | "Slingshot (★★★)",
39 | "Ferrous Shadow (★★★)",
40 | "Cool Steel (★★★)",
41 | "Cool Steel (★★★)",
42 | "Thrilling Tales of Dragon Slayers (★★★)",
43 | "Harbinger of Dawn (★★★)",
44 | "Ferrous Shadow (★★★)",
45 | "Emerald Orb (★★★)",
46 | "Emerald Orb (★★★)",
47 | "Raven Bow (★★★)",
48 | "Cool Steel (★★★)",
49 | "Skyrider Sword (★★★)",
50 | "Raven Bow (★★★)",
51 | "Black Tassel (★★★)",
52 | "Skyrider Sword (★★★)",
53 | "Slingshot (★★★)",
54 | "Harbinger of Dawn (★★★)",
55 | "Bloodtainted Greatsword (★★★)",
56 | "Bloodtainted Greatsword (★★★)",
57 | "Thrilling Tales of Dragon Slayers (★★★)",
58 | "Raven Bow (★★★)",
59 | "Thrilling Tales of Dragon Slayers (★★★)",
60 | "Skyrider Sword (★★★)",
61 | "Debate Club (★★★)",
62 | "Sacrificial Sword (★★★★)",
63 | "Cool Steel (★★★)",
64 | "Slingshot (★★★)",
65 | "Skyrider Sword (★★★)",
66 | "Thrilling Tales of Dragon Slayers (★★★)",
67 | "Eye of Perception (★★★★)",
68 | "Ferrous Shadow (★★★)",
69 | "Magic Guide (★★★)",
70 | "Cool Steel (★★★)",
71 | "Magic Guide (★★★)",
72 | "Cool Steel (★★★)",
73 | "Harbinger of Dawn (★★★)",
74 | "Skyrider Sword (★★★)",
75 | "Harbinger of Dawn (★★★)",
76 | "Cool Steel (★★★)",
77 | "Emerald Orb (★★★)",
78 | "Harbinger of Dawn (★★★)",
79 | "Black Tassel (★★★)",
80 | "Harbinger of Dawn (★★★)",
81 | "Sharpshooter's Oath (★★★)",
82 | "Ferrous Shadow (★★★)",
83 | "Slingshot (★★★)",
84 | "Slingshot (★★★)",
85 | "Sacrificial Bow (★★★★)",
86 | "Bloodtainted Greatsword (★★★)",
87 | "Skyrider Sword (★★★)",
88 | "Harbinger of Dawn (★★★)",
89 | "Slingshot (★★★)",
90 | "Harbinger of Dawn (★★★)",
91 | "Thrilling Tales of Dragon Slayers (★★★)",
92 | "Thrilling Tales of Dragon Slayers (★★★)",
93 | "Cool Steel (★★★)",
94 | "Thrilling Tales of Dragon Slayers (★★★)",
95 | "Sacrificial Sword (★★★★)",
96 | "Sharpshooter's Oath (★★★)",
97 | "Emerald Orb (★★★)",
98 | "Bloodtainted Greatsword (★★★)",
99 | "Magic Guide (★★★)",
100 | "Bloodtainted Greatsword (★★★)",
101 | "Slingshot (★★★)",
102 | "Emerald Orb (★★★)",
103 | "Cool Steel (★★★)",
104 | "Thrilling Tales of Dragon Slayers (★★★)",
105 | "Sacrificial Bow (★★★★)",
106 | "Favonius Lance (★★★★)",
107 | "Skyrider Sword (★★★)",
108 | "Skyrider Sword (★★★)",
109 | "Magic Guide (★★★)",
110 | "Black Tassel (★★★)",
111 | "Cool Steel (★★★)",
112 | "Magic Guide (★★★)",
113 | "Thrilling Tales of Dragon Slayers (★★★)",
114 | "Sacrificial Bow (★★★★)",
115 | "Raven Bow (★★★)",
116 | "Cool Steel (★★★)",
117 | "Ferrous Shadow (★★★)",
118 | "Thrilling Tales of Dragon Slayers (★★★)",
119 | "Emerald Orb (★★★)",
120 | "Black Tassel (★★★)",
121 | "Magic Guide (★★★)",
122 | "Black Tassel (★★★)",
123 | "Sacrifical Greatsword (★★★★)",
124 | "Harbinger of Dawn (★★★)",
125 | "Magic Guide (★★★)",
126 | "Bloodtainted Greatsword (★★★)",
127 | "Cool Steel (★★★)",
128 | "Cool Steel (★★★)",
129 | "Cool Steel (★★★)",
130 | "Ferrous Shadow (★★★)",
131 | "Bloodtainted Greatsword (★★★)",
132 | "Harbinger of Dawn (★★★)",
133 | "Sacrificial Bow (★★★★)",
134 | "Raven Bow (★★★)",
135 | "Skyrider Sword (★★★)",
136 | "Skyrider Sword (★★★)",
137 | "Favonius Codex (★★★★)",
138 | "Harbinger of Dawn (★★★)",
139 | "Raven Bow (★★★)",
140 | "Bloodtainted Greatsword (★★★)",
141 | "Slingshot (★★★)",
142 | "Ferrous Shadow (★★★)",
143 | "Magic Guide (★★★)",
144 | "Debate Club (★★★)",
145 | "Skyrider Sword (★★★)",
146 | "Harbinger of Dawn (★★★)",
147 | "Favonius Warbow (★★★★)",
148 | "Ferrous Shadow (★★★)",
149 | "Cool Steel (★★★)",
150 | "Thrilling Tales of Dragon Slayers (★★★)",
151 | "Ferrous Shadow (★★★)",
152 | "Skyrider Sword (★★★)",
153 | "Harbinger of Dawn (★★★)",
154 | "Skyrider Sword (★★★)",
155 | "Sharpshooter's Oath (★★★)",
156 | "Magic Guide (★★★)"
157 | ]
158 | }
159 | },
160 | "standart": {
161 | "fiveStarChar": [
162 | "Jean",
163 | "QiQi",
164 | "Keqing",
165 | "Mona",
166 | "Diluc"
167 | ],
168 | "fiveStarWeap": [
169 | "Amos' Bow",
170 | "Skyward Harp",
171 | "Lost Prayer to the Sacred Winds",
172 | "Skyward Atlas",
173 | "Wolf's Gravestone",
174 | "Skyward Pride",
175 | "Primordial Jade Winged-Spear",
176 | "Skyward Spine",
177 | "Aquila Favonia",
178 | "Skyward Blade"
179 | ],
180 | "fourStarChar": [
181 | "Sucrose",
182 | "Chongyun",
183 | "Kaeya",
184 | "Fischl",
185 | "Beidou",
186 | "Razor",
187 | "Lisa",
188 | "Noelle",
189 | "Ningguang",
190 | "Xingqiu",
191 | "Barbara",
192 | "Bennett",
193 | "Xiangling",
194 | "Amber",
195 | "Diona",
196 | "Xinyan"
197 | ],
198 | "fourStarWeap": [
199 | "Rust",
200 | "Sacrificial Bow",
201 | "The Stringless",
202 | "Favonius Warbow",
203 | "Eye of Perception",
204 | "Favonius Codex",
205 | "Sacrificial Fragments",
206 | "The Widsith",
207 | "Rainslasher",
208 | "Sacrifical Greatsword",
209 | "The Bell",
210 | "Favonius Greatsword",
211 | "Favonius Lance",
212 | "Dragon's Bane",
213 | "Lion's Roar",
214 | "Sacrificial Sword",
215 | "The Flute",
216 | "Favonius Sword"
217 | ],
218 | "threeStarWeap": [
219 | "Slingshot",
220 | "Raven Bow",
221 | "Sharpshooter's Oath",
222 | "Emerald Orb",
223 | "Thrilling Tales of Dragon Slayers",
224 | "Magic Guide",
225 | "Debate Club",
226 | "Bloodtainted Greatsword",
227 | "Ferrous Shadow",
228 | "Black Tassel",
229 | "Skyrider Sword",
230 | "Harbinger of Dawn",
231 | "Cool Steel"
232 | ]
233 | },
234 | "character": {
235 | "rateUp5": "Albedo",
236 | "rateUp4": [
237 | "Fischl",
238 | "Bennett",
239 | "Sucrose"
240 | ],
241 | "fiveStarChar": [
242 | "Albedo",
243 | "Jean",
244 | "QiQi",
245 | "Keqing",
246 | "Mona",
247 | "Diluc"
248 | ],
249 | "fourStarChar": [
250 | "Chongyun",
251 | "Beidou",
252 | "Noelle",
253 | "Ningguang",
254 | "Xingqiu",
255 | "Xiangling",
256 | "Diona",
257 | "Xinyan"
258 | ],
259 | "fourStarWeap": [
260 | "Rust",
261 | "Sacrificial Bow",
262 | "The Stringless",
263 | "Favonius Warbow",
264 | "Eye of Perception",
265 | "Favonius Codex",
266 | "Sacrificial Fragments",
267 | "The Widsith",
268 | "Rainslasher",
269 | "Sacrifical Greatsword",
270 | "The Bell",
271 | "Favonius Greatsword",
272 | "Favonius Lance",
273 | "Dragon's Bane",
274 | "Lion's Roar",
275 | "Sacrificial Sword",
276 | "The Flute",
277 | "Favonius Sword"
278 | ],
279 | "threeStarWeap": [
280 | "Slingshot",
281 | "Raven Bow",
282 | "Sharpshooter's Oath",
283 | "Emerald Orb",
284 | "Thrilling Tales of Dragon Slayers",
285 | "Magic Guide",
286 | "Debate Club",
287 | "Bloodtainted Greatsword",
288 | "Ferrous Shadow",
289 | "Black Tassel",
290 | "Skyrider Sword",
291 | "Harbinger of Dawn",
292 | "Cool Steel"
293 | ]
294 | },
295 | "weapon": {
296 | "rateUp5": [
297 | "Summit Shaper",
298 | "Skyward Atlas"
299 | ],
300 | "rateUp4": [
301 | "The Stringless",
302 | "Sacrificial Fragments",
303 | "Favonius Greatsword",
304 | "Favonius Sword",
305 | "Favonius Lance"
306 | ],
307 | "fiveStarWeap": [
308 | "Amos' Bow",
309 | "Skyward Harp",
310 | "Lost Prayer to the Sacred Winds",
311 | "Wolf's Gravestone",
312 | "Skyward Pride",
313 | "Primordial Jade Winged-Spear",
314 | "Skyward Spine",
315 | "Aquila Favonia",
316 | "Skyward Blade"
317 | ],
318 | "fourStarChar": [
319 | "Sucrose",
320 | "Chongyun",
321 | "Kaeya",
322 | "Fischl",
323 | "Beidou",
324 | "Razor",
325 | "Lisa",
326 | "Noelle",
327 | "Ningguang",
328 | "Xingqiu",
329 | "Barbara",
330 | "Bennett",
331 | "Xiangling",
332 | "Amber",
333 | "Diona",
334 | "Xinyan"
335 | ],
336 | "fourStarWeap": [
337 | "Rust",
338 | "Sacrificial Bow",
339 | "Favonius Warbow",
340 | "Eye of Perception",
341 | "Favonius Codex",
342 | "The Widsith",
343 | "Rainslasher",
344 | "Sacrifical Greatsword",
345 | "The Bell",
346 | "Dragon's Bane",
347 | "Lion's Roar",
348 | "Sacrificial Sword",
349 | "The Flute"
350 | ],
351 | "threeStarWeap": [
352 | "Slingshot",
353 | "Raven Bow",
354 | "Sharpshooter's Oath",
355 | "Emerald Orb",
356 | "Thrilling Tales of Dragon Slayers",
357 | "Magic Guide",
358 | "Debate Club",
359 | "Bloodtainted Greatsword",
360 | "Ferrous Shadow",
361 | "Black Tassel",
362 | "Skyrider Sword",
363 | "Harbinger of Dawn",
364 | "Cool Steel"
365 | ]
366 | }
367 | }
--------------------------------------------------------------------------------