├── .gitignore
├── LICENSE
├── README.md
├── config.json
├── database
├── bot
│ ├── banned.json
│ ├── mute.json
│ ├── premium.json
│ ├── registered.json
│ └── setting.json
├── group
│ ├── antilink.json
│ ├── antinsfw.json
│ ├── autosticker.json
│ ├── leveling.json
│ ├── nsfw.json
│ └── welcome.json
└── user
│ ├── afk.json
│ ├── daily.json
│ ├── level.json
│ ├── limit.json
│ └── reminder.json
├── function
├── afk.js
├── daily.js
├── index.js
├── level.js
├── limit.js
├── loader.js
├── premium.js
├── register.js
└── reminder.js
├── index.js
├── lib
├── downloader.js
├── fun.js
├── index.js
├── misc.js
├── nsfw.js
├── toxic.js
└── weeaboo.js
├── message
├── index.js
└── text
│ └── lang
│ ├── eng.js
│ ├── ind.js
│ └── index.js
├── package.json
├── temp
├── NOTE.txt
├── audio
│ └── NOTE.txt
├── data.exif
└── video
│ └── NOTE.txt
├── test
└── test.js
└── tools
├── exif.js
├── fetcher.js
└── index.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # Modules directory
2 | node_modules
3 |
4 | # Session file
5 | *.data.json
6 |
7 | # Debug file
8 | logs
9 |
10 | # Local folder
11 | .node-persist
12 |
13 | # Lock file
14 | package-lock.json
15 |
16 | # Dunno
17 | .vscode
18 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Heikal Syah Shiddiq.
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 | # _**HisokaBot**_
5 |
6 | > HisokaBot is a multipurpose WhatsApp bot using wa-automate-nodejs library!
7 | > Script Copy From [BocchiBot](https://github.com/SlavyanDesu/BocchiBot)
8 | >
9 | >
10 |
11 | # Requirements
12 | * [Node.js](https://nodejs.org/en/)
13 | * [Git](https://git-scm.com/downloads)
14 | * [FFmpeg](https://www.gyan.dev/ffmpeg/builds/)
15 | * [libwebp](https://developers.google.com/speed/webp/download)
16 | * Any text editor
17 |
18 | # Installation
19 | ## 📝 Cloning this repo
20 | ```cmd
21 | > git clone https://github.com/dxxoo/HisokaBOT-Whatsapp-Bot.git
22 | > cd HisokaBOT-Whatsapp-Bot
23 | ```
24 |
25 | ## ✍️ Editing the file
26 | Edit the required value in `config.json`.
27 | ```json
28 | {
29 | "ownerBot": "62812xxxxxxxx@c.us",
30 | "prefix": "$",
31 | "uaOverride": "WhatsApp/2.2037.6 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36",
32 | "itech": "api-key",
33 | "nao": "api-key",
34 | "vhtear": "api-key",
35 | "melodic": "administrator",
36 | "tobz": "BotWeA"
37 | }
38 | ```
39 |
40 | `ownerBot`: your WhatsApp number.
41 | `prefix`: bot's prefix.
42 | `uaOverride`: your user agent.
43 | `itech`: I-Tech API key. You can get it [here](https://api.i-tech.id) by creating an account. After that, set your server/host static IP in [here](https://api.i-tech.id/settings/profile).
44 | `nao`: SauceNAO API key. You can get it [here](https://saucenao.com/user.php) by creating an account.
45 | `vhtear`: VHTear API key. You can get it [here](https://api.vhtear.com/) by purchasing his API key.
46 | `melodic`: MelodicXT API key. You can use `administrator` key.
47 | `tobz`: Tobz API key. You can use `BotWeA` key.
48 |
49 | ## 🗣️ Changing language
50 | If you want to change the language to English, replace all `ind` function to `eng`.
51 | Example:
52 | ```js
53 | ind.wrongFormat()
54 | ```
55 | To:
56 | ```js
57 | eng.wrongFormat()
58 | ```
59 |
60 | ## 🛠️ Installing the FFmpeg
61 | * Download one of the available versions of FFmpeg by clicking [this link](https://www.gyan.dev/ffmpeg/builds/).
62 | * Extract the file to `C:\` path.
63 | * Rename the extracted folder to `ffmpeg`.
64 | * Run Command Prompt as Administrator.
65 | * Run this command:
66 | ```cmd
67 | > setx /m PATH "C:\ffmpeg\bin;%PATH%"
68 | ```
69 | It will give us a callback like `SUCCESS: specified value was saved`.
70 | * Now that you've FFmpeg installed, verify that it's working by running this command to see version number:
71 | ```cmd
72 | > ffmpeg -version
73 | ```
74 |
75 | ## 📷 Installing the libwebp
76 | The installation is same as you install FFmpeg but whatever. I will make it clear.
77 | * Download the file according to the OS you are using by clicking [this link](https://developers.google.com/speed/webp/download).
78 | * Extract the file to `C:\` path.
79 | * Rename the extracted file to `libwebp`.
80 | * Run Command Prompt as Administrator.
81 | * Run this command:
82 | ```cmd
83 | > setx /m PATH "C:\libwebp\bin;%PATH%"
84 | ```
85 | It will give us a callback like `SUCCESS: specified value was saved`.
86 | * Now that you've libwebp installed, verify that it's installed by running this command to see version number:
87 | ```cmd
88 | > webpmux -version
89 | ```
90 |
91 | ## 🔍 Installing the dependencies
92 | ```cmd
93 | > npm install
94 | ```
95 |
96 | ## 🆗 Running the bot
97 | Regular node:
98 | ```cmd
99 | > npm start
100 | ```
101 |
102 | PM2:
103 | ```cmd
104 | > pm2 start index.js
105 | > pm2 monit
106 | ```
107 |
108 | PM2 with cron job (restart after 5 hours):
109 | ```cmd
110 | > pm2 start index.js --cron "* */5 * * *"
111 | > pm2 monit
112 | ```
113 |
114 | After that scan the QR code using your WhatsApp in your phone!
115 |
116 | # Features
117 | If you want to unlock premium commands, please buy me a coffee at least 1 on Ko-fi platform.
118 |
119 | | Leveling | Availability |
120 | | :--------------: | :------------: |
121 | | Leveling | ✔️ |
122 | | Set level color | Soon |
123 | | Set bar color | Soon |
124 |
125 | | Sticker Maker | Availability |
126 | | :-------------------: | :----------: |
127 | | Send/reply image | ✔️ |
128 | | Send/reply GIF | ✔️ |
129 | | Send/reply MP4 | ✔️ |
130 | | Text to sticker | ✔️ |
131 | | Text to sticker GIF | ✔️ |
132 | | Sticker to image | ✔️ |
133 | | Sticker WM | ✔️ |
134 | | Take sticker | ✔️ |
135 |
136 | | Downloader | Availability |
137 | | :-----------------: | :----------: |
138 | | Facebook video | ✔️ |
139 | | YouTube audio/video | ✔️ |
140 | | Joox musics | ✔️ |
141 | | TikTok video | ✔️ |
142 | | TikTok profile pic | ✔️ |
143 | | Twitter video/image | ✔️ |
144 | | Instagram post | ✔️ |
145 | | Instagram story | ✔️ |
146 | | LK21 | ✔️ |
147 | | TikTok no WM | ✔️ |
148 |
149 | | Misc | Availability |
150 | | :------------------: | :----------: |
151 | | Say | ✔️ |
152 | | Search lyrics | ✔️ |
153 | | Shortlink maker | ✔️ |
154 | | Wikipedia (EN) | ✔️ |
155 | | Wikipedia (ID) | ✔️ |
156 | | KBBI scarper | ✔️ |
157 | | Stalk IG account | ✔️ |
158 | | GSMArena scraper | ✔️ |
159 | | Search food receipts | ✔️ |
160 | | YouTube search | ✔️ |
161 | | Text to speech | ✔️ |
162 | | AFK | ✔️ |
163 | | Distance calculator | ✔️ |
164 | | Sticker search | ✔️ |
165 | | Calculator | ✔️ |
166 | | Al-Qur'an surah | ✔️ |
167 | | List surah | ✔️ |
168 | | Random contact | ✔️ |
169 | | YouTube play | ✔️ |
170 | | Whois | ✔️ |
171 | | SMS gateway | ✔️ |
172 | | Al-Qur'an tafseer | ✔️ |
173 | | Al-Kitab search | ✔️ |
174 | | LK21 scraper | ✔️ |
175 | | Reminder | ✔️ |
176 | | Image uploader | ✔️ |
177 | | Sholat schedule | ✔️ |
178 | | Latest Line stickers | ✔️ |
179 | | Check postage | ✔️ |
180 | | Sending email | ✔️ |
181 | | Random quotes | ✔️ |
182 | | Genshin chara info | ✔️ |
183 |
184 | | Fun | Availability |
185 | | :-------------------: | :----------: |
186 | | Weton jodoh | ✔️ |
187 | | Horoscope | ✔️ |
188 | | Harta tahta maker | ✔️ |
189 | | Writing text maker | ✔️ |
190 | | Glitch text maker | ✔️ |
191 | | SimSimi chatbot | ✔️ |
192 | | Blackpink logo maker | ✔️ |
193 | | Pornhub logo maker | ✔️ |
194 | | Galaxy text maker | ✔️ |
195 | | Truth or dare | ✔️ |
196 | | Asupan TikTok | ✔️ |
197 | | PH comment maker | ✔️ |
198 | | Triggered maker | ✔️ |
199 | | Kiss image maker | ✔️ |
200 | | 3D text maker | ✔️ |
201 | | Freefire logo maker | ✔️ |
202 | | Freefire banner maker | ✔️ |
203 | | Sliding text maker | ✔️ |
204 | | Hero ML maker | ✔️ |
205 | | Fire text maker | ✔️ |
206 | | Couple balloon maker | ✔️ |
207 | | Wasted maker | ✔️ |
208 | | Cakl Lontong quiz | ✔️ |
209 | | Hilih-ify text | ✔️ |
210 | | Tebak gambar quiz | ✔️ |
211 | | Random doge stickers | ✔️ |
212 | | Dice | ✔️ |
213 |
214 | | Weeb Zone | Availability |
215 | | :-------------------: | :----------: |
216 | | Random neko girl | ✔️ |
217 | | Random wallpaper | ✔️ |
218 | | Random kemonomimi | ✔️ |
219 | | Kusonime scraper | ✔️ |
220 | | Komiku scraper | ✔️ |
221 | | Anime tracer | ✔️ |
222 | | Source finder | ✔️ |
223 | | Random waifu pics | ✔️ |
224 | | Anitoki latest update | ✔️ |
225 | | Random anime stickers | ✔️ |
226 | | Neonime latest update | ✔️ |
227 | | Anoboy on-going list | ✔️ |
228 |
229 | | Bot | Availability |
230 | | :--------------: | :----------: |
231 | | Server usage | ✔️ |
232 | | Blocked list | ✔️ |
233 | | Ping | ✔️ |
234 | | Delete messages | ✔️ |
235 | | Bug report | ✔️ |
236 | | Join group | ✔️ |
237 | | Check serials | ✔️ |
238 |
239 | | Owner | Availability |
240 | | :----------------: | :----------: |
241 | | Broadcasting | ✔️ |
242 | | Clear all messages | ✔️ |
243 | | Leave all groups | ✔️ |
244 | | Get snapshot | ✔️ |
245 | | Ban | ✔️ |
246 | | Eval | ✔️ |
247 | | Shutdown | ✔️ |
248 | | Add premium user | ✔️ |
249 | | Set bot's info | ✔️ |
250 | | Mute bot | ✔️ |
251 |
252 | | Moderation | Availability |
253 | | :--------------: | :----------: |
254 | | Add | ✔️ |
255 | | Kick | ✔️ |
256 | | Promote | ✔️ |
257 | | Demote | ✔️ |
258 | | Leave bot | ✔️ |
259 | | Everyone | ✔️ |
260 | | Toogle NSFW | ✔️ |
261 | | Set group icon | ✔️ |
262 | | Anti-group link | ✔️ |
263 | | Toogle welcome | ✔️ |
264 | | Auto-sticker | ✔️ |
265 | | Mute group | ✔️ |
266 | | Anti-NSFW link | ✔️ |
267 | | Anti-porn | Premium |
268 |
269 | | NSFW | Availability |
270 | | :----------------: | :----------: |
271 | | Lewds | ✔️ |
272 | | nHentai lookup | ✔️ |
273 | | Fetish | ✔️ |
274 | | Latest Nekopoi | ✔️ |
275 | | Pornhub downloader | ✔️ |
276 | | Waifu 18+ | ✔️ |
277 | | Yuri | ✔️ |
278 | | Femdom | ✔️ |
279 | | Lewd avatars | ✔️ |
280 | | nHentai search | ✔️ |
281 | | nHentai downloader | Premium |
282 | | Multi-lewds | Premium |
283 | | Multi-fetish | Premium |
284 |
285 | # Thanks to
286 | * [`open-wa/wa-automate-nodejs`](https://github.com/open-wa/wa-automate-nodejs)
287 | * [`YogaSakti/imageToSticker`](https://github.com/YogaSakti/imageToSticker)
288 | * [`SlavyanDesu`](https://github.com/SlavyanDesu)
289 |
--------------------------------------------------------------------------------
/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "ownerBot": "62812xxxxxxx@c.us",
3 | "prefix": "#",
4 | "uaOverride": "WhatsApp/2.2037.6 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36",
5 | "token": "api-key",
6 | "nao": "api-key",
7 | "vhtear": "api-key",
8 | "melodic": "administrator",
9 | "tobz": "BotWeA"
10 | }
11 |
--------------------------------------------------------------------------------
/database/bot/banned.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/database/bot/mute.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/database/bot/premium.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/database/bot/registered.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/database/bot/setting.json:
--------------------------------------------------------------------------------
1 | {
2 | "memberLimit": "1",
3 | "groupLimit": "20"
4 | }
--------------------------------------------------------------------------------
/database/group/antilink.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/database/group/antinsfw.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/database/group/autosticker.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/database/group/leveling.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/database/group/nsfw.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/database/group/welcome.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/database/user/afk.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/database/user/daily.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/database/user/level.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/database/user/limit.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/database/user/reminder.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/function/afk.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs-extra')
2 |
3 | /**
4 | * Add AFK user.
5 | * @param {string} userId
6 | * @param {string} time
7 | * @param {string} reason
8 | * @param {object} _dir
9 | */
10 | const addAfkUser = (userId, time, reason, _dir) => {
11 | const obj = { id: userId, time: time, reason: reason }
12 | _dir.push(obj)
13 | fs.writeFileSync('./database/user/afk.json', JSON.stringify(_dir))
14 | }
15 |
16 | /**
17 | * Check if user is on AFK state.
18 | * @param {string} userId
19 | * @param {object} _dir
20 | * @returns {boolean}
21 | */
22 | const checkAfkUser = (userId, _dir) => {
23 | let status = false
24 | Object.keys(_dir).forEach((i) => {
25 | if (_dir[i].id === userId) {
26 | status = true
27 | }
28 | })
29 | return status
30 | }
31 |
32 | /**
33 | * Get user AFK reason.
34 | * @param {string} userId
35 | * @param {object} _dir
36 | * @returns {string}
37 | */
38 | const getAfkReason = (userId, _dir) => {
39 | let position = null
40 | Object.keys(_dir).forEach((i) => {
41 | if (_dir[i].id === userId) {
42 | position = i
43 | }
44 | })
45 | if (position !== null) {
46 | return _dir[position].reason
47 | }
48 | }
49 |
50 | /**
51 | * Get user AFK time.
52 | * @param {string} userId
53 | * @param {object} _dir
54 | * @returns {string}
55 | */
56 | const getAfkTime = (userId, _dir) => {
57 | let position = null
58 | Object.keys(_dir).forEach((i) => {
59 | if (_dir[i].id === userId) {
60 | position = i
61 | }
62 | })
63 | if (position !== null) {
64 | return _dir[position].time
65 | }
66 | }
67 |
68 | /**
69 | * Get user AFK ID.
70 | * @param {string} userId
71 | * @param {object} _dir
72 | * @returns {string}
73 | */
74 | const getAfkId = (userId, _dir) => {
75 | let position = null
76 | Object.keys(_dir).forEach((i) => {
77 | if (_dir[i].id === userId) {
78 | position = i
79 | }
80 | })
81 | if (position !== null) {
82 | return _dir[position].id
83 | }
84 | }
85 |
86 | /**
87 | * Get user AFK index position.
88 | * @param {string} userId
89 | * @param {object} _dir
90 | * @returns {number}
91 | */
92 | const getAfkPosition = (userId, _dir) => {
93 | let position = null
94 | Object.keys(_dir).forEach((i) => {
95 | if (_dir[i].id === userId) {
96 | position = i
97 | }
98 | })
99 | return position
100 | }
101 |
102 | module.exports = {
103 | addAfkUser,
104 | checkAfkUser,
105 | getAfkReason,
106 | getAfkTime,
107 | getAfkId,
108 | getAfkPosition
109 | }
--------------------------------------------------------------------------------
/function/daily.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs-extra')
2 |
3 | /**
4 | * Add user daily limit.
5 | * @param {string} userId
6 | * @param {string} dir
7 | * @param {object} _dir
8 | */
9 | const addLimit = (userId, _dir) => {
10 | const obj = { id: userId, time: Date.now() }
11 | _dir.push(obj)
12 | fs.writeFileSync('./database/user/daily.json', JSON.stringify(_dir))
13 | }
14 |
15 | /**
16 | * Get user time left.
17 | * @param {string} userId
18 | * @param {object} _dir
19 | * @returns {number}
20 | */
21 | const getLimit = (userId, _dir) => {
22 | let position = null
23 | Object.keys(_dir).forEach((i) => {
24 | if (_dir[i].id === userId) {
25 | position = i
26 | }
27 | })
28 | if (position !== null) {
29 | return _dir[position].time
30 | }
31 | }
32 |
33 | module.exports = {
34 | addLimit,
35 | getLimit
36 | }
--------------------------------------------------------------------------------
/function/index.js:
--------------------------------------------------------------------------------
1 | exports.level = require('./level')
2 | exports.daily = require('./daily')
3 | exports.limit = require('./limit')
4 | exports.register = require('./register')
5 | exports.afk = require('./afk')
6 | exports.reminder = require('./reminder')
7 | exports.premium = require('./premium')
8 | exports.loader = require('./loader')
--------------------------------------------------------------------------------
/function/level.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs-extra')
2 |
3 | /**
4 | * Get user ID from db.
5 | * @param {string} userId
6 | * @param {object} _dir
7 | * @returns {string}
8 | */
9 | const getLevelingId = (userId, _dir) => {
10 | let pos = null
11 | let found = false
12 | Object.keys(_dir).forEach((i) => {
13 | if (_dir[i].id === userId) {
14 | pos = i
15 | found = true
16 | }
17 | })
18 | if (found === false && pos === null) {
19 | const obj = { id: userId, xp: 0, level: 1 }
20 | _dir.push(obj)
21 | fs.writeFileSync('./database/user/level.json', JSON.stringify(_dir))
22 | return userId
23 | } else {
24 | return _dir[pos].id
25 | }
26 | }
27 |
28 | /**
29 | * Get user level from db.
30 | * @param {string} userId
31 | * @param {object} _dir
32 | * @returns {number}
33 | */
34 | const getLevelingLevel = (userId, _dir) => {
35 | let pos = null
36 | let found = false
37 | Object.keys(_dir).forEach((i) => {
38 | if (_dir[i].id === userId) {
39 | pos = i
40 | found = true
41 | }
42 | })
43 | if (found === false && pos === null) {
44 | const obj = { id: userId, xp: 0, level: 1 }
45 | _dir.push(obj)
46 | fs.writeFileSync('./database/user/level.json', JSON.stringify(_dir))
47 | return 1
48 | } else {
49 | return _dir[pos].level
50 | }
51 | }
52 |
53 | /**
54 | * Get user XP from db.
55 | * @param {string} userId
56 | * @param {object} _dir
57 | * @returns {number}
58 | */
59 | const getLevelingXp = (userId, _dir) => {
60 | let pos = null
61 | let found = false
62 | Object.keys(_dir).forEach((i) => {
63 | if (_dir[i].id === userId) {
64 | pos = i
65 | found = true
66 | }
67 | })
68 | if (found === false && pos === null) {
69 | const obj = { id: userId, xp: 0, level: 1 }
70 | _dir.push(obj)
71 | fs.writeFileSync('./database/user/level.json', JSON.stringify(_dir))
72 | return 0
73 | } else {
74 | return _dir[pos].xp
75 | }
76 | }
77 |
78 | /**
79 | * Add user level to db.
80 | * @param {string} userId
81 | * @param {number} amount
82 | * @param {object} _dir
83 | */
84 | const addLevelingLevel = (userId, amount, _dir) => {
85 | let position = null
86 | Object.keys(_dir).forEach((i) => {
87 | if (_dir[i].id === userId) {
88 | position = i
89 | }
90 | })
91 | if (position !== null) {
92 | _dir[position].level += amount
93 | fs.writeFileSync('./database/user/level.json', JSON.stringify(_dir))
94 | }
95 | }
96 |
97 | /**
98 | * Add user XP to db.
99 | * @param {string} userId
100 | * @param {number} amount
101 | * @param {object} _dir
102 | */
103 | const addLevelingXp = (userId, amount, _dir) => {
104 | let position = null
105 | Object.keys(_dir).forEach((i) => {
106 | if (_dir[i].id === userId) {
107 | position = i
108 | }
109 | })
110 | if (position !== null) {
111 | _dir[position].xp += amount
112 | fs.writeFileSync('./database/user/level.json', JSON.stringify(_dir))
113 | }
114 | }
115 |
116 | /**
117 | * Get user rank.
118 | * @param {string} userId
119 | * @param {object} _dir
120 | * @returns {number}
121 | */
122 | const getUserRank = (userId, _dir) => {
123 | let position = null
124 | let found = false
125 | _dir.sort((a, b) => (a.xp < b.xp) ? 1 : -1)
126 | Object.keys(_dir).forEach((i) => {
127 | if (_dir[i].id === userId) {
128 | position = i
129 | found = true
130 | }
131 | })
132 | if (found === false && position === null) {
133 | const obj = { id: userId, xp: 0, level: 1 }
134 | _dir.push(obj)
135 | fs.writeFileSync('./database/user/level.json', JSON.stringify(_dir))
136 | return 99
137 | } else {
138 | return position + 1
139 | }
140 | }
141 |
142 | // Cooldown XP gains to prevent spam
143 | const xpGain = new Set()
144 |
145 | /**
146 | * Check is user exist in set.
147 | * @param {string} userId
148 | * @returns {boolean}
149 | */
150 | const isGained = (userId) => {
151 | return !!xpGain.has(userId)
152 | }
153 |
154 | /**
155 | * Add user in set and delete it when it's 1 minute.
156 | * @param {string} userId
157 | */
158 | const addCooldown = (userId) => {
159 | xpGain.add(userId)
160 | setTimeout(() => {
161 | return xpGain.delete(userId)
162 | }, 60000) // Each minute
163 | }
164 |
165 | module.exports = {
166 | getLevelingId,
167 | getLevelingLevel,
168 | getLevelingXp,
169 | addLevelingLevel,
170 | addLevelingXp,
171 | getUserRank,
172 | isGained,
173 | addCooldown
174 | }
--------------------------------------------------------------------------------
/function/limit.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs-extra')
2 |
3 | /**
4 | * Check limit.
5 | * @param {string} userId
6 | * @param {object} _dir
7 | * @param {number} limitCount
8 | * @param {boolean} isPremium
9 | * @param {boolean} isOwner
10 | * @returns {boolean}
11 | */
12 | const isLimit = (userId, _dir, limitCount, isPremium, isOwner) => {
13 | if (isPremium || isOwner) return false
14 | let found = false
15 | for (let i of _dir) {
16 | if (i.id === userId) {
17 | if (i.limit <= 0) {
18 | found = true
19 | return true
20 | } else {
21 | found = true
22 | return false
23 | }
24 | }
25 | }
26 | if (found === false) {
27 | const obj = { id: userId, limit: limitCount }
28 | _dir.push(obj)
29 | fs.writeFileSync('./database/user/limit.json', JSON.stringify(_dir))
30 | return false
31 | }
32 | }
33 |
34 | /**
35 | * Add limit to user.
36 | * @param {string} userId
37 | * @param {object} _dir
38 | * @param {boolean} isPremium
39 | * @param {boolean} isOwner
40 | */
41 | const addLimit = (userId, _dir, isPremium, isOwner) => {
42 | if (isPremium || isOwner) return false
43 | let pos = null
44 | Object.keys(_dir).forEach((i) => {
45 | if (_dir[i].id === userId) {
46 | pos = i
47 | }
48 | })
49 | if (pos !== null) {
50 | _dir[pos].limit -= 1
51 | fs.writeFileSync('./database/user/limit.json', JSON.stringify(_dir))
52 | }
53 | }
54 |
55 | /**
56 | * Get user's limit.
57 | * @param {string} userId
58 | * @param {object} _dir
59 | * @param {number} limitCount
60 | * @returns {number}
61 | */
62 | const getLimit = (userId, _dir, limitCount) => {
63 | let pos = null
64 | let found = false
65 | Object.keys(_dir).forEach((i) => {
66 | if (_dir[i].id === userId) {
67 | pos = i
68 | found = true
69 | }
70 | })
71 | if (found === false && pos === null) {
72 | const obj = { id: userId, limit: limitCount }
73 | _dir.push(obj)
74 | fs.writeFileSync('./database/user/limit.json', JSON.stringify(_dir))
75 | return limitCount
76 | } else {
77 | return _dir[pos].limit
78 | }
79 | }
80 |
81 | module.exports = {
82 | isLimit,
83 | addLimit,
84 | getLimit
85 | }
--------------------------------------------------------------------------------
/function/loader.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-empty-function */
2 | const fs = require('fs-extra')
3 | const { color } = require('../tools')
4 |
5 | /**
6 | * Returns an array of files.
7 | * @param {*} dirPath
8 | * @param {string[]} [arrayOfFiles]
9 | * @returns {string[]}
10 | */
11 | const getAllDirFiles = (dirPath, arrayOfFiles) => {
12 | const files = fs.readdirSync(dirPath)
13 | arrayOfFiles = arrayOfFiles || []
14 | files.forEach((f) => {
15 | if (fs.statSync(dirPath + '/' + f).isDirectory()) {
16 | arrayOfFiles = getAllDirFiles(dirPath + '/' + f, arrayOfFiles)
17 | } else {
18 | arrayOfFiles.push(f)
19 | }
20 | })
21 | return arrayOfFiles
22 | }
23 |
24 | /**
25 | * Uncache a changes.
26 | * @param {*} module
27 | */
28 | const uncache = (module = '.') => {
29 | return new Promise((resolve, reject) => {
30 | try {
31 | delete require.cache[require.resolve(module)]
32 | resolve()
33 | } catch (err) {
34 | reject(err)
35 | }
36 | })
37 | }
38 |
39 | /**
40 | * Delete file cache.
41 | * @param {*} module
42 | * @param {*} call
43 | */
44 | const nocache = (module, call = () => {}) => {
45 | console.log(color('[WATCH]', 'orange'), color(`=> '${module}'`, 'yellow'), 'file is now being watched by me!')
46 | fs.watchFile(require.resolve(module), async () => {
47 | await uncache(require.resolve(module))
48 | call(module)
49 | })
50 | }
51 |
52 | module.exports = {
53 | getAllDirFiles,
54 | uncache,
55 | nocache
56 | }
--------------------------------------------------------------------------------
/function/premium.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs-extra')
2 | const toMs = require('ms')
3 |
4 | /**
5 | * Add premium user.
6 | * @param {string} userId
7 | * @param {string} expired
8 | * @param {object} _dir
9 | */
10 | const addPremiumUser = (userId, expired, _dir) => {
11 | const obj = { id: userId, expired: Date.now() + toMs(expired) }
12 | _dir.push(obj)
13 | fs.writeFileSync('./database/bot/premium.json', JSON.stringify(_dir))
14 | }
15 |
16 | /**
17 | * Get premium user index position.
18 | * @param {string} userId
19 | * @param {object} _dir
20 | * @returns {Number}
21 | */
22 | const getPremiumPosition = (userId, _dir) => {
23 | let position = null
24 | Object.keys(_dir).forEach((i) => {
25 | if (_dir[i].id === userId) {
26 | position = i
27 | }
28 | })
29 | if (position !== null) {
30 | return position
31 | }
32 | }
33 |
34 | /**
35 | * Get premium user expired.
36 | * @param {string} userId
37 | * @param {object} _dir
38 | * @returns {Number}
39 | */
40 | const getPremiumExpired = (userId, _dir) => {
41 | let position = null
42 | Object.keys(_dir).forEach((i) => {
43 | if (_dir[i].id === userId) {
44 | position = i
45 | }
46 | })
47 | if (position !== null) {
48 | return _dir[position].expired
49 | }
50 | }
51 |
52 | /**
53 | * Check if is user premium.
54 | * @param {string} userId
55 | * @param {object} _dir
56 | * @returns {boolean}
57 | */
58 | const checkPremiumUser = (userId, _dir) => {
59 | let status = false
60 | Object.keys(_dir).forEach((i) => {
61 | if (_dir[i].id === userId) {
62 | status = true
63 | }
64 | })
65 | return status
66 | }
67 |
68 | /**
69 | * Constantly checking premium.
70 | * @param {object} _dir
71 | */
72 | const expiredCheck = (_dir) => {
73 | setInterval(() => {
74 | let position = null
75 | Object.keys(_dir).forEach((i) => {
76 | if (Date.now() >= _dir[i].expired) {
77 | position = i
78 | }
79 | })
80 | if (position !== null) {
81 | console.log(`Premium user expired: ${_dir[position].id}`)
82 | _dir.splice(position, 1)
83 | fs.writeFileSync('./database/bot/premium.json', JSON.stringify(_dir))
84 | }
85 | }, 1000)
86 | }
87 |
88 | /**
89 | * Get all premium user ID.
90 | * @param {object} _dir
91 | * @returns {string[]}
92 | */
93 | const getAllPremiumUser = (_dir) => {
94 | const array = []
95 | Object.keys(_dir).forEach((i) => {
96 | array.push(_dir[i].id)
97 | })
98 | return array
99 | }
100 |
101 | module.exports = {
102 | addPremiumUser,
103 | getPremiumExpired,
104 | getPremiumPosition,
105 | expiredCheck,
106 | checkPremiumUser,
107 | getAllPremiumUser
108 | }
109 |
--------------------------------------------------------------------------------
/function/register.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs-extra')
2 |
3 | /**
4 | * Add user to database.
5 | * @param {string} userId
6 | * @param {string} name
7 | * @param {string|number} age
8 | * @param {string} time
9 | * @param {string} serial
10 | * @param {object} _dir
11 | */
12 | const addRegisteredUser = (userId, name, age, time, serial, _dir) => {
13 | const obj = { id: userId, name: name, age: age, time: time, serial: serial }
14 | _dir.push(obj)
15 | fs.writeFileSync('./database/bot/registered.json', JSON.stringify(_dir))
16 | }
17 |
18 | /**
19 | * Check is user registered.
20 | * @param {string} userId
21 | * @param {object} _dir
22 | * @returns {boolean}
23 | */
24 | const checkRegisteredUser = (userId, _dir) => {
25 | let status = false
26 | Object.keys(_dir).forEach((i) => {
27 | if (_dir[i].id === userId) {
28 | status = true
29 | }
30 | })
31 | return status
32 | }
33 |
34 | /**
35 | * Check is user registered from given serial.
36 | * @param {string} serial
37 | * @param {object} _dir
38 | * @returns {boolean}
39 | */
40 | const checkRegisteredUserFromSerial = (serial, _dir) => {
41 | let status = false
42 | Object.keys(_dir).forEach((i) => {
43 | if (_dir[i].serial === serial) {
44 | status = true
45 | }
46 | })
47 | return status
48 | }
49 |
50 | /**
51 | * Get registered user ID.
52 | * @param {string} userId
53 | * @param {object} _dir
54 | * @returns {string}
55 | */
56 | const getRegisteredUserId = (userId, _dir) => {
57 | let position = null
58 | Object.keys(_dir).forEach((i) => {
59 | if (_dir[i].id === userId) {
60 | position = i
61 | }
62 | })
63 | if (position !== null) {
64 | return _dir[position].id
65 | }
66 | }
67 |
68 | /**
69 | * Check user name from serial.
70 | * @param {string} serial
71 | * @param {object} _dir
72 | * @returns {string}
73 | */
74 | const getRegisteredNameFromSerial = (serial, _dir) => {
75 | let position = null
76 | Object.keys(_dir).forEach((i) => {
77 | if (_dir[i].serial === serial) {
78 | position = i
79 | }
80 | })
81 | if (position !== null) {
82 | return _dir[position].name
83 | }
84 | }
85 |
86 | /**
87 | * Check user age from serial.
88 | * @param {string} serial
89 | * @param {object} _dir
90 | * @returns {number}
91 | */
92 | const getRegisteredAgeFromSerial = (serial, _dir) => {
93 | let position = null
94 | Object.keys(_dir).forEach((i) => {
95 | if (_dir[i].serial === serial) {
96 | position = i
97 | }
98 | })
99 | if (position !== null) {
100 | return _dir[position].age
101 | }
102 | }
103 |
104 | /**
105 | * Check user time registration from serial.
106 | * @param {string} serial
107 | * @param {object} _dir
108 | * @returns {string}
109 | */
110 | const getRegisteredTimeFromSerial = (serial, _dir) => {
111 | let position = null
112 | Object.keys(_dir).forEach((i) => {
113 | if (_dir[i].serial === serial) {
114 | position = i
115 | }
116 | })
117 | if (position !== null) {
118 | return _dir[position].time
119 | }
120 | }
121 |
122 | /**
123 | * Check user ID from serial.
124 | * @param {string} serial
125 | * @param {object} _dir
126 | * @returns {string}
127 | */
128 | const getRegisteredIdFromSerial = (serial, _dir) => {
129 | let position = null
130 | Object.keys(_dir).forEach((i) => {
131 | if (_dir[i].serial === serial) {
132 | position = i
133 | }
134 | })
135 | if (position !== null) {
136 | return _dir[position].id
137 | }
138 | }
139 |
140 | /**
141 | * Get random user ID.
142 | * @param {object} _dir
143 | * @returns {string}
144 | */
145 | const getRegisteredRandomId = (_dir) => {
146 | return _dir[Math.floor(Math.random() * _dir.length)].id
147 | }
148 |
149 | module.exports = {
150 | addRegisteredUser,
151 | checkRegisteredUser,
152 | checkRegisteredUserFromSerial,
153 | getRegisteredNameFromSerial,
154 | getRegisteredAgeFromSerial,
155 | getRegisteredTimeFromSerial,
156 | getRegisteredIdFromSerial,
157 | getRegisteredRandomId,
158 | getRegisteredUserId
159 | }
160 |
--------------------------------------------------------------------------------
/function/reminder.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs-extra')
2 | const toMs = require('ms')
3 |
4 | /**
5 | * Add reminder to user.
6 | * @param {string} userId
7 | * @param {string} message
8 | * @param {number} time
9 | * @param {object} _dir
10 | */
11 | const addReminder = (userId, message, time, _dir) => {
12 | const obj = { id: userId, msg: message, time: Date.now() + toMs(time) }
13 | _dir.push(obj)
14 | fs.writeFileSync('./database/user/reminder.json', JSON.stringify(_dir))
15 | }
16 |
17 | /**
18 | * Get reminder.
19 | * @param {string} userId
20 | * @param {object} _dir
21 | * @returns {number}
22 | */
23 | const getReminderTime = (userId, _dir) => {
24 | let position = null
25 | Object.keys(_dir).forEach((i) => {
26 | if(_dir[i].id === userId) {
27 | position = i
28 | }
29 | })
30 | if (position !== null) {
31 | return _dir[position].time
32 | }
33 | }
34 |
35 | /**
36 | * Get reminder message.
37 | * @param {string} userId
38 | * @param {object} _dir
39 | * @returns {string}
40 | */
41 | const getReminderMsg = (userId, _dir) => {
42 | let position = null
43 | Object.keys(_dir).forEach((i) => {
44 | if (_dir[i].id === userId) {
45 | position = i
46 | }
47 | })
48 | if (position !== null) {
49 | return _dir[position].msg
50 | }
51 | }
52 |
53 | /**
54 | * Get position of reminder.
55 | * @param {string} userId
56 | * @param {object} _dir
57 | * @returns {number}
58 | */
59 | const getReminderPosition = (userId, _dir) => {
60 | let position = null
61 | Object.keys(_dir).forEach((i) => {
62 | if (_dir[i].id === userId) {
63 | position = i
64 | }
65 | })
66 | return position
67 | }
68 |
69 | module.exports = {
70 | addReminder,
71 | getReminderTime,
72 | getReminderMsg,
73 | getReminderPosition
74 | }
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-unused-vars */
2 | const { create, Client } = require('@open-wa/wa-automate')
3 | const { color, options } = require('./tools')
4 | const { ind, eng } = require('./message/text/lang/')
5 | const { loader } = require('./function')
6 | const { version, bugs } = require('./package.json')
7 | const msgHandler = require('./message/index.js')
8 | const figlet = require('figlet')
9 | const canvas = require('discord-canvas')
10 | const config = require('./config.json')
11 | const ownerNumber = config.ownerBot
12 | const fs = require('fs-extra')
13 | const { groupLimit, memberLimit } = require('./database/bot/setting.json')
14 |
15 | const start = (hisoka = new Client()) => {
16 | console.log(color(figlet.textSync('HisokaBOT', 'Larry 3D'), 'cyan'))
17 | console.log(color('=> Bot successfully loaded! Database:', 'yellow'), color(loader.getAllDirFiles('./database').length), color('Library:', 'yellow'), color(loader.getAllDirFiles('./lib').length), color('Function:', 'yellow'), color(loader.getAllDirFiles('./function').length))
18 | console.log(color('=> Source code version:', 'yellow'), color(version))
19 | console.log(color('=> Bugs? Errors? Suggestions? Visit here:', 'yellow'), color(bugs.url))
20 | console.log(color('[hisoka]'), color('HisokaBOT is now online!', 'yellow'))
21 | console.log(color('[DEV]', 'cyan'), color('Welcome back, Owner! Hope you are doing well~', 'magenta'))
22 |
23 | //loader.nocache('../message/index.js', (m) => console.log(color('[WATCH]', 'orange'), color(`=> '${m}'`, 'yellow'), 'file is updated!'))
24 |
25 | hisoka.onStateChanged((state) => {
26 | console.log(color('[HISOKA]'), state)
27 | if (state === 'UNPAIRED' || state === 'CONFLICT' || state === 'UNLAUNCHED') hisoka.forceRefocus()
28 | })
29 |
30 | hisoka.onAddedToGroup(async (chat) => {
31 | const gc = await hisoka.getAllGroups()
32 | console.log(color('[HISOKA]'), 'Added a to new group. Name:', color(chat.contact.name, 'yellow'), 'Total members:', color(chat.groupMetadata.participants.length, 'yellow'))
33 | if (chat.groupMetadata.participants.includes(ownerNumber)) {
34 | await hisoka.sendText(chat.id, ind.addedGroup(chat))
35 | } else if (gc.length > groupLimit) {
36 | await hisoka.sendText(chat.id, `Max groups reached!\n\nCurrent status: ${gc.length}/${groupLimit}`)
37 | await hisoka.deleteChat(chat.id)
38 | await hisoka.leaveGroup(chat.id)
39 | } else if (chat.groupMetadata.participants.length < memberLimit) {
40 | await hisoka.sendText(chat.id, `Need at least ${memberLimit} members in group!`)
41 | await hisoka.deleteChat(chat.id)
42 | await hisoka.leaveGroup(chat.id)
43 | } else {
44 | await hisoka.sendText(chat.id, ind.addedGroup(chat))
45 | }
46 | })
47 |
48 | hisoka.onMessage((message) => {
49 | hisoka.getAmountOfLoadedMessages()
50 | .then((msg) => {
51 | if (msg >= 1000) {
52 | console.log(color('[HISOKA]'), color(`Loaded message reach ${msg}, cuting message cache...`, 'yellow'))
53 | hisoka.cutMsgCache()
54 | console.log(color('[HISOKA]'), color('Cache deleted!', 'yellow'))
55 | }
56 | })
57 | msgHandler(bocchi, message)
58 | // require('./message/index.js')(bocchi, message)
59 | })
60 |
61 | hisoka.onIncomingCall(async (callData) => {
62 | await hisoka.sendText(callData.peerJid, ind.blocked(ownerNumber))
63 | await hisoka.contactBlock(callData.peerJid)
64 | console.log(color('[BLOCK]', 'red'), color(`${callData.peerJid} has been blocked.`, 'yellow'))
65 | })
66 |
67 | hisoka.onGlobalParticipantsChanged(async (event) => {
68 | const _welcome = JSON.parse(fs.readFileSync('./database/group/welcome.json'))
69 | const isWelcome = _welcome.includes(event.chat)
70 | const gcChat = await hisoka.getChatById(event.chat)
71 | const pcChat = await hisoka.getContact(event.who)
72 | let { pushname, verifiedName, formattedName } = pcChat
73 | pushname = pushname || verifiedName || formattedName
74 | const { name, groupMetadata } = gcChat
75 | const botNumbers = await hisoka.getHostNumber() + '@c.us'
76 | try {
77 | if (event.action === 'add' && event.who !== botNumbers && isWelcome) {
78 | const pic = await hisoka.getProfilePicFromServer(event.who)
79 | if (pic === undefined) {
80 | var picx = 'https://i.ibb.co/Tq7d7TZ/age-hananta-495-photo.png'
81 | } else {
82 | picx = pic
83 | }
84 | const welcomer = await new canvas.Welcome()
85 | .setUsername(pushname)
86 | .setDiscriminator(event.who.substring(6, 10))
87 | .setMemberCount(groupMetadata.participants.length)
88 | .setGuildName(name)
89 | .setAvatar(picx)
90 | .setColor('border', '#00100C')
91 | .setColor('username-box', '#00100C')
92 | .setColor('discriminator-box', '#00100C')
93 | .setColor('message-box', '#00100C')
94 | .setColor('title', '#00FFFF')
95 | .setBackground('https://www.photohdx.com/images/2016/05/red-blurry-background.jpg')
96 | .toAttachment()
97 | const base64 = `data:image/png;base64,${welcomer.toBuffer().toString('base64')}`
98 | await hisoka.sendFile(event.chat, base64, 'welcome.png', `Welcome ${pushname}!`)
99 | } else if (event.action === 'remove' && event.who !== botNumbers && isWelcome) {
100 | const pic = await hisoka.getProfilePicFromServer(event.who)
101 | if (pic === undefined) {
102 | var picxs = 'https://i.ibb.co/Tq7d7TZ/age-hananta-495-photo.png'
103 | } else {
104 | picxs = pic
105 | }
106 | const bye = await new canvas.Goodbye()
107 | .setUsername(pushname)
108 | .setDiscriminator(event.who.substring(6, 10))
109 | .setMemberCount(groupMetadata.participants.length)
110 | .setGuildName(name)
111 | .setAvatar(picxs)
112 | .setColor('border', '#00100C')
113 | .setColor('username-box', '#00100C')
114 | .setColor('discriminator-box', '#00100C')
115 | .setColor('message-box', '#00100C')
116 | .setColor('title', '#00FFFF')
117 | .setBackground('https://www.photohdx.com/images/2016/05/red-blurry-background.jpg')
118 | .toAttachment()
119 | const base64 = `data:image/png;base64,${bye.toBuffer().toString('base64')}`
120 | await hisoka.sendFile(event.chat, base64, 'welcome.png', `Bye ${pushname}, we will miss you~`)
121 | }
122 | } catch (err) {
123 | console.error(err)
124 | }
125 | })
126 | }
127 |
128 | create(options(start))
129 | .then((hisoka) => start(hisoka))
130 | .catch((err) => console.error(err))
131 |
--------------------------------------------------------------------------------
/lib/downloader.js:
--------------------------------------------------------------------------------
1 | const { fetchJson } = require('../tools/fetcher')
2 | const { twitter } = require('video-url-link')
3 | const { promisify } = require('util')
4 | const config = require('../config.json')
5 | const twtGetInfo = promisify(twitter.getInfo)
6 |
7 | /**
8 | * Get Instagram media from URL.
9 | * @param {string} url
10 | * @returns {Promise
}
11 | */
12 | const insta = (url) => new Promise((resolve, reject) => {
13 | console.log(`Get Instagram media from ${url}`)
14 | fetchJson(`https://api.vhtear.com/instadl?link=${url}&apikey=${config.vhtear}`)
15 | .then((result) => resolve(result))
16 | .catch((err) => reject(err))
17 | })
18 |
19 | /**
20 | * Get TikTok video from URL.
21 | * @param {string} url
22 | * @returns {Promise}
23 | */
24 | const tik = (url) => new Promise((resolve, reject) => {
25 | console.log(`Get TikTok media from ${url}`)
26 | fetchJson(`https://api.vhtear.com/tiktokdl?link=${url}&apikey=${config.vhtear}`)
27 | .then((result) => resolve(result))
28 | .catch((err) => reject(err))
29 | })
30 |
31 | /**
32 | * Get Facebook video from URL.
33 | * @param {string} url
34 | * @returns {Promise}
35 | */
36 | const fb = (url) => new Promise((resolve, reject) => {
37 | console.log(`Get Facebook media from ${url}`)
38 | fetchJson(`https://api.vhtear.com/fbdl?link=${url}&apikey=${config.vhtear}`)
39 | .then((result) => resolve(result))
40 | .catch((err) => reject(err))
41 | })
42 |
43 | /**
44 | * Get YouTube media from URL.
45 | * @param {string} url
46 | * @returns {Promise}
47 | */
48 | const ytdl = (url) => new Promise((resolve, reject) => {
49 | console.log(`Get YouTube media from ${url}`)
50 | fetchJson(`https://api.i-tech.id/dl/yt?key=${config.itech}&link=${url}`)
51 | .then((result) => resolve(result))
52 | .catch((err) => reject(err))
53 | })
54 |
55 | /**
56 | * Get Joox music metadata from title.
57 | * @param {string} title
58 | * @returns {Promise}
59 | */
60 | const joox = (title) => new Promise((resolve, reject) => {
61 | console.log(`Get Joox music from ${title}...`)
62 | fetchJson(`https://api.vhtear.com/music?query=${title}&apikey=${config.vhtear}`)
63 | .then((result) => resolve(result))
64 | .catch((err) => reject(err))
65 | })
66 |
67 | /**
68 | * Get Twitter media from URL.
69 | * @param {string} url
70 | * @returns {Promise}
71 | */
72 | const tweet = (url) => new Promise((resolve, reject) => {
73 | console.log(`Get Twitter media from ${url}`)
74 | twtGetInfo(url, {}, (error, info) => {
75 | if (error) {
76 | reject(error)
77 | } else {
78 | resolve(info)
79 | }
80 | })
81 | })
82 |
83 | /**
84 | * Get TikTok video with no WM.
85 | * @param {string} url
86 | * @returns {Promise}
87 | */
88 | const tikNoWm = (url) => new Promise((resolve, reject) => {
89 | console.log(`Get TikTok with no WM from ${url}`)
90 | fetchJson(`https://videfikri.com/api/tiktok/?url=${url}`)
91 | .then((result) => resolve(result))
92 | .catch((err) => reject(err))
93 | })
94 |
95 | /**
96 | * Get modded APK from moddroid.
97 | * @param {string} query
98 | * @returns {Promise}
99 | */
100 | const modroid = (query) => new Promise((resolve, reject) => {
101 | console.log(`Searching for ${query}...`)
102 | fetchJson(`https://tobz-api.herokuapp.com/api/moddroid?q=${query}&apikey=${config.tobz}`)
103 | .then((result) => resolve(result))
104 | .catch((err) => reject(err))
105 | })
106 |
107 | /**
108 | * Get modded APK from happymod.
109 | * @param {string} query
110 | * @returns {Promise}
111 | */
112 | const happymod = (query) => new Promise((resolve, reject) => {
113 | console.log(`Searching for ${query}...`)
114 | fetchJson(`https://tobz-api.herokuapp.com/api/happymod?q=${query}&apikey=${config.tobz}`)
115 | .then((result) => resolve(result))
116 | .catch((err) => reject(err))
117 | })
118 |
119 | /**
120 | * Get Line sticker from URL.
121 | * @param {string} url
122 | * @returns {Promise}
123 | */
124 | const line = (url) => new Promise((resolve, reject) => {
125 | console.log(`Get Line sticker from ${url}`)
126 | fetchJson(`http://enznoire.herokuapp.com/line?url=${url}`)
127 | .then((result) => resolve(result))
128 | .catch((err) => reject(err))
129 | })
130 |
131 | module.exports = {
132 | fb,
133 | ytdl,
134 | tik,
135 | joox,
136 | insta,
137 | tweet,
138 | tikNoWm,
139 | modroid,
140 | happymod,
141 | line
142 | }
143 |
--------------------------------------------------------------------------------
/lib/fun.js:
--------------------------------------------------------------------------------
1 | const { fetchText, fetchJson } = require('../tools/fetcher')
2 | const config = require('../config.json')
3 |
4 | /**
5 | * Get tebak gambar quiz.
6 | * @returns {object}
7 | */
8 | const tbkgmbr = () => new Promise((resolve, reject) => {
9 | console.log('Getting tebakgambar quiz...')
10 | fetchJson('http://videfikri.com/api/tebakgambar/')
11 | .then((result) => resolve(result))
12 | .catch((err) => reject(err))
13 | })
14 |
15 | /**
16 | * Get hilih text.
17 | * @param {string} query
18 | * @returns {object}
19 | */
20 | const hilihteks = (query) => new Promise((resolve, reject) => {
21 | console.log(`Getting Hilih teks from: ${query}...`)
22 | fetchJson(`https://videfikri.com/api/hilih?query=${query}`)
23 | .then((result) => resolve(result))
24 | .catch((err) => reject(err))
25 | })
26 |
27 | /**
28 | * Fortune-telling about you and your partner.
29 | * @param {string} name
30 | * @param {string} partner
31 | * @returns {object}
32 | */
33 | const pasangan = (name, partner) => new Promise((resolve, reject) => {
34 | console.log(`Checking fortune for ${name} and ${partner}...`)
35 | fetchJson(`https://api.vhtear.com/primbonjodoh?nama=${name}&pasangan=${partner}&apikey=${config.vhtear}`)
36 | .then((result) => resolve(result))
37 | .catch((err) => reject(err))
38 | })
39 |
40 | /**
41 | * Get weekly zodiac fortune.
42 | * @param {string} zodiac
43 | * @returns {object}
44 | */
45 | const zodiak = (zodiac) => new Promise((resolve, reject) => {
46 | console.log(`Get weekly zodiac fortune for ${zodiac}...`)
47 | fetchJson(`https://api.vhtear.com/zodiak?query=${zodiac}&apikey=${config.vhtear}`)
48 | .then((result) => resolve(result))
49 | .catch((err) => reject(err))
50 | })
51 |
52 | /**
53 | * Chat with SimiSimi.
54 | * @param {string} chat
55 | * @returns {object}
56 | */
57 | const simi = (chat) => new Promise((resolve, reject) => {
58 | console.log('Get response from SimSumi...')
59 | fetchJson(`https://videfikri.com/api/simsimi?teks=${chat}`)
60 | .then((result) => resolve(result))
61 | .catch((err) => reject(err))
62 | })
63 |
64 | /**
65 | * Get truth.
66 | * @returns {string}
67 | */
68 | const truth = () => new Promise((resolve, reject) => {
69 | console.log('Get random truth...')
70 | fetchText('https://raw.githubusercontent.com/AlvioAdjiJanuar/random/main/truth.txt')
71 | .then((result) => resolve(result))
72 | .catch((err) => reject(err))
73 | })
74 |
75 | /**
76 | * Get dare.
77 | * @returns {string}
78 | */
79 | const dare = () => new Promise((resolve, reject) => {
80 | console.log('Get random dare...')
81 | fetchText('https://raw.githubusercontent.com/AlvioAdjiJanuar/random/main/dare.txt')
82 | .then((result) => resolve(result))
83 | .catch((err) => reject(err))
84 | })
85 |
86 | /**
87 | * Get weton fortune.
88 | * @param {string} date
89 | * @param {string} month
90 | * @param {string} year
91 | * @returns {object}
92 | */
93 | const weton = (date, month, year) => new Promise((resolve, reject) => {
94 | console.log('Get weton data...')
95 | fetchJson(`https://api.vhtear.com/ramalweton?tgl=${date}&bln=${month}&thn=${year}&apikey=${config.vhtear}`)
96 | .then((result) => resolve(result))
97 | .catch((err) => reject(err))
98 | })
99 |
100 | /**
101 | * Get fresh videos from TikTok.
102 | * @returns {string}
103 | */
104 | const asupan = () => new Promise((resolve, reject) => {
105 | console.log('Fetching video...')
106 | fetchText('http://sansekai.my.id/sansekai.txt')
107 | .then((result) => resolve(result))
108 | .catch((err) => reject(err))
109 | })
110 |
111 | /**
112 | * Get random cita-cita meme.
113 | * @returns {string}
114 | */
115 | const cita = () => new Promise((resolve, reject) => {
116 | console.log('Get random cita-cita...')
117 | fetchText('https://raw.githubusercontent.com/AlvioAdjiJanuar/citacita/main/citacita.txt')
118 | .then((result) => resolve(result))
119 | .catch((err) => reject(err))
120 | })
121 |
122 | /**
123 | * Get Cak Lontong quiz.
124 | * @returns {Promise}
125 | */
126 | const caklontong = () => new Promise((resolve, reject) => {
127 | console.log('Getting caklontong quiz...')
128 | fetchJson(`https://api.vhtear.com/funkuis&apikey=${config.vhtear}`)
129 | .then((result) => resolve(result))
130 | .catch((err) => reject(err))
131 | })
132 |
133 | /**
134 | * Get random dice.
135 | * @returns {string}
136 | */
137 | const dadu = () => new Promise((resolve, reject) => {
138 | console.log('Get sticker....')
139 | fetchText('https://raw.githubusercontent.com/rashidsiregar28/data/main/Dadu')
140 | .then((result) => resolve(result))
141 | .catch((err) => reject(err))
142 | })
143 |
144 | /**
145 | * Get random Doge sticker.
146 | * @returns {string}
147 | */
148 | const doge = () => new Promise((resolve, reject) => {
149 | console.log('Get sticker....')
150 | fetchText('https://raw.githubusercontent.com/rashidsiregar28/data/main/anjing')
151 | .then((result) => resolve(result))
152 | .catch((err) => reject(err))
153 | })
154 |
155 | module.exports = {
156 | pasangan,
157 | zodiak,
158 | simi,
159 | truth,
160 | dare,
161 | weton,
162 | asupan,
163 | cita,
164 | caklontong,
165 | hilihteks,
166 | tbkgmbr,
167 | dadu,
168 | doge
169 | }
170 |
--------------------------------------------------------------------------------
/lib/index.js:
--------------------------------------------------------------------------------
1 | exports.nsfw = require('./nsfw')
2 | exports.weeaboo = require('./weeaboo')
3 | exports.downloader = require('./downloader')
4 | exports.fun = require('./fun')
5 | exports.misc = require('./misc')
6 | exports.toxic = require('./toxic')
--------------------------------------------------------------------------------
/lib/misc.js:
--------------------------------------------------------------------------------
1 | const { fetchJson, fetchText } = require('../tools/fetcher')
2 | const config = require('../config.json')
3 | const moment = require('moment-timezone')
4 | const needle = require('needle')
5 |
6 | /**
7 | * Remove image background.
8 | * @param {string} query
9 | * @returns {Promise}
10 | */
11 | const stickernobg = (query) => new Promise((resolve, reject) => {
12 | console.log('Converting sticker no bg...')
13 | fetchJson(`https://api.vhtear.com/removebgwithurl?link=${query}&apikey=${config.vhtear}`)
14 | .then((result) => resolve(result))
15 | .catch((err) => reject(err))
16 | })
17 |
18 | /**
19 | * Get random quotes.
20 | * @returns {Promise}
21 | */
22 | const quotes = () => new Promise((resolve, reject) => {
23 | console.log('Getting random quotes...')
24 | fetchJson('https://videfikri.com/api/randomquotes/')
25 | .then((result) => resolve(result))
26 | .catch((err) => reject(err))
27 | })
28 |
29 | /**
30 | * Sending call.
31 | * @param {string} phoneNumber
32 | * @returns {Promise}
33 | */
34 | const call = (phoneNumber) => new Promise((resolve, reject) => {
35 | console.log(`Calling number: ${phoneNumber}...`)
36 | fetchJson(`https://videfikri.com/api/call?nohp=${phoneNumber}`)
37 | .then((result) => resolve(result))
38 | .catch((err) => reject(err))
39 | })
40 |
41 | /**
42 | * Sending email.
43 | * @param {string} emailTarget
44 | * @param {string} subjectEmail
45 | * @param {string} messageEmail
46 | * @returns {Promise}
47 | */
48 | const email = (emailTarget, subjectEmail, messageEmail) => new Promise((resolve, reject) => {
49 | console.log(`Sending email to: ${emailTarget}\nSubject: ${subjectEmail}\nMessage: ${messageEmail}`)
50 | fetchJson(`https://videfikri.com/api/spamemail?email=${emailTarget}&subjek=${subjectEmail}&pesan=${messageEmail}`)
51 | .then((result) => resolve(result))
52 | .catch((err) => reject(err))
53 | })
54 |
55 | /**
56 | * Search for IG story.
57 | * @param {string} query
58 | * @returns {Promise}
59 | */
60 | const its = (query) => new Promise((resolve, reject) => {
61 | console.log('Searching for IG Story...')
62 | fetchJson(`https://api.vhtear.com/igstory?query=${query}&apikey=${config.vhtear}`)
63 | .then((result) => resolve(result))
64 | .catch((err) => reject(err))
65 | })
66 |
67 | /**
68 | * Search for Alkitab.
69 | * @param {string} query
70 | * @returns {Promise}
71 | */
72 | const alkitab = (query) => new Promise((resolve, reject) => {
73 | console.log('Searching for Alkitab info...')
74 | fetchJson(`https://docs-jojo.herokuapp.com/api/alkitabsearch?q=${query}`)
75 | .then((result) => resolve(result))
76 | .catch((err) => reject(err))
77 | })
78 |
79 | /**
80 | * Get new Line sticker.
81 | * @returns {Promise}
82 | */
83 | const linesticker = () => new Promise((resolve, reject) => {
84 | console.log('Get latest Line sticker...')
85 | fetchJson(`https://api.vhtear.com/newsticker?apikey=${config.vhtear}`)
86 | .then((result) => resolve(result))
87 | .catch((err) => reject(err))
88 | })
89 |
90 | /**
91 | * Get lyric from title or lyric of the song itself.
92 | * @param {string} query
93 | * @returns {Promise}
94 | */
95 | const lirik = (query) => new Promise((resolve, reject) => {
96 | console.log(`Searching lyrics for ${query}...`)
97 | fetchJson(`https://api.vhtear.com/liriklagu?query=${query}&apikey=${config.vhtear}`)
98 | .then((result) => resolve(result))
99 | .catch((err) => reject(err))
100 | })
101 |
102 | /**
103 | * Get Wikipedia result for Indonesian language from given query.
104 | * @param {string} query
105 | * @returns {Promise}
106 | */
107 | const wiki = (query) => new Promise((resolve, reject) => {
108 | console.log(`Get result for ${query} in Wikipedia...`)
109 | fetchJson(`https://docs-jojo.herokuapp.com/api/wiki?q=${query}`)
110 | .then((result) => resolve(result))
111 | .catch((err) => reject(err))
112 | })
113 |
114 | /**
115 | * Get Wikipedia result for English language from given query.
116 | * @param {string} query
117 | * @returns {Promise}
118 | */
119 | const wikien = (query) => new Promise((resolve, reject) => {
120 | console.log(`Get result for ${query} in Wikipedia...`)
121 | fetchJson(`https://videfikri.com/api/wikieng?query=${query}`)
122 | .then((result) => resolve(result))
123 | .catch((err) => reject(err))
124 | })
125 |
126 | /**
127 | * Get Indonesian word definition from KBBI (Kamus Besar Bahasa Indonesia).
128 | * @param {string} word
129 | * @returns {Promise}
130 | */
131 | const kbbi = (word) => new Promise((resolve, reject) => {
132 | console.log(`Searching definition for ${word} in KBBI...`)
133 | fetchJson(`https://api.vhtear.com/kbbi?query=${word}&apikey=${config.vhtear}`)
134 | .then((result) => resolve(result))
135 | .catch((err) => reject(err))
136 | })
137 |
138 | /**
139 | * Get distance information.
140 | * @param {string} from
141 | * @param {string} to
142 | * @returns {Promise}
143 | */
144 | const distance = (from, to) => new Promise((resolve, reject) => {
145 | console.log('Get data and calculate it...')
146 | fetchJson(`https://api.vhtear.com/distance?from=${from}&to=${to}&apikey=${config.vhtear}`)
147 | .then((result) => resolve(result))
148 | .catch((err) => reject(err))
149 | })
150 |
151 | /**
152 | * Get latest earthquake info in Indonesia from BMKG (Badan Meteorologi Klimatologi dan Geofisika).
153 | * @returns {Promise}
154 | */
155 | const bmkg = () => new Promise((resolve, reject) => {
156 | console.log('Get data from BMKG...')
157 | fetchJson('https://docs-jojo.herokuapp.com/api/infogempa')
158 | .then((result) => resolve(result))
159 | .catch((err) => reject(err))
160 | })
161 |
162 | /**
163 | * Get Instagram account info from username.
164 | * @param {string} username
165 | * @returns {Promise}
166 | */
167 | const igStalk = (username) => new Promise((resolve, reject) => {
168 | console.log(`Searching account for ${username}`)
169 | fetchJson(`https://docs-jojo.herokuapp.com/api/stalk?username=${username}`)
170 | .then((result) => resolve(result))
171 | .catch((err) => reject(err))
172 | })
173 |
174 | /**
175 | * Get phone info from GSMArena.
176 | * @param {string} model
177 | * @returns {Promise}
178 | */
179 | const gsmarena = (model) => new Promise((resolve, reject) => {
180 | console.log(`Get phone info from GSMArena for ${model}...`)
181 | fetchJson(`https://api.vhtear.com/gsmarena?query=${model}&apikey=${config.vhtear}`)
182 | .then((result) => resolve(result))
183 | .catch((err) => reject(err))
184 | })
185 |
186 | /**
187 | * Get food receipt.
188 | * @param {string} food
189 | * @returns {Promise}
190 | */
191 | const resep = (food) => new Promise((resolve, reject) => {
192 | console.log(`Get receipt for ${food}...`)
193 | fetchJson(`https://api.vhtear.com/resepmasakan?query=${food}&apikey=${config.vhtear}`)
194 | .then((result) => resolve(result))
195 | .catch((err) => reject(err))
196 | })
197 |
198 | /**
199 | * Search for WhatsApp sticker.
200 | * @param {string} query
201 | * @returns {Promise}
202 | */
203 | const sticker = (query) => new Promise((resolve, reject) => {
204 | console.log('Searching for sticker...')
205 | fetchJson(`https://api.vhtear.com/wasticker?query=${query}&apikey=${config.vhtear}`)
206 | .then((result) => resolve(result))
207 | .catch((err) => reject(err))
208 | })
209 |
210 | /**
211 | * Get YouTube search results.
212 | * @param {string} query
213 | * @returns {Promise}
214 | */
215 | const ytSearch = (query) => new Promise((resolve, reject) => {
216 | console.log(`Get YouTube search results for ${query}...`)
217 | fetchJson(`https://api.vhtear.com/youtube?query=${query}&apikey=${config.vhtear}`)
218 | .then((result) => resolve(result))
219 | .catch((err) => reject(err))
220 | })
221 |
222 | /**
223 | * Get Play Store search results.
224 | * @param {string} query
225 | * @returns {Promise}
226 | */
227 | const playstore = (query) => new Promise((resolve, reject) => {
228 | console.log(`Get Play Store search results for ${query}...`)
229 | fetchJson(`https://api.vhtear.com/playstore?query=${query}&apikey=${config.vhtear}`)
230 | .then((result) => resolve(result))
231 | .catch((err) => reject(err))
232 | })
233 |
234 | /**
235 | * Get Shopee search results.
236 | * @param {string} query
237 | * @param {string} count
238 | * @returns {Promise}
239 | */
240 | const shopee = (query, count) => new Promise((resolve, reject) => {
241 | console.log(`Get Shopee search results for ${query}...`)
242 | fetchJson(`https://api.vhtear.com/shopee?query=${query}&count=${count}&apikey=${config.vhtear}`)
243 | .then((result) => resolve(result))
244 | .catch((err) => reject(err))
245 | })
246 |
247 | /**
248 | * Show surah list.
249 | * @returns {Promise}
250 | */
251 | const listSurah = () => new Promise((resolve, reject) => {
252 | console.log('Get Al-Qur\'an list...')
253 | fetchJson(`https://api.vhtear.com/quranlist?&apikey=${config.vhtear}`)
254 | .then((result) => resolve(result))
255 | .catch((err) => reject(err))
256 | })
257 |
258 | /**
259 | * Get surah.
260 | * @param {string} surah
261 | * @returns {Promise}
262 | */
263 | const getSurah = (surah) => new Promise((resolve, reject) => {
264 | console.log(`Getting Al-Qur'an surah ${surah}...`)
265 | fetchJson(`https://api.vhtear.com/quran?no=${surah}&apikey=${config.vhtear}`)
266 | .then((result) => resolve(result))
267 | .catch((err) => reject(err))
268 | })
269 |
270 | /**
271 | * Get motivation text.
272 | * @returns {string}
273 | */
274 | const motivasi = () => new Promise((resolve, reject) => {
275 | console.log('Get motivation text...')
276 | fetchText('https://raw.githubusercontent.com/VideFrelan/motivasi/main/motivasi.txt')
277 | .then((result) => resolve(result))
278 | .catch((err) => reject(err))
279 | })
280 |
281 | /**
282 | * Play YT.
283 | * @param {string} query
284 | * @returns {Promise}
285 | */
286 | const ytPlay = (query) => new Promise((resolve, reject) => {
287 | console.log(`Searching for ${query} in YouTube...`)
288 | fetchJson(`https://api.vhtear.com/ytmp3?query=${query}&apikey=${config.vhtear}`)
289 | .then((result) => resolve(result))
290 | .catch((err) => reject(err))
291 | })
292 |
293 | /**
294 | * IP look-up.
295 | * @param {string} ip
296 | * @returns {Promise}
297 | */
298 | const whois = (ip) => new Promise((resolve, reject) => {
299 | console.log(`Look-up IP for ${ip}`)
300 | fetchJson(`https://api.vhtear.com/ipwhois?ipaddr=${ip}&apikey=${config.vhtear}`)
301 | .then((result) => resolve(result))
302 | .catch((err) => reject(err))
303 | })
304 |
305 | /**
306 | * Create shortlink.
307 | * @param {string} url
308 | * @returns {Promise}
309 | */
310 | const shortener = (url) => new Promise((resolve, reject) => {
311 | console.log('Creating shortlink...')
312 | fetchText(`https://tinyurl.com/api-create.php?url=${url}`)
313 | .then((text) => resolve(text))
314 | .catch((err) => reject(err))
315 | })
316 |
317 | /**
318 | * SMS gateway.
319 | * @param {string} number
320 | * @param {string} msg
321 | * @returns {Promise}
322 | */
323 | const sms = (number, msg) => new Promise((resolve, reject) => {
324 | console.log(`Sending SMS to ${number} with message: ${msg}`)
325 | fetchJson(`https://api.i-tech.id/special/sms?key=${config.itech}&no=${number}&msg=${msg}`)
326 | .then((result) => resolve(result))
327 | .catch((err) => reject(err))
328 | })
329 |
330 | /**
331 | * Get jadwal sholat.
332 | * @param {string} city
333 | * @returns {Promise}
334 | */
335 | const jadwalSholat = (city) => new Promise((resolve, reject) => {
336 | const url = 'https://api.banghasan.com/sholat/format/json'
337 | const kodeKota = new Array()
338 | const tanggal = moment.tz('Asia/Jakarta').format('YYYY-MM-DD')
339 | console.log(`Get jadwal sholat for ${city}...`)
340 | needle(url + '/kota/nama/' + city, (err, resp, body) => {
341 | if (err) throw err
342 | switch (body.kota.length) {
343 | case 0:
344 | reject('Kota tidak ditemukan!')
345 | break
346 | default:
347 | kodeKota.push(body.kota[0]['id'])
348 | needle(url + '/jadwal/kota/' + kodeKota[0] + '/tanggal/' + tanggal, (err, resp, body) => {
349 | if (err) throw err
350 | resolve([body.jadwal.data])
351 | })
352 | break
353 | }
354 | })
355 | })
356 |
357 | /**
358 | * Search for movie.
359 | * @param {string} title
360 | * @returns {Promise}
361 | */
362 | const movie = (title) => new Promise((resolve, reject) => {
363 | console.log(`Searching for Movie ${title}...`)
364 | fetchJson(`https://api.vhtear.com/downloadfilm?judul=${title}&apikey=${config.vhtear}`)
365 | .then((result) => resolve(result))
366 | .catch((err) => reject(err))
367 | })
368 |
369 | /**
370 | * Calculate travel payment.
371 | * @param {string} courier
372 | * @param {string} from
373 | * @param {string} to
374 | * @returns {Promise}
375 | */
376 | const ongkir = (courier, from, to) => new Promise((resolve, reject) => {
377 | console.log('Checking ongkir...')
378 | fetchJson(`https://api.vhtear.com/cekongkir?kurir=${courier}&fromcity=${from}&tocity=${to}&apikey=${config.vhtear}`)
379 | .then((result) => resolve(result))
380 | .catch((err) => reject(err))
381 | })
382 |
383 | /**
384 | * Get Twitter trending.
385 | * @returns {Promise}
386 | */
387 | const trendingTwt = () => new Promise((resolve, reject) => {
388 | console.log('Get Twitter trending...')
389 | fetchJson('https://docs-jojo.herokuapp.com/api/trendingtwitter')
390 | .then((result) => resolve(result))
391 | .catch((err) => reject(err))
392 | })
393 |
394 | /**
395 | * Get job seek data.
396 | * @returns {Promise}
397 | */
398 | const jobSeek = () => new Promise((resolve, reject) => {
399 | console.log('Searching for jobs...')
400 | fetchJson('https://docs-jojo.herokuapp.com/api/infoloker')
401 | .then((result) => resolve(result))
402 | .catch((err) => reject(err))
403 | })
404 |
405 | /**
406 | * Sending hoax update.
407 | * @returns {Promise}
408 | */
409 | const infoHoax = () => new Promise((resolve, reject) => {
410 | console.log('Checking hoaxes...')
411 | fetchJson('https://docs-jojo.herokuapp.com/api/infohoax')
412 | .then((result) => resolve(result))
413 | .catch((err) => reject(err))
414 | })
415 |
416 | /**
417 | * Sending spam SMS.
418 | * @param {Number} no
419 | * @param {Number} amount
420 | * @returns {Promise}
421 | */
422 | const spamsms = (no, amount) => new Promise((resolve, reject) => {
423 | console.log(`Sending spam SMS to: ${no}`)
424 | fetchJson(`https://docs-jojo.herokuapp.com/api/spamsms?no=${no}&jum=${amount}`)
425 | .then((result) => resolve(result))
426 | .catch((err) => reject(err))
427 | })
428 |
429 | /**
430 | * Create TTP.
431 | * @param {string} text
432 | * @returns {Promise}
433 | */
434 | const ttp = (text) => new Promise((resolve, reject) => {
435 | console.log('Creating TTP...')
436 | fetchJson(`https://api.areltiyan.site/sticker_maker?text=${encodeURIComponent(text)}`)
437 | .then((result) => resolve(result))
438 | .catch((err) => reject(err))
439 | })
440 |
441 | /**
442 | * Search for Result Casses Corona.
443 | * @param {string} query
444 | * @returns {Promise}
445 | */
446 | const corona = (country) => new Promise((resolve, reject) => {
447 | console.log(`Search for country ${country}`)
448 | fetchJson(`https://coronavirus-19-api.herokuapp.com/countries/${country}/`)
449 | .then((result) => resolve(result))
450 | .catch((err) => reject(err))
451 | })
452 |
453 | module.exports = {
454 | lirik,
455 | wiki,
456 | kbbi,
457 | bmkg,
458 | igStalk,
459 | gsmarena,
460 | resep,
461 | sticker,
462 | ytSearch,
463 | playstore,
464 | shopee,
465 | listSurah,
466 | getSurah,
467 | motivasi,
468 | ytPlay,
469 | whois,
470 | shortener,
471 | sms,
472 | linesticker,
473 | jadwalSholat,
474 | alkitab,
475 | movie,
476 | ongkir,
477 | its,
478 | distance,
479 | trendingTwt,
480 | jobSeek,
481 | infoHoax,
482 | spamsms,
483 | email,
484 | call,
485 | quotes,
486 | wikien,
487 | stickernobg,
488 | ttp,
489 | corona
490 | }
491 |
--------------------------------------------------------------------------------
/lib/nsfw.js:
--------------------------------------------------------------------------------
1 | const { fetchJson } = require('../tools/fetcher')
2 | const ph = require('@justalk/pornhub-api')
3 | const config = require('../config.json')
4 |
5 | /**
6 | * Get random lewd images from given subreddits.
7 | * @returns {Promise}
8 | */
9 | const randomLewd = () => new Promise((resolve, reject) => {
10 | const tag = ['ecchi', 'lewdanimegirls', 'hentai', 'hentaifemdom', 'hentaiparadise', 'hentai4everyone', 'animearmpits', 'animefeets', 'animethighss', 'animebooty', 'biganimetiddies', 'animebellybutton', 'sideoppai', 'ahegao']
11 | const randTag = tag[Math.floor(Math.random() * tag.length)]
12 | console.log(`Searching lewd from ${randTag} subreddit...`)
13 | fetchJson(`https://meme-api.herokuapp.com/gimme/${randTag}`)
14 | .then((result) => resolve(result))
15 | .catch((err) => reject(err))
16 | })
17 |
18 | /**
19 | * Get armpits pict.
20 | * @returns {Promise}
21 | */
22 | const armpits = () => new Promise((resolve, reject) => {
23 | console.log('Searching for armpits...')
24 | fetchJson('https://meme-api.herokuapp.com/gimme/animearmpits')
25 | .then((result) => resolve(result))
26 | .catch((err) => reject(err))
27 | })
28 |
29 | /**
30 | * Get feets pict.
31 | * @returns {Promise}
32 | */
33 | const feets = () => new Promise((resolve, reject) => {
34 | console.log('Searching for feets...')
35 | fetchJson('https://meme-api.herokuapp.com/gimme/animefeets')
36 | .then((result) => resolve(result))
37 | .catch((err) => reject(err))
38 | })
39 |
40 | /**
41 | * Get thighs pict.
42 | * @returns {Promise}
43 | */
44 | const thighs = () => new Promise((resolve, reject) => {
45 | console.log('Searching for thighs...')
46 | fetchJson('https://meme-api.herokuapp.com/gimme/animethighss')
47 | .then((result) => resolve(result))
48 | .catch((err) => reject(err))
49 | })
50 |
51 | /**
52 | * Get ass pict.
53 | * @returns {Promise}
54 | */
55 | const ass = () => new Promise((resolve, reject) => {
56 | console.log('Searching for ass...')
57 | fetchJson('https://meme-api.herokuapp.com/gimme/animebooty')
58 | .then((result) => resolve(result))
59 | .catch((err) => reject(err))
60 | })
61 |
62 | /**
63 | * Get boobs pict.
64 | * @returns {Promise}
65 | */
66 | const boobs = () => new Promise((resolve, reject) => {
67 | console.log('Searching for boobs...')
68 | fetchJson('https://meme-api.herokuapp.com/gimme/biganimetiddies')
69 | .then((result) => resolve(result))
70 | .catch((err) => reject(err))
71 | })
72 |
73 | /**
74 | * Get belly pict.
75 | * @returns {Promise}
76 | */
77 | const belly = () => new Promise((resolve, reject) => {
78 | console.log('Searching for belly...')
79 | fetchJson('https://meme-api.herokuapp.com/gimme/animebellybutton')
80 | .then((result) => resolve(result))
81 | .catch((err) => reject(err))
82 | })
83 |
84 | /**
85 | * Get sideboobs pict.
86 | * @returns {Promise}
87 | */
88 | const sideboobs = () => new Promise((resolve, reject) => {
89 | console.log('Searching for sideboobs...')
90 | fetchJson('https://meme-api.herokuapp.com/gimme/sideoppai')
91 | .then((result) => resolve(result))
92 | .catch((err) => reject(err))
93 | })
94 |
95 | /**
96 | * Get ahegao pict.
97 | * @returns {Promise}
98 | */
99 | const ahegao = () => new Promise((resolve, reject) => {
100 | console.log('Searching for ahegao...')
101 | fetchJson('https://meme-api.herokuapp.com/gimme/ahegao')
102 | .then((result) => resolve(result))
103 | .catch((err) => reject(err))
104 | })
105 |
106 | /**
107 | * Get Pornhub metadata from URL.
108 | * @param {string} url
109 | * @returns {Promise}
110 | */
111 | const phDl = (url) => new Promise((resolve, reject) => {
112 | console.log(`Get Pornhub metadata from ${url}`)
113 | ph.page(url, ['title', 'download_urls', 'thumbnail_url'])
114 | .then((result) => resolve(result))
115 | .catch((err) => reject(err))
116 | })
117 |
118 | /**
119 | * Get XXX video from URL.
120 | * @param {string} url
121 | * @returns {Promise}
122 | */
123 | const xxx = (url) => new Promise((resolve, reject) => {
124 | console.log(`Get XXX video from ${url}`)
125 | fetchJson(`https://api.vhtear.com/xxxdownload?link=${url}&apikey=${config.vhtear}`)
126 | .then((result) => resolve(result))
127 | .catch((err) => reject(err))
128 | })
129 |
130 | /**
131 | * Get random cersex.
132 | * @returns {Promise}
133 | */
134 | const cersex = () => new Promise((resolve, reject) => {
135 | console.log('Get random cersex...')
136 | fetchJson(`https://api.vhtear.com/cerita_sex&apikey=${config.vhtear}`)
137 | .then((result) => resolve(result))
138 | .catch((err) => reject(err))
139 | })
140 |
141 | module.exports = {
142 | randomLewd,
143 | armpits,
144 | feets,
145 | thighs,
146 | ass,
147 | boobs,
148 | belly,
149 | sideboobs,
150 | ahegao,
151 | phDl,
152 | xxx,
153 | cersex
154 | }
155 |
--------------------------------------------------------------------------------
/lib/toxic.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-undef */
2 |
3 | /**
4 | * Get random toxic.
5 | * @returns {string}
6 | */
7 | module.exports = toxic = () => {
8 | const kata = [
9 | 'kontol',
10 | 'memek',
11 | 'anjing',
12 | 'babi',
13 | 'monyet',
14 | 'kunyuk',
15 | 'bajingan',
16 | 'asu',
17 | 'bangsat',
18 | 'ngetot',
19 | 'ngete',
20 | 'perek',
21 | 'lonte',
22 | 'bencong',
23 | 'jablay',
24 | 'bego',
25 | 'goblok',
26 | 'idiot',
27 | 'geblek',
28 | 'sinting',
29 | 'tolol',
30 | 'sarap',
31 | 'buta',
32 | 'budek',
33 | 'bolot',
34 | 'ngehe',
35 | 'gembel',
36 | 'brengsek',
37 | 'bgst',
38 | 'knnl',
39 | 'mek',
40 | 'jmbt',
41 | 'asu',
42 | 'anjg',
43 | 'ngtd',
44 | 'ajg',
45 | 'tol',
46 | 'tai',
47 | 'tolo',
48 | 'tlol',
49 | 'asyu',
50 | 'asw',
51 | 'tempik',
52 | 'gay',
53 | 'lesbi',
54 | 'setan',
55 | 'cangcut',
56 | 'bagong',
57 | 'ngentot',
58 | 'goblog',
59 | 'pepek'
60 | //Tambahin Sendiri Aja
61 | ]
62 | const randKata = kata[Math.floor(Math.random() * kata.length)]
63 | const list = [
64 | `muka lo kek ${randKata}`, `anda tau ${randKata} ?`,`${randKata} Lo ${randKata}`,
65 | `ngapa ${randKata} ga seneng?`,`ribut sini lo ${randKata}`,`jangan ngakak lo ${randKata}`,
66 | `wey ${randKata}!!`,`aku sih owh aja ya ${randKata}`,`ga seneng send lokasi lo ${randKata}`,
67 | `capek w ${randKata}`, `hari ini kau minat gelut ${kata[2]} ?`, `w tw lo itu ${randKata}`,
68 | `w ganteng dan lo kek ${randKata}`,`bucin lo ${randKata}`,
69 | `najis baperan kek ${randKata}`,
70 | `nge-teh ${randKata}`,`gaya lo sok iye, mukalo kek ${randKata}`,`${randKata} awokwowkok`
71 | ]
72 | return list[Math.floor(Math.random() * list.length)]
73 | }
74 |
75 | //created by piyo
76 |
--------------------------------------------------------------------------------
/lib/weeaboo.js:
--------------------------------------------------------------------------------
1 | const { fetchJson, fetchText } = require('../tools/fetcher')
2 | const config = require('../config.json')
3 |
4 | /**
5 | * Get anime info from Kusonime.
6 | * @param {string} title
7 | * @returns {Promise}
8 | */
9 | const anime = (title) => new Promise((resolve, reject) => {
10 | console.log(`Get anime info from Kusonime for ${title}...`)
11 | fetchJson(`https://arugaz.herokuapp.com/api/kuso?q=${title}`)
12 | .then((result) => resolve(result))
13 | .catch((err) => reject(err))
14 | })
15 |
16 | /**
17 | * Get manga info from Komiku.
18 | * @param {string} title
19 | * @returns {Promise}
20 | */
21 | const manga = (title) => new Promise((resolve, reject) => {
22 | console.log(`Get manga info from Komiku for ${title}...`)
23 | fetchJson(`https://arugaz.herokuapp.com/api/komiku?q=${title}`)
24 | .then((result) => resolve(result))
25 | .catch((err) => reject(err))
26 | })
27 |
28 | /**
29 | * Get random waifu image.
30 | * @param {boolean} [nsfw=false]
31 | * @returns {Promise}
32 | */
33 | const waifu = (nsfw) => new Promise((resolve, reject) => {
34 | if (nsfw === true) {
35 | console.log('Get NSFW waifu image...')
36 | fetchJson('https://waifu.pics/api/nsfw/waifu')
37 | .then((result) => resolve(result))
38 | .catch((err) => reject(err))
39 | } else {
40 | console.log('Get SFW waifu image...')
41 | fetchJson('https://waifu.pics/api/sfw/waifu')
42 | .then((result) => resolve(result))
43 | .catch((err) => reject(err))
44 | }
45 | })
46 |
47 | /**
48 | * Search for anime source from image.
49 | * @param {Buffer} imageBase64
50 | * @returns {Promise}
51 | */
52 | const wait = (imageBase64) => new Promise((resolve, reject) => {
53 | console.log('Searching for anime source...')
54 | fetchJson('https://trace.moe/api/search', {
55 | method: 'POST',
56 | body: JSON.stringify({ image: imageBase64 }),
57 | headers: { 'Content-Type': 'application/json' }
58 | })
59 | .then((result) => resolve(result))
60 | .catch((err) => reject(err))
61 | })
62 |
63 | /**
64 | * Get Anitoki latest update.
65 | * @returns {Promise}
66 | */
67 | const anitoki = () => new Promise((resolve, reject) => {
68 | console.log('Get Anitoki latest update...')
69 | fetchJson(`https://melodicxt.herokuapp.com/api/anitoki?apiKey=${config.melodic}`)
70 | .then((result) => resolve(result))
71 | .catch((err) => reject(err))
72 | })
73 |
74 | /**
75 | * Get Neonime latest update.
76 | * @returns {Promise}
77 | */
78 | const neonime = () => new Promise((resolve, reject) => {
79 | console.log('Get Neonime latest update...')
80 | fetchJson('https://enznoire.herokuapp.com/neolatest')
81 | .then((result) => resolve(result))
82 | .catch((err) => reject(err))
83 | })
84 |
85 | /**
86 | * Get Anoboy anime on-going list.
87 | * @returns {Promise}
88 | */
89 | const anoboy = () => new Promise((resolve, reject) => {
90 | console.log('Get Anoboy on-going...')
91 | fetchJson(`https://api.vhtear.com/ongoinganoboy&apikey=${config.vhtear}`)
92 | .then((result) => resolve(result))
93 | .catch((err) => reject(err))
94 | })
95 |
96 | /**
97 | * Get Random anime sticker
98 | * @returns {string}
99 | */
100 | const snime = () => new Promise((resolve, reject) => {
101 | console.log('Get anime sticker...')
102 | fetchText('https://raw.githubusercontent.com/rashidsiregar28/data/main/animestick')
103 | .then((result) => resolve(result))
104 | .catch((err) => reject(err))
105 | })
106 |
107 | module.exports = {
108 | anime,
109 | manga,
110 | waifu,
111 | wait,
112 | anitoki,
113 | neonime,
114 | anoboy,
115 | snime
116 | }
117 |
--------------------------------------------------------------------------------
/message/text/lang/eng.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable quotes */
2 | const fs = require('fs-extra')
3 | const { prefix, ownerNumber } = JSON.parse(fs.readFileSync('config.json'))
4 |
5 | exports.wait = () => {
6 | return `Please wait a moment~`
7 | }
8 |
9 | exports.ok = () => {
10 | return `Ok desu~`
11 | }
12 |
13 | exports.wrongFormat = () => {
14 | return `Incorrect format! Please check the usage in *${prefix}menu*.`
15 | }
16 |
17 | exports.emptyMess = () => {
18 | return `Please enter the message!`
19 | }
20 |
21 | exports.cmdNotFound = (cmd) => {
22 | return `Command *${prefix}${cmd}* not found!`
23 | }
24 |
25 | exports.blocked = () => {
26 | return `Bot not receiving calls. You have been blocked because breaking the rules!\n\nContact the owner: wa.me/${ownerNumber.replace('@c.us', '')}`
27 | }
28 |
29 | exports.ownerOnly = () => {
30 | return `This command only Owner-sama can use!`
31 | }
32 |
33 | exports.doneOwner = () => {
34 | return `Done, Owner-sama~`
35 | }
36 |
37 | exports.groupOnly = () => {
38 | return `This command can only be used in group!`
39 | }
40 |
41 | exports.adminOnly = () => {
42 | return `This command can only be used by group admins!`
43 | }
44 |
45 | exports.notNsfw = () => {
46 | return `NSFW command hasn't been enabled!`
47 | }
48 |
49 | exports.nsfwOn = () => {
50 | return `NSFW command was successfully *enabled*!`
51 | }
52 |
53 | exports.nsfwOff = () => {
54 | return `NSFW command was successfully *disabled*!`
55 | }
56 |
57 | exports.nsfwAlready = () => {
58 | return `NSFW command was successfully enabled before.`
59 | }
60 |
61 | exports.addedGroup = (chat) => {
62 | return `Thank you for inviting me, members of *${chat.contact.name}*!\n\nPlease register by typing:\n*${prefix}register* name | age`
63 | }
64 |
65 | exports.nhFalse = () => {
66 | return `Invalid code!`
67 | }
68 |
69 | exports.listBlock = (blockNumber) => {
70 | return `------[ HALL OF SHAME ]------\n\nTotal blocked: *${blockNumber.length}* user(s)\n`
71 | }
72 |
73 | exports.notPremium = () => {
74 | return `Sorry! This command can only be used by premium users.`
75 | }
76 |
77 | exports.notAdmin = () => {
78 | return `The user is not an admin!`
79 | }
80 |
81 | exports.adminAlready = () => {
82 | return `Cannot promote a user who is an admin already!`
83 | }
84 |
85 | exports.botNotPremium = () => {
86 | return `This bot does not support premium commands. Please contact the owner of this bot.`
87 | }
88 |
89 | exports.botNotAdmin = () => {
90 | return `Make the bot as admin first!`
91 | }
92 |
93 | exports.ytFound = (res) => {
94 | return `*Video found!*\n\n➸ *Title*: ${res.title}\n➸ *Description*:\n${res.desc}\n➸ *Duration*: ${res.duration} minutes\n\nMedia is being shipped, please wait...`
95 | }
96 |
97 | exports.notRegistered = () => {
98 | return `You haven't registered in our database!\n\nPlease register by typing:\n*${prefix}register* name | age`
99 | }
100 |
101 | exports.registered = (name, age, userId, time, serial) => {
102 | return `*「 REGISTRATION 」*\n\nYour account was successfully registered with the data:\n\n➸ *Name*: ${name}\n➸ *Age*: ${age}\n➸ *ID*: ${userId}\n➸ *Time registered*: ${time}\n➸ *Serial*: ${serial}\n\nNote:\nDO NOT share your *serial* to someone!\n\nConsider to read *${prefix}rules* first.`
103 | }
104 |
105 | exports.registeredAlready = () => {
106 | return `You've registered before.`
107 | }
108 |
109 | exports.received = (pushname) => {
110 | return `Hello ${pushname}!\nThank you for reporting, we will work on it ASAP.`
111 | }
112 |
113 | exports.limit = (time) => {
114 | return `Sorry, but you have reached the limit using this commands.\nPlease wait *${time.hours}* hour(s) *${time.minutes}* minute(s) *${time.seconds}* second(s) more.`
115 | }
116 |
117 | exports.videoLimit = () => {
118 | return `The video size is too large!`
119 | }
120 |
121 | exports.joox = (result) => {
122 | return `*Song found!*\n\n➸ *Singer*: ${result[0].penyanyi}\n➸ *Title*: ${result[0].judul}\n➸ *Album*: ${result[0].album}\n➸ *Ext*: ${result[0].ext}\n➸ *Size*: ${result[0].filesize}\n➸ *Duration*: ${result[0].duration}\n\nMedia is being shipped, please wait...`
123 | }
124 |
125 | exports.gsm = (result) => {
126 | return `➸ *Phone model*: ${result.title}\n➸ *Spesification*: ${result.spec}`
127 | }
128 |
129 | exports.receipt = (result) => {
130 | return `${result.title}\n\n${result.desc}\n\n*Ingredients*: ${result.bahan}\n\n*Steps*:\n${result.cara}`
131 | }
132 |
133 | exports.ytResult = (urlyt, title, channel, duration, views) => {
134 | return `➸ *Title*: ${title}\n➸ *Channel*: ${channel}\n➸ *Durations*: ${duration}\n➸ *Views*: ${views}\n➸ *Link*: ${urlyt}`
135 | }
136 |
137 | exports.profile = (username, status, premi, benet, adm) => {
138 | return `-----[ *USER INFO* ]-----\n\n➸ *Username*: ${username}\n➸ *Status*: ${status}\n➸ *Premium*: ${premi}\n➸ *Banned*: ${benet}\n➸ *Admin*: ${adm}`
139 | }
140 |
141 | exports.detectorOn = (name, formattedTitle) => {
142 | return `*「 ANTI GROUP LINK 」*\n\nAnnouncement for all group members of ${(name || formattedTitle)}\nIf somebody sending a group link on this group, they will be kicked automatically by bot.\n\nThank you.\n- Admin ${(name || formattedTitle)}`
143 | }
144 |
145 | exports.detectorOff = () => {
146 | return `Anti-group link feature was successfully *disabled*!`
147 | }
148 |
149 | exports.detectorOnAlready = () => {
150 | return `Anti-group link feature has been enabled before.`
151 | }
152 |
153 | exports.linkDetected = () => {
154 | return `*「 ANTI GROUP LINK 」*\n\nYou've sent a group link!\nSorry, but you have to leave...\nNice knowing you~`
155 | }
156 |
157 | exports.levelingOn = () => {
158 | return `Leveling feature was successfully *enabled*!`
159 | }
160 |
161 | exports.levelingOff = () => {
162 | return `Leveling feature was successfully *disabled*!`
163 | }
164 |
165 | exports.levelingOnAlready = () => {
166 | return `Leveling feature has been enabled before.`
167 | }
168 |
169 | exports.levelingNotOn = () => {
170 | return `Leveling feature hasn't been enabled!`
171 | }
172 |
173 | exports.levelNull = () => {
174 | return `You don't have any level yet!`
175 | }
176 |
177 | exports.welcome = (event) => {
178 | return `Welcome @${event.who.replace('@c.us', '')}!`
179 | }
180 |
181 | exports.welcomeOn = () => {
182 | return `Welcome feature was successfully *enabled*!`
183 | }
184 |
185 | exports.welcomeOff = () => {
186 | return `Welcome feature was successfully *disabled*!`
187 | }
188 |
189 | exports.welcomeOnAlready = () => {
190 | return `Welcome feature has been enabled before.`
191 | }
192 |
193 | exports.minimalDb = () => {
194 | return `Need at least *10* users that have a level in database!`
195 | }
196 |
197 | exports.autoStikOn = () => {
198 | return `Auto-sticker feature was successfully *enabled*!`
199 | }
200 |
201 | exports.autoStikOff = () => {
202 | return `Auto-sticker feature was successfully *enabled*!`
203 | }
204 |
205 | exports.autoStikOnAlready = () => {
206 | return `Auto-sticker feature has been enabled before.`
207 | }
208 |
209 | exports.afkOn = (pushname, reason) => {
210 | return `AFK feature was successfully *enabled*!\n\n➸ *Username*: ${pushname}\n➸ *Reason*: ${reason}`
211 | }
212 |
213 | exports.afkOnAlready = () => {
214 | return `AFK feature has been enabled before.`
215 | }
216 |
217 | exports.afkMentioned = (getReason, getTime) => {
218 | return `*「 AFK MODE 」*\n\nSssttt! The person is on AFK state, don't bother!\n➸ *Reason*: ${getReason}\n➸ *Since*: ${getTime}`
219 | }
220 |
221 | exports.afkDone = (pushname) => {
222 | return `*${pushname}* is back from AFK, welcome~`
223 | }
224 |
225 | exports.gcMute = () => {
226 | return `*「 MUTED 」*\n\nOnly admins who can send message in this group.`
227 | }
228 |
229 | exports.gcUnmute = () => {
230 | return `*「 UNMUTED 」*\n\nAll members can send message in this group now.`
231 | }
232 |
233 | exports.notNum = (q) => {
234 | return `"${q}", are not a numbers!`
235 | }
236 |
237 | exports.playstore = (app_id, title, developer, description, price, free) => {
238 | return `➸ *Name*: ${title}\n➸ *ID*: ${app_id}\n➸ *Developer*: ${developer}\n➸ *Free*: ${free}\n➸ *Price*: ${price}\n➸ *Description*: ${description}`
239 | }
240 |
241 | exports.shopee = (nama, harga, terjual, shop_location, description, link_product) => {
242 | return `➸ *Name*: ${nama}\n➸ *Price*: ${harga}\n➸ *Sold*: ${terjual}\n➸ *Location*: ${shop_location}\n➸ *Product link*: ${link_product}\n➸ *Description*: ${description}`
243 | }
244 |
245 | exports.pc = (pushname) => {
246 | return `*「 REGISTRATION 」*\n\nYour account is successfully registered! Please check my message in your private chat ${pushname}~ :3`
247 | }
248 |
249 | exports.registeredFound = (name, age, time, serial, userId) => {
250 | return `*「 REGISTERED 」*\n\nAccount found!\n\n➸ *Name*: ${name}\n➸ *Age*: ${age}\n➸ *ID*: ${userId}\n➸ *Time registered*: ${time}\n➸ *Serial*: ${serial}`
251 | }
252 |
253 | exports.registeredNotFound = (serial) => {
254 | return `Account with serial: *${serial}* not found!`
255 | }
256 |
257 | exports.ytPlay = (result) => {
258 | return `*「 PLAY 」*\n\n➸ *Title*: ${result.title}\n➸ *Duration*: ${result.duration}\n➸ *Link*: ${result.url}\n\nMedia is being shipped, please wait...`
259 | }
260 |
261 | exports.pcOnly = () => {
262 | return `This command can only be used in private chat!`
263 | }
264 |
265 | exports.linkNsfw = () => {
266 | return `*「 ANTI NSFW LINK 」*\n\nYou've sent a group link!\nSorry, but you have to leave...`
267 | }
268 |
269 | exports.ageOld = () => {
270 | return `You're too old for using this feature! Please go back to your youth to be able to using this feature.`
271 | }
272 |
273 | exports.fakeLink = () => {
274 | return `Ow, this link looks kinda suspicious, for the security of the members of this group I'm gonna kick you.\nBye~.`
275 | }
276 |
277 | exports.randomQuran = (ranquran) => {
278 | return `
279 | بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم
280 | *Surah name*: ${ranquran.data.result.nama} / ${ranquran.data.result.asma}
281 | *Meaning*: ${ranquran.data.result.arti}
282 | *Number*: ${ranquran.data.result.nomor}
283 | *Description*: ${ranquran.data.result.keterangan}
284 | *Audio link*: ${ranquran.data.result.audio}
285 | `
286 | }
287 |
288 | exports.hadis = () => {
289 | return `
290 | *List of hadees*:
291 | 1. Bukhari hadees has 6638 hadees
292 | _usage_: ${prefix}hadees bukhari 1
293 | 2. Muslim hadees has 4930 hadees
294 | _usage_: ${prefix}hadees muslim 25
295 | 3. Tirmidzi hadees has 3625 hadees
296 | _usage_: ${prefix}hadees tirmidzi 10
297 | 4. Nasai hadees has 5364 hadees
298 | _usage_: ${prefix}hadees nasai 6
299 | 5. Ahmad hadees 4305 hadees
300 | _usage_: ${prefix}hadees ahmad 5
301 | 6. Abu Daud hadees 4419 hadees
302 | _usage_: ${prefix}hadees abudaud 45
303 | 7. Malik hadees 1587 hadees
304 | _usage_: ${prefix}hadees malik 45
305 | 8. Ibnu Majah hadees 4285 hadees
306 | _usage_: ${prefix}hadees ibnumajah 8
307 | 9. Darimi hadees 2949 hadees
308 | _usage_: ${prefix}hadees darimi 3
309 | `
310 | }
311 |
312 | exports.limit = () => {
313 | return `
314 | *── 「 LIMIT 」 ──*
315 |
316 | You run out of usage limit! Please do the following:
317 | ❏ *_Wait until 12:00 AM (GMT+7)_*
318 | `
319 | }
320 |
321 | exports.asmaulHusna = (assna) => {
322 | return `
323 | ───❉ 𝐀𝐬𝐦𝐚𝐮𝐥 𝐇𝐮𝐬𝐧𝐚 ❉──
324 |
325 | *${assna.name}*
326 | ❏ *Number*: ${assna.number}
327 | ❏ *Transliteration*: ${assna.transliteration}
328 | ❏ *English*: ${assna.en.meaning}
329 | `
330 | }
331 |
332 | exports.menu = (jumlahUser, level, xp, role, pushname, requiredXp, premium) => {
333 | return `
334 | ------[ WELCOME ]-----
335 |
336 | ======================
337 | ➸ *Name*: ${pushname}
338 | ➸ *Level*: ${level}
339 | ➸ *XP*: ${xp} / ${requiredXp}
340 | ➸ *Role*: ${role}
341 | ➸ *Premium*: ${premium}
342 | ======================
343 |
344 | Total registered: *${jumlahUser}*
345 |
346 | The following menus are available:
347 |
348 | *[1]* Downloader
349 | *[2]* Bot
350 | *[3]* Misc
351 | *[4]* Sticker
352 | *[5]* Weeaboo
353 | *[6]* Fun
354 | *[7]* Moderation
355 | *[8]* NSFW
356 | *[9]* Owner
357 | *[10]* Leveling
358 |
359 | Type *${prefix}menu* index_number to open the selected page menu.
360 |
361 | Note:
362 | Treat the bot well, dev will act firmly if the user violates the rules.
363 | This bot has anti-spam in the form of a cooldown command for *5 seconds* every time you use it.
364 | `
365 | }
366 |
367 | exports.menuDownloader = () => {
368 | return `
369 | -----[ DOWNLOADER ]-----
370 |
371 | 1. *${prefix}facebook*
372 | Download Facebook video.
373 | Aliases: *fb*
374 | Usage: *${prefix}facebook* video_link
375 |
376 | 2. *${prefix}ytmp3*
377 | Download YouTube audio.
378 | Aliases: -
379 | Usage: *${prefix}ytmp3* link
380 |
381 | 3. *${prefix}ytmp4*
382 | Download YouTube video.
383 | Aliases: -
384 | Usage: *${prefix}ytmp4* link
385 |
386 | 4. *${prefix}joox*
387 | Download music from Joox.
388 | Aliases: -
389 | Usage: *${prefix}joox* song's_title
390 |
391 | 5. *${prefix}tiktok*
392 | Downlaod TikTok video.
393 | Aliases: -
394 | Usage: *${prefix}tiktok* link
395 |
396 | 6. *${prefix}twitter*
397 | Download Twitter media.
398 | Aliases: *twt*
399 | Usage: *${prefix}twiter* link
400 |
401 | 7. *${prefix}tiktokpic*
402 | Download TikTok profile pic.
403 | Aliases: -
404 | Usage: *${prefix}tiktokpic* username
405 |
406 | 8. *${prefix}tiktoknowm*
407 | Download TikTok video with no WM.
408 | Aliases: *tktnowm*
409 | Usage: *${prefix}tiktoknowm* link
410 |
411 | 9. *${prefix}moddroid*
412 | Search for mod on moddroid.
413 | Aliases: -
414 | Usage: *${prefix}moddroid* APK_name
415 |
416 | 10. *${prefix}happymod*
417 | Search for mod on happymod.
418 | Aliases: -
419 | Usage: *${prefix}happymod* APK_name
420 |
421 | 11. *${prefix}linedl*
422 | Line sticker downloader.
423 | Aliases: -
424 | Usage: *${prefix}linedl* sticker_link
425 |
426 | _Index of [1]_
427 | `
428 | }
429 |
430 | exports.menuBot = () => {
431 | return `
432 | -----[ BOT ]-----
433 |
434 | 1. *${prefix}rules*
435 | Must read.
436 | Aliases: *rule*
437 | Usage: *${prefix}rules*
438 |
439 | 2. *${prefix}menu*
440 | Displays available commands.
441 | Aliases: -
442 | Usage: *${prefix}menu* index_number
443 |
444 | 3. *${prefix}status*
445 | Displays bot status.
446 | Aliases: *stats*
447 | Usage: *${prefix}status*
448 |
449 | 4. *${prefix}listblock*
450 | Check blocked numbers.
451 | Aliases: -
452 | Usage: *${prefix}listblock*
453 |
454 | 5. *${prefix}ping*
455 | Check the bot speed.
456 | Aliases: *p*
457 | Usage: *${prefix}ping*
458 |
459 | 6. *${prefix}delete*
460 | Delete messages from bots.
461 | Aliases: *del*
462 | Usage: Reply to deleted messages with a caption *${prefix}delete*.
463 |
464 | 7. *${prefix}report*
465 | Report bugs to dev.
466 | Aliases: -
467 | Usage: *${prefix}report* text
468 |
469 | 8. *${prefix}tos*
470 | Terms of service.
471 | Aliases: -
472 | Usage: *${prefix}tos*
473 |
474 | 9. *${prefix}join*
475 | Join to group via link.
476 | Aliases: -
477 | Usage: *${prefix}join* group's_link
478 |
479 | 10. *${prefix}ownerbot*
480 | Send owner contact.
481 | Aliases: -
482 | Usage: *${prefix}ownerbot*
483 |
484 | 11. *${prefix}getpic*
485 | Send user's profile pic.
486 | Aliases: -
487 | Usage: *${prefix}getpic* @user/62812xxxxxxxx
488 |
489 | 12. *${prefix}premiumcheck*
490 | Premium active time check.
491 | Aliases: *cekpremium*
492 | Usage: *${prefix}premiumcheck*
493 |
494 | 13. *${prefix}premiumlist*
495 | Premium users list.
496 | Aliases: *listpremium*
497 | Usage: *${prefix}premiumlist*
498 |
499 | 14. *${prefix}limit*
500 | Check your remainings limit.
501 | Aliases: -
502 | Usage: *${prefix}limit*
503 |
504 | _Index of [2]_
505 | `
506 | }
507 |
508 | exports.menuMisc = () => {
509 | return `
510 | -----[ MISC ]-----
511 |
512 | 1. *${prefix}say*
513 | The bot will repeat your message.
514 | Aliases: -
515 | Usage: *${prefix}say* text
516 |
517 | 2. *${prefix}lyric*
518 | Search for song lyrics.
519 | Aliases: -
520 | Usage: *${prefix}lyric* song's_title
521 |
522 | 3. *${prefix}shortlink*
523 | Create a shortlink.
524 | Aliases: -
525 | Usage: *${prefix}shortlink* link
526 |
527 | 4. *${prefix}wikien*
528 | Send Wikipedia from the given text.
529 | Aliases: -
530 | Usage: *${prefix}wikien* query
531 |
532 | 5. *${prefix}kbbi*
533 | Send word definitions from KBBI.
534 | Aliases: -
535 | Usage: *${prefix}kbbi* text
536 |
537 | 6. *${prefix}igstalk*
538 | Stalk Instagram account.
539 | Aliases: -
540 | Usage: *${prefix}igstalk* ig_username
541 |
542 | 7. *${prefix}gsmarena*
543 | Sending phone info from GSMArena.
544 | Aliases: -
545 | Usage: *${prefix}gsmarena* phone's_model
546 |
547 | 8. *${prefix}receipt*
548 | Sending food receipt.
549 | Aliases: *resep*
550 | Usage: *${prefix}receipt* food's_name
551 |
552 | 9. *${prefix}ytsearch*
553 | Sending YouTube search results.
554 | Aliases: *yts*
555 | Usage: *${prefix}ytsearch* query
556 |
557 | 10. *${prefix}tts*
558 | Create a Text to Speech. You need a language code, you can find it here https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
559 | Aliases: -
560 | Usage: *${prefix}tts* language_code | text
561 |
562 | 11. *${prefix}afk*
563 | Set your account to AFK mode, I will them who mentioned you.
564 | Aliases: -
565 | Usage: *${prefix}afk* reason. Send any message to group to disable.
566 |
567 | 12. *${prefix}distance*
568 | Sending city distance information.
569 | Aliases: -
570 | Usage: *${prefix}distance* from | to
571 |
572 | 13. *${prefix}findsticker*
573 | Search sticker.
574 | Aliases: *findstiker*
575 | Usage: *${prefix}findsticker* text
576 |
577 | 14. *${prefix}math*
578 | A calculator.
579 | * = multiplication
580 | + = addition
581 | - = subtraction
582 | / = division
583 | Aliases: -
584 | Usage: *${prefix}math* 12*12
585 |
586 | 15. *${prefix}listsurah*
587 | Sending Al-Qur'an list.
588 | Aliases: -
589 | Usage: *${prefix}listsurah*
590 |
591 | 16. *${prefix}surah*
592 | Sending surah.
593 | Aliases: -
594 | Usage: *${prefix}surah* surah_number
595 |
596 | 17. *${prefix}js*
597 | Get sholat schedule.
598 | Aliases: -
599 | Usage: *${prefix}js* area
600 |
601 | 18. *${prefix}mutual*
602 | Get random contact.
603 | Aliases: -
604 | Usage: *${prefix}mutual*
605 |
606 | 19. *${prefix}whois*
607 | IP look-up.
608 | Aliases: -
609 | Usage: *${prefix}whois* ip_address
610 |
611 | 20. *${prefix}play*
612 | Play audio from YouTube.
613 | Aliases: -
614 | Usage: *${prefix}play* title
615 |
616 | 21. *${prefix}sms*
617 | Send SMS as anonymous. (SMS gateway)
618 | Aliases: -
619 | Usage: *${prefix}sms* message | number
620 |
621 | 22. *${prefix}toxic*
622 | Random toxic. (Indonesian)
623 | Aliases: -
624 | Usage: *${prefix}toxic*
625 |
626 | 23. *${prefix}tafsir*
627 | Al-Qur'an tafsir. (Indonesian)
628 | Aliases: -
629 | Usage: *${prefix}tafsir* surah_name ayat
630 |
631 | 24. *${prefix}motivasi*
632 | Motivation text. (Indonesian)
633 | Aliases: -
634 | Usage: *${prefix}motivasi*
635 |
636 | 25. *${prefix}linesticker*
637 | Latest Line sticker.
638 | Aliases: *linestiker*
639 | Usage: *${prefix}linesticker*
640 |
641 | 26. *${prefix}alkitab*
642 | Bible search. (Indonesian)
643 | Aliases: -
644 | Usage: *${prefix}* gospel_name
645 |
646 | 27. *${prefix}cekongkir*
647 | Postal fee check. (Indonesian)
648 | Aliases: -
649 | Usage: *${prefix}ongkir* service_name | from | to
650 |
651 | 28. *${prefix}movie*
652 | Search for movies.
653 | Aliases: -
654 | Usage: *${prefix}movie* title
655 |
656 | 28. *${prefix}reminder*
657 | Reminder.
658 | *s* - seconds
659 | *m* - minutes
660 | *h* - hours
661 | *d* - days
662 | Aliases: -
663 | Usage: *${prefix}reminder* 10s | reminder_message
664 |
665 | 29. *${prefix}imagetourl*
666 | Image uploader.
667 | Aliases: *imgtourl*
668 | Usage: Send images with caption *${prefix}imagetourl* or reply to the image with a caption *${prefix}imagetourl*.
669 |
670 | 30. *${prefix}infohoax*
671 | Hoax info update.
672 | Aliases: -
673 | Usage: *${prefix}infohoax*
674 |
675 | 31. *${prefix}trending*
676 | Twitter trendings.
677 | Aliases: -
678 | Usage: *${prefix}trending*
679 |
680 | 32. *${prefix}jobseek*
681 | Job seeker in Indonesia only.
682 | Aliases: -
683 | Usage: *${prefix}jobseek*
684 |
685 | 33. *${prefix}spamcall*
686 | Spam call.
687 | Aliases: -
688 | Usage: *${prefix}spamcall* 812xxxxxxxx
689 |
690 | 34. *${prefix}spamsms*
691 | Spam SMS.
692 | Aliases: -
693 | Usage: *${prefix}spamsms* 0812xxxxxxxx amount
694 |
695 | 35. *${prefix}email*
696 | Send an email.
697 | Aliases: -
698 | Usage: *${prefix}email* email | subject | message
699 |
700 | 36. *${prefix}quotes*
701 | Random Indonesian quotes.
702 | Aliases: -
703 | Usage: *${prefix}quotes*
704 |
705 | 37. *${prefix}genshininfo*
706 | Genshin Impact characters info.
707 | Aliases: *genshin*
708 | Usage: *${prefix}genshininfo* chara_name
709 |
710 | 38. *${prefix}translate*
711 | Translate a text.
712 | Aliases: *trans*
713 | Usage: *${prefix}translate* text | code_lang
714 |
715 | 39. *${prefix}hadees*
716 | Hadees info.
717 | Aliases: *hadis*
718 | Usage: *${prefix}hadees* hadees_name | hadees_number
719 |
720 | 40. *${prefix}asmaulhusna*
721 | Asmaul husna.
722 | Aliases: -
723 | Usage: *${prefix}asmaulhusna* asmaulhusna_number
724 |
725 | 41. *${prefix}randomquran*
726 | Random Al-Qur'an surah.
727 | Aliases: -
728 | Usage: *${prefix}randomquran*
729 |
730 | 42. *${prefix}coronavirus*
731 | Check a COVID-19 cases.
732 | Aliases: *corona*
733 | Usage: *${prefix}coronavirus* nation_name
734 |
735 | 43. *${prefix}tomp3*
736 | Convert a video to audio only (MP3).
737 | Aliases: -
738 | Usage: Send a video with caption *${prefix}tomp3* or reply video with a caption *${prefix}tomp3*.
739 |
740 | 44. *${prefix}ttp*
741 | Text to sticker.
742 | Aliases: -
743 | UsageL *${prefix}ttp* text
744 |
745 | _Index of [3]_
746 | `
747 | }
748 |
749 | exports.menuSticker = () => {
750 | return `
751 | -----[ STICKER ]-----
752 |
753 | 1. *${prefix}sticker*
754 | Create stickers from images sent or replied.
755 | Aliases: *stiker*
756 | Usage: Send images with caption *${prefix}sticker* or reply to the images with a caption *${prefix}sticker*.
757 |
758 | 2. *${prefix}stickergif*
759 | Create stickers from videos/GIFs.
760 | Aliases: *stikergif*
761 | Usage: Send videos/GIFs with caption *${prefix}stickergif* or reply to the videos/GIFs with a caption *${prefix}stickergif*.
762 |
763 | 3. *${prefix}ttg*
764 | Create text to GIF stickers.
765 | Aliases: -
766 | Usage: *${prefix}ttg* text
767 |
768 | 4. *${prefix}stickertoimg*
769 | Convert sticker to image.
770 | Aliases: *stikertoimg*
771 | Usage: Reply to the stickers with a caption *${prefix}stickertoimg*.
772 |
773 | 5. *${prefix}emojisticker*
774 | Convert emoji to sticker.
775 | Aliases: *emojistiker*
776 | Usage: *${prefix}emojisticker* emoji
777 |
778 | 6. *${prefix}stickerwm*
779 | Create a sticker with metadata/WM.
780 | Aliases: *stcwm*
781 | Usage: Send images with caption *${prefix}stickerwm* pack_name | author_name or reply to the image with a caption *${prefix}stickerwm* pack_name | author_name.
782 |
783 | 7. *${prefix}stickermeme*
784 | Create a sticker meme.
785 | Aliases: *stcmeme*
786 | Usage: Send images with caption *${prefix}sticker* upper_text | bottom_text or reply to the images with a caption *${prefix}sticker* upper_text | bottom_text.
787 |
788 | 8. *${prefix}takestick*
789 | Edit sticker metadata.
790 | Aliases: -
791 | Usage: Reply to the stickers with a caption *${prefix}takestick* pack_name | author_name
792 |
793 | _Index of [4]_
794 | `
795 | }
796 |
797 | exports.menuWeeaboo = () => {
798 | return `
799 | -----[ WEEABOO ]-----
800 |
801 | 1. *${prefix}neko*
802 | Send a neko girl photo.
803 | Aliases: -
804 | Usage: *${prefix}neko*
805 |
806 | 2. *${prefix}wallpaper*
807 | Send anime wallpapers.
808 | Aliases: *wp*
809 | Usage: *${prefix}wallpaper*
810 |
811 | 3. *${prefix}kemono*
812 | Send kemonomimi girl photos.
813 | Aliases: -
814 | Usage: *${prefix}kemono*
815 |
816 | 4. *${prefix}kusonime*
817 | Look for anime info and batch download links on Kusonime.
818 | Aliases: -
819 | Usage: *${prefix}kusonime* anime's_title
820 |
821 | 5. *${prefix}komiku*
822 | Looking for manga info and download links on Komiku.
823 | Aliases: -
824 | Usage: *${prefix}komiku* manga's_title
825 |
826 | 6. *${prefix}wait*
827 | Search anime source from the screenshots scene.
828 | Aliases: -
829 | Usage: Send screenshots with caption *${prefix}wait* or reply to the screenshots with a caption *${prefix}wait*.
830 |
831 | 7. *${prefix}source*
832 | Look for sources from the doujin panel, illustrations, and images related to anime.
833 | Aliases: *sauce*
834 | Usage: Send images with caption *${prefix}source* or reply to the images with a caption *${prefix}source*.
835 |
836 | 8. *${prefix}waifu*
837 | Send random waifu photos.
838 | Aliases: -
839 | Usage: *${prefix}waifu*
840 |
841 | 9. *${prefix}anitoki*
842 | Anitoki fansub latest update.
843 | Aliases: -
844 | Usage: *${prefix}anitoki*
845 |
846 | 10. *${prefix}neonime*
847 | Neonime fansub latest update.
848 | Aliases: -
849 | Usage: *${prefix}neonime*
850 |
851 | 11. *${prefix}anoboy*
852 | On-going anime on Anoboy fansub.
853 | Aliases: -
854 | Usage: *${prefix}anoboy*
855 |
856 | _Index of [5]_
857 | `
858 | }
859 |
860 | exports.menuFun = () => {
861 | return `
862 | -----[ FUN ]-----
863 |
864 | 1. *${prefix}hartatahta*
865 | Make a picture of the "Harta Tahta Nama".
866 | Aliases: -
867 | Usage: *${prefix}hartatahta* name
868 |
869 | 2. *${prefix}partner*
870 | Weton match. (Indonesian)
871 | Aliases: *pasangan*
872 | Usage: *${prefix}partner* name | partner
873 |
874 | 3. *${prefix}zodiac*
875 | Weekly zodiac fortune. (Indonesian)
876 | Aliases: *zodiak*
877 | Usage: *${prefix}zodiac* zodiac
878 |
879 | 4. *${prefix}write*
880 | Make notes written in a book.
881 | Aliases: *nulis*
882 | Usage: *${prefix}write* text
883 |
884 | 5. *${prefix}glitchtext*
885 | Create a glitch styled text.
886 | Aliases: *glitext*
887 | Usage: *${prefix}glitchtext* text1 | text2
888 |
889 | 6. *${prefix}simi*
890 | SimiSimi chat. (Indonesian)
891 | Aliases: -
892 | Usage: *${prefix}simi* text
893 |
894 | 7. *${prefix}blackpink*
895 | Create a Blackpink logo styled text.
896 | Aliases: -
897 | Usage: *${prefix}blackpink* text
898 |
899 | 8. *${prefix}phmaker*
900 | Create a Pornhub logo styled text.
901 | Aliases: -
902 | Usage: *${prefix}phmaker* left_text | right_text
903 |
904 | 9. *${prefix}galaxy*
905 | Create a galaxy styled text.
906 | Aliases: -
907 | Usage: *${prefix}galaxy* text
908 |
909 | 10. *${prefix}tod*
910 | Play truth or dare. (Indonesian)
911 | Aliases: -
912 | Usage: *${prefix}tod*
913 |
914 | 11. *${prefix}weton*
915 | Weton fortune. (Indonesian)
916 | Aliases: -
917 | Usage: *${prefix}weton* date | month | year
918 |
919 | 12. *${prefix}triggered*
920 | Apply a triggered effect to image.
921 | Aliases: -
922 | Usage: Send image with caption *${prefix}triggered* or reply to someone message with caption *${prefix}triggered* or you can directly use *${prefix}triggered*.
923 |
924 | 13. *${prefix}kiss*
925 | Kiss someone ( ͡° ͜ʖ ͡°).
926 | Aliases: -
927 | Usage: Send image with caption *${prefix}kiss* or reply image with caption *${prefix}kiss*.
928 |
929 | 14. *${prefix}asupan*
930 | Daily dose of TikTok.
931 | Aliases: -
932 | Usage: *${prefix}asupan*
933 |
934 | 15. *${prefix}citacita*
935 | Cita-cita meme. (Indonesian)
936 | Aliases: -
937 | Usage: *${prefix}citacita*
938 |
939 | 16. *${prefix}phcomment*
940 | Create a Pornhub comment section styled image.
941 | Aliases: -
942 | Usage: *${prefix}phcomment* username | text
943 |
944 | 17. *${prefix}ffbanner*
945 | Create a Free Fire banner.
946 | Aliases: -
947 | Usage: *${prefix}ffbanner* text1 | text2
948 |
949 | 18. *${prefix}fflogo*
950 | Create a Free Fire characters logo.
951 | Aliases: -
952 | Usage: *${prefix}fflogo* text1 | text2
953 |
954 | 19. *${prefix}neontext*
955 | Create a neon text image
956 | Aliases: *neon*
957 | Usage: *${prefix}neontext* up | center | bottom
958 |
959 | 20. *${prefix}firemaker*
960 | Create a fire text.
961 | Aliases: -
962 | Usage: *${prefix}firemaker* text
963 |
964 | 21. *${prefix}mlmaker*
965 | Create ML hero image with text.
966 | Aliases: -
967 | Usage: *${prefix}mlmaker* hero_name | text
968 |
969 | 22. *${prefix}balloonmaker*
970 | Create a couple balloon image.
971 | Aliases: *blmaker*
972 | Usage: *${prefix}balloonmaker* name1 | name2
973 |
974 | 23. *${prefix}sliding*
975 | Create a sliding text.
976 | Aliases: -
977 | Usage: *${prefix}sliding* text
978 |
979 | 24. *${prefix}wasted*
980 | Create a wasted effect.
981 | Aliases: -
982 | Usage: Send image with caption *${prefix}wasted* or reply image with caption *${prefix}wasted*.
983 |
984 | 25. *${prefix}caklontong*
985 | Cak Lontong quiz.
986 | Aliases: -
987 | Usage: *${prefix}caklontong*
988 |
989 | 26. *${prefix}hilih*
990 | Hilih-ify your text.
991 | Aliases: -
992 | Usage: *${prefix}hilih* text.
993 |
994 | 27. *${prefix}tebakgambar*
995 | Tebak Gambar quiz.
996 | Aliases: -
997 | Usage: *${prefix}tebakgambar*
998 |
999 | _Index of [6]_
1000 | `
1001 | }
1002 |
1003 | exports.menuModeration = () => {
1004 | return `
1005 | -----[ MODERATION ]-----
1006 |
1007 | 1. *${prefix}add*
1008 | Add users to group.
1009 | Aliases: -
1010 | Usage: *${prefix}add* 628xxxxxxxxxx
1011 |
1012 | 2. *${prefix}kick*
1013 | Remove members from the group.
1014 | Aliases: -
1015 | Usage: *${prefix}kick* @member1
1016 |
1017 | 3. *${prefix}promote*
1018 | Promote member to become admin.
1019 | Aliases: -
1020 | Usage: *${prefix}promote* @member1
1021 |
1022 | 4. *${prefix}demote*
1023 | Demote member from admin.
1024 | Aliases: -
1025 | Usage: *${prefix}demote* @member1
1026 |
1027 | 5. *${prefix}leave*
1028 | Leave bot from group.
1029 | Aliases: -
1030 | Usage: *${prefix}leave*
1031 |
1032 | 6. *${prefix}everyone*
1033 | Mention all group members.
1034 | Aliases: -
1035 | Usage: *${prefix}everyone*
1036 |
1037 | 7. *${prefix}nsfw*
1038 | Toogle NSFW mode.
1039 | Aliases: -
1040 | Usage: *${prefix}nsfw* enable/disable
1041 |
1042 | 8. *${prefix}groupicon*
1043 | Change group icon.
1044 | Aliases: -
1045 | Usage: Send images with caption *${prefix}groupicon* or reply to the images with a caption *${prefix}groupicon*.
1046 |
1047 | 9. *${prefix}antilink*
1048 | Toogle anti-group link feature.
1049 | Aliases: -
1050 | Usage: *${prefix}antilink* enable/disable
1051 |
1052 | 10. *${prefix}welcome*
1053 | Toogle welcome feature.
1054 | Aliases: -
1055 | Usage: *${prefix}welcome* enable/disable
1056 |
1057 | 11. *${prefix}autosticker*
1058 | Toogle auto-sticker feature. Every sended image will made into a sticker.
1059 | Aliases: *autostiker autostik*
1060 | Usage: *${prefix}autostiker* enable/disable
1061 |
1062 | 12. *${prefix}antinsfw*
1063 | Toogle anti-NSFW link.
1064 | Aliases: -
1065 | Usage: *${prefix}antinsfw* enable/disable
1066 |
1067 | 13. *${prefix}mutegc*
1068 | Set group to admin only who can send a message.
1069 | Aliases: -
1070 | Usage: *${prefix}mutegc* enable/disable
1071 |
1072 | _Index of [7]_
1073 | `
1074 | }
1075 |
1076 | exports.menuNsfw = () => {
1077 | return `
1078 | -----[ NSFW ]-----
1079 |
1080 | 1. *${prefix}lewds*
1081 | Send lewd anime pict.
1082 | Aliases: *lewd*
1083 | Usage: *${prefix}lewds*
1084 |
1085 | 2. *${prefix}multilewds*
1086 | Send up to 5 anime lewd pics. (PREMIUM ONLY)
1087 | Aliases: *multilewds multilewd mlewd mlewds*
1088 | Usage: *${prefix}multilewds*
1089 |
1090 | 3. *${prefix}nhentai*
1091 | Sending doujinshi info from nHentai.
1092 | Aliases: *nh*
1093 | Usage: *${prefix}nhentai* code
1094 |
1095 | 4. *${prefix}nhdl*
1096 | Download doujin from nHentai as a PDF file. (PREMIUM ONLY)
1097 | Aliases: -
1098 | Usage: *${prefix}nhdl* code
1099 |
1100 | 5. *${prefix}nekopoi*
1101 | Send the latest video link Nekopoi.
1102 | Aliases: -
1103 | Usage: *${prefix}nekopoi*
1104 |
1105 | 6. *${prefix}multifetish*
1106 | Send up to 5 fetish pics. (PREMIUM ONLY)
1107 | Aliases: *mfetish*
1108 | Usage: *${prefix}multifetish* armpits/feets/thighs/ass/boobs/belly/sideboobs/ahegao
1109 |
1110 | 7. *${prefix}waifu18*
1111 | Send random NSFW waifu photos.
1112 | Aliases: -
1113 | Usage: *${prefix}waifu18*
1114 |
1115 | 8. *${prefix}fetish*
1116 | Send fetish pics.
1117 | Aliases: -
1118 | Usage: *${prefix}fetish* armpits/feets/thighs/ass/boobs/belly/sideboobs/ahegao
1119 |
1120 | 9. *${prefix}phdl*
1121 | Download videos from Pornhub.
1122 | Aliases: -
1123 | Usage *${prefix}phdl* link
1124 |
1125 | 10. *${prefix}yuri*
1126 | Send random yuri pics.
1127 | Aliases: -
1128 | Usage: *${prefix}yuri*
1129 |
1130 | 11. *${prefix}lewdavatar*
1131 | Send random lewd avatars.
1132 | Aliases: -
1133 | Usage: *${prefix}lewdavatar*
1134 |
1135 | 12. *${prefix}femdom*
1136 | Send random femdom pics.
1137 | Aliases: -
1138 | Usage: *${prefix}femdom*
1139 |
1140 | 13. *${prefix}nhsearch*
1141 | nHentai search.
1142 | Aliases: -
1143 | Usage: *${prefix}nhsearch* query
1144 |
1145 | 14. *${prefix}nekosearch*
1146 | Nekopoi search.
1147 | Aliases: -
1148 | Usage: *${prefix}nekosearch* query
1149 |
1150 | 15. *${prefix}cersex*
1151 | Random adult stories (Indonesian).
1152 | Aliases: -
1153 | Usage: *${prefix}cersex*
1154 |
1155 | _Index of [8]_
1156 | `
1157 | }
1158 |
1159 | exports.menuOwner = () => {
1160 | return `
1161 | -----[ OWNER ]-----
1162 | Hello Owner-sama ヽ(・∀・)ノ!
1163 |
1164 | 1. *${prefix}bc*
1165 | Make a broadcast.
1166 | Aliases: -
1167 | Usage: *${prefix}bc* text
1168 |
1169 | 2. *${prefix}clearall*
1170 | Deletes all chats on the bot account.
1171 | Aliases: -
1172 | Usage: *${prefix}clearall*
1173 |
1174 | 3. *${prefix}getses*
1175 | Take a screenshot of the session from the bot account.
1176 | Aliases: -
1177 | Usage: *${prefix}getses*
1178 |
1179 | 4. *${prefix}ban*
1180 | Add/remove banned users.
1181 | Aliases: -
1182 | Usage: *${prefix}ban* add/del @user/62812xxxxxxxx
1183 |
1184 | 5. *${prefix}leaveall*
1185 | Leave from all groups.
1186 | Aliases: -
1187 | Usage: *${prefix}leaveall*
1188 |
1189 | 6. *${prefix}eval*
1190 | Evaluate the JavaScript code.
1191 | Aliases: *ev*
1192 | Usage: *${prefix}eval*
1193 |
1194 | 7. *${prefix}shutdown*
1195 | Shutdown bot.
1196 | Aliases: -
1197 | Usage: *${prefix}shutdown*
1198 |
1199 | 8. *${prefix}premium*
1200 | Add/remove premium users.
1201 | Aliases: -
1202 | Usage: *${prefix}premium* add/del @user
1203 |
1204 | 9. *${prefix}setstatus*
1205 | Set about me.
1206 | Aliases: *setstatus setstat*
1207 | Usage: *${prefix}status* text
1208 |
1209 | 10. *${prefix}serial*
1210 | Check user's serial.
1211 | Aliases: -
1212 | Usage: *${prefix}serial* user_serial
1213 |
1214 | 11. *${prefix}exif*
1215 | Adjust your sticker WM.
1216 | Aliases: -
1217 | Usage: *${prefix}exif* pack_name | author_name
1218 |
1219 | 12. *${prefix}mute*
1220 | Mute all users.
1221 | Aliases: -
1222 | Usage: Use *${prefix}mute* to mute and use *${prefix}mute* once again to unmute.
1223 |
1224 | 13. *${prefix}setname*
1225 | Change bot's name. Maximum 25 characters.
1226 | Aliases: -
1227 | Usage: *${prefix}name* username_baru
1228 |
1229 | _Index of [9]_
1230 | `
1231 | }
1232 |
1233 | exports.menuLeveling = () => {
1234 | return `
1235 | -----[ LEVELING ]-----
1236 |
1237 | 1. *${prefix}level*
1238 | Check your level.
1239 | Aliases: -
1240 | Usage: *${prefix}level*
1241 |
1242 | 2. *${prefix}leaderboard*
1243 | Check leaderboard.
1244 | Aliaases: -
1245 | Usage: *${prefix}leaderboard*
1246 |
1247 | _Index of [10]_
1248 | `
1249 | }
1250 |
1251 | exports.rules = () => {
1252 | return `
1253 | -----[ RULES ]-----
1254 |
1255 | 1. Do NOT spam bot.
1256 | Penalty: *WARN/SOFT BLOCK*
1257 |
1258 | 2. Do NOT call bot.
1259 | Penalty: *SOFT BLOCK*
1260 |
1261 | 3. Do NOT exploit bots.
1262 | Penalty: *PERMANENT BLOCK*
1263 |
1264 | If you've understand these rules, please type *${prefix}menu* to get started.
1265 |
1266 | Owner:
1267 | wa.me/${ownerNumber.replace('@c.us', '')}`
1268 | }
1269 |
1270 | // Note for owner/hoster, please DO NOT edit this section.
1271 | exports.tos = () => {
1272 | return `
1273 | -----[ TERMS OF SERVICE ]-----
1274 |
1275 | This bot is an open-source bot, come with the name of HisokaBot which is available on GitHub for free.
1276 | The owner/hoster of this bot is independent from the responsibility and supervision of the developer (Slavyan).
1277 | Owner/hoster may plagiarize, add, delete, replace source code with notes *DO NOT SELL* this source code in any form.
1278 | If an error occurs, the first person you should contact is the owner/hoster.
1279 |
1280 | If you want to contributing to this project, visit:
1281 | https://github.com/dxxoo/HisokaBOT-Whatsapp-Bot
1282 |
1283 | Contact person:
1284 | wa.me/${ownerNumber.replace('@c.us', '')} (Owner/hoster)
1285 |
1286 | You guys can also support me to keep this bot up to date with:
1287 | https://saweria.co/dxxoo
1288 |
1289 | Thank you!
1290 |
1291 | - Slavyan
1292 | `
1293 | }
1294 |
--------------------------------------------------------------------------------
/message/text/lang/ind.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable quotes */
2 | const fs = require('fs-extra')
3 | const { prefix } = JSON.parse(fs.readFileSync('config.json'))
4 |
5 | exports.wait = () => {
6 | return `Mohon tunggu sebentar~`
7 | }
8 |
9 | exports.ok = () => {
10 | return `Ok lord~`
11 | }
12 |
13 | exports.wrongFormat = () => {
14 | return `Format salah! Silakan cek cara penggunaan di *${prefix}menu*.`
15 | }
16 |
17 | exports.emptyMess = () => {
18 | return `Harap masukkan pesan yang ingin disampaikan!`
19 | }
20 |
21 | exports.cmdNotFound = (cmd) => {
22 | return `Command *${prefix}${cmd}* tidak ditemukan!`
23 | }
24 |
25 | exports.blocked = (ownerNumber) => {
26 | return `Bot tidak menerima panggilan. Karena kamu telah melanggar rules, maka kamu telah diblok!\n\nHarap hubungi owner: wa.me/${ownerNumber.replace('@c.us', '')}`
27 | }
28 |
29 | exports.ownerOnly = () => {
30 | return `Command ini khusus Onwer Bot!`
31 | }
32 |
33 | exports.doneOwner = () => {
34 | return `Sudah selesai, Lord!`
35 | }
36 |
37 | exports.groupOnly = () => {
38 | return `Command ini hanya bisa digunakan di dalam grup!`
39 | }
40 |
41 | exports.adminOnly = () => {
42 | return `Command ini hanya bisa digunakan oleh admin grup!`
43 | }
44 |
45 | exports.notNsfw = () => {
46 | return `Command NSFW belum diaktifkan!`
47 | }
48 |
49 | exports.nsfwOn = () => {
50 | return `Command NSFW berhasil *diaktifkan*!`
51 | }
52 |
53 | exports.nsfwOff = () => {
54 | return `Command NSFW berhasil *dinonaktifkan*!`
55 | }
56 |
57 | exports.nsfwAlready = () => {
58 | return `Command NSFW sudah diaktifkan sebelumnya.`
59 | }
60 |
61 | exports.addedGroup = (chat) => {
62 | return `Terima kasih telah mengundangku, para member *${chat.contact.name}*!\n\nSilakan register dengan cara ketik:\n*${prefix}register* nama | umur\n\n_Contoh:_ ${prefix}register Hisoka | 17`
63 | }
64 |
65 | exports.nhFalse = () => {
66 | return `Kode tidak valid!`
67 | }
68 |
69 | exports.listBlock = (blockNumber) => {
70 | return `------[ BLOCK LIST ]------\n\nTotal diblokir: *${blockNumber.length}* user\n`
71 | }
72 |
73 | exports.notPremium = () => {
74 | return `Maaf! Command ini khusus untuk user premium saja.`
75 | }
76 |
77 | exports.notAdmin = () => {
78 | return `Kamu bukan seorang admin group!`
79 | }
80 |
81 | exports.adminAlready = () => {
82 | return `Tidak dapat mem-promote user yang merupakan admin!`
83 | }
84 |
85 | exports.botNotPremium = () => {
86 | return `Bot ini tidak mendukung command premium. Silakan hubungi owner bot.`
87 | }
88 |
89 | exports.botNotAdmin = () => {
90 | return `Silahkan jadikan bot admin terlebih dahulu!`
91 | }
92 |
93 | exports.ytFound = (res) => {
94 | return `*Video ditemukan!*\n\n➸ *Judul*: ${res.title}\n➸ *Deskripsi*:\n${res.desc}\n➸ *Durasi*: ${res.duration}\n\nMedia sedang dikirim, mohon tunggu...`
95 | }
96 |
97 | exports.notRegistered = () => {
98 | return `Kamu belum terdaftar di database!\n\nSilakan register dengan format:\n*${prefix}register* nama | umur\n\nNote:\nHarap save nomor ku agar bisa mendapatkan serial!!`
99 | }
100 |
101 | exports.registered = (name, age, userId, time, serial) => {
102 | return `*「 REGISTRATION 」*\n\nAkun kamu telah terdaftar dengan data:\n\n➸ *Nama*: ${name}\n➸ *Umur*: ${age}\n➸ *ID*: ${userId}\n➸ *Waktu pendaftaran*: ${time}\n➸ *Serial*: ${serial}\n\nCatatan:\nJangan pernah menyebarkan data *serial* ke pada siapapun!\n\nKetik *${prefix}rules* terlebih dahulu ya~`
103 | }
104 |
105 | exports.registeredAlready = () => {
106 | return `Kamu sudah terdaftar sebelunya.`
107 | }
108 |
109 | exports.received = (pushname) => {
110 | return `Halo ${pushname}!\nTerima kasih telah melapor, laporanmu akan kami segera terima.`
111 | }
112 |
113 | exports.daily = (time) => {
114 | return `Maaf, tetapi kamu telah mencapai limit menggunakan command ini.\nSilakan tunggu *${time.hours}* jam *${time.minutes}* menit *${time.seconds}* detik lagi.`
115 | }
116 |
117 | exports.videoLimit = () => {
118 | return `Ukuran video terlalu besar!`
119 | }
120 |
121 | exports.joox = (result) => {
122 | return `*Lagu ditemukan!*\n\n➸ *Penyanyi*: ${result[0].penyanyi}\n➸ *Judul*: ${result[0].judul}\n➸ *Album*: ${result[0].album}\n➸ *Ext*: ${result[0].ext}\n➸ *Size*: ${result[0].filesize}\n➸ *Durasi*: ${result[0].duration}\n\nMedia sedang dikirim, mohon tunggu...`
123 | }
124 |
125 | exports.gsm = (result) => {
126 | return `➸ *Model HP*: ${result.title}\n➸ *Spesifikasi*: ${result.spec}`
127 | }
128 |
129 | exports.receipt = (result) => {
130 | return `${result.title}\n\n${result.desc}\n\n*Bahan*: ${result.bahan}\n\n*Cara membuat*:\n${result.cara}`
131 | }
132 |
133 | exports.ytResult = (urlyt, title, channel, duration, views) => {
134 | return `➸ *Judul*: ${title}\n➸ *Channel*: ${channel}\n➸ *Durasi*: ${duration}\n➸ *Views*: ${views}\n➸ *Link*: ${urlyt}`
135 | }
136 |
137 | exports.profile = (username, status, premi, benet, adm, level, requiredXp, xp) => {
138 | return `-----[ *USER INFO* ]-----\n\n➸ *Username*: ${username}\n➸ *Status*: ${status}\n➸ *Premium*: ${premi}\n➸ *Banned*: ${benet}\n➸ *Admin*: ${adm}\n\n=_=_=_=_=_=_=_=_=_=_=_=_=\n\nYour progress:\n➸ *Level*: ${level}\n➸ *XP*: ${xp} / ${requiredXp}`
139 | }
140 |
141 | exports.detectorOn = (name, formattedTitle) => {
142 | return `*「 ANTI GROUP LINK 」*\n\nPerhatian untuk penghuni grup ${(name || formattedTitle)}\nGrup ini memiliki anti-group link detector, apabila ada salah satu member mengirim group link di sini maka dia akan ter-kick secara otomatis.\n\nSekian terima kasih.\n- Admin ${(name || formattedTitle)}`
143 | }
144 |
145 | exports.detectorOff = () => {
146 | return `Fitur anti-group link berhasil *dinonaktifkan*!`
147 | }
148 |
149 | exports.detectorOnAlready = () => {
150 | return `Fitur anti-group link telah diaktifkan sebelumnya.`
151 | }
152 |
153 | exports.antiNsfwOn = (name, formattedTitle) => {
154 | return `*「 ANTI NSFW LINK 」*\n\nPerhatian untuk penghuni grup ${(name || formattedTitle)}\nGrup ini memiliki anti-NSFW link detector, apabila ada salah satu member mengirim link NSFW/porn di sini maka dia akan ter-kick secara otomatis.\n\nSekian terima kasih.\n- Admin ${(name || formattedTitle)}`
155 | }
156 |
157 | exports.antiNsfwOff = () => {
158 | return `Fitur anti-NSFW link berhasil *dinonaktifkan*!`
159 | }
160 |
161 | exports.antiNsfwOnAlready = () => {
162 | return `Fitur anti-NSFW link telah diaktifkan sebelumnya.`
163 | }
164 |
165 | exports.linkDetected = () => {
166 | return `*「 ANTI GROUP LINK 」*\n\nKamu mengirim link group chat!\nMaaf tapi kami harus mengeluarkan mu...\nSelamat tinggal~`
167 | }
168 |
169 | exports.levelingOn = () => {
170 | return `Fitur leveling berhasil *diaktifkan*!`
171 | }
172 |
173 | exports.levelingOff = () => {
174 | return `Fitur leveling berhasil *dinonaktifkan*!`
175 | }
176 |
177 | exports.levelingOnAlready = () => {
178 | return `Fitur leveling telah diaktifkan sebelumnya.`
179 | }
180 |
181 | exports.levelingNotOn = () => {
182 | return `Fitur leveling belum diaktifkan!`
183 | }
184 |
185 | exports.levelNull = () => {
186 | return `Kamu belum memiliki level!`
187 | }
188 |
189 | exports.welcome = (event) => {
190 | return `Selamat datang @${event.who.replace('@c.us', '')}!\n\nSemoga betah terus di grup kami ya~`
191 | }
192 |
193 | exports.welcomeOn = () => {
194 | return `Fitur welcome berhasil *diaktifkan*!`
195 | }
196 |
197 | exports.welcomeOff = () => {
198 | return `Fitur welcome berhasil *dinonaktifkan*!`
199 | }
200 |
201 | exports.welcomeOnAlready = () => {
202 | return `Fitur welcome telah diaktifkan sebelumnya.`
203 | }
204 |
205 | exports.minimalDb = () => {
206 | return `Perlu setidaknya *10* user yang memiliki level di database!`
207 | }
208 |
209 | exports.autoStikOn = () => {
210 | return `Fitur auto-stiker berhasil *diaktifkan*!`
211 | }
212 |
213 | exports.autoStikOff = () => {
214 | return `Fitur auto-stiker berhasil *dinonaktifkan*!`
215 | }
216 |
217 | exports.autoStikOnAlready = () => {
218 | return `Fitur auto-stiker telah diaktifkan sebelumnya.`
219 | }
220 |
221 | exports.afkOn = (pushname, reason) => {
222 | return `Fitur AFK berhasil *diaktifkan*!\n\n➸ *Username*: ${pushname}\n➸ *Alasan*: ${reason}`
223 | }
224 |
225 | exports.afkOnAlready = () => {
226 | return `Fitur AFK telah diaktifkan sebelumnya.`
227 | }
228 |
229 | exports.afkMentioned = (getReason, getTime) => {
230 | return `*「 AFK MODE 」*\n\nSssttt! Orangnya lagi AFK, jangan diganggu!\n➸ *Alasan*: ${getReason}\n➸ *Sejak*: ${getTime}`
231 | }
232 |
233 | exports.afkDone = (pushname) => {
234 | return `*${pushname}* telah kembali dari AFK! Selamat datang kembali~`
235 | }
236 |
237 | exports.gcMute = () => {
238 | return `*「 MUTED 」*\n\nHanya admin yang dapat mengirim pesan ke grup ini.`
239 | }
240 |
241 | exports.gcUnmute = () => {
242 | return `*「 UNMUTED 」*\n\nSekarang semua anggota dapat mengirim chat di grup ini.`
243 | }
244 |
245 | exports.notNum = (q) => {
246 | return `"${q}", bukan angka!`
247 | }
248 |
249 | exports.playstore = (app_id, title, developer, description, price, free) => {
250 | return `➸ *Nama*: ${title}\n➸ *ID*: ${app_id}\n➸ *Developer*: ${developer}\n➸ *Gratis*: ${free}\n➸ *Harga*: ${price}\n➸ *Deskripsi*: ${description}`
251 | }
252 |
253 | exports.shopee = (nama, harga, terjual, shop_location, description, link_product) => {
254 | return `➸ *Nama*: ${nama}\n➸ *Harga*: ${harga}\n➸ *Terjual*: ${terjual}\n➸ *Lokasi*: ${shop_location}\n➸ *Link produk*: ${link_product}\n➸ *Deskripsi*: ${description}`
255 | }
256 |
257 | exports.pc = (pushname) => {
258 | return `*「 REGISTRATION 」*\n\nAkun kamu berhasil terdaftar! Silakan cek pesan ku di private chat mu ya ${pushname}~ :3\n\nNote:\nJika kamu tidak menerima pesan, artinya kamu belum save nomor bot.`
259 | }
260 |
261 | exports.registeredFound = (name, age, time, serial, userId) => {
262 | return `*「 REGISTERED 」*\n\nAkun ditemukan!\n\n➸ *Nama*: ${name}\n➸ *Umur*: ${age}\n➸ *ID*: ${userId}\n➸ *Waktu pendaftaran*: ${time}\n➸ *Serial*: ${serial}`
263 | }
264 |
265 | exports.registeredNotFound = (serial) => {
266 | return `Akun dengan serial: *${serial}* tidak ditemukan!`
267 | }
268 |
269 | exports.ytPlay = (result) => {
270 | return `*「 PLAY 」*\n\n➸ *Judul*: ${result.title}\n➸ *Durasi*: ${result.duration}\n➸ *Link*: ${result.url}\n\nMedia sedang dikirim, mohon tunggu...`
271 | }
272 | exports.pcOnly = () => {
273 | return `Command ini hanya bisa digunakan di dalam private chat saja!`
274 | }
275 |
276 | exports.linkNsfw = () => {
277 | return `*「 ANTI NSFW LINK 」*\n\nKamu telah mengirim link NSFW!\nMaaf, tapi aku harus mengeluarkan mu...`
278 | }
279 |
280 | exports.ageOld = () => {
281 | return `Kamu terlalu tua untuk menggunakan fitur ini! Mohon kembali ke masa muda anda agar bisa menggunakannya.`
282 | }
283 |
284 | exports.menuText = () => {
285 | return `
286 | ╔══❉ *𝐓𝐞𝐱𝐭 𝐌𝐚𝐤𝐞𝐫* ❉═══
287 | ║
288 | ║ Untuk Spasi Teks menggunakan *+*
289 | ║ contoh : ${prefix}text1 neon kael+bot
290 | ║
291 | ╟⊱ *${prefix}text1 burnpaper* _teks_
292 | ╟⊱ *${prefix}text1 candlemug* _teks_
293 | ╟⊱ *${prefix}text1 lovemsg* _teks_
294 | ╟⊱ *${prefix}text1 mugflower* _teks_
295 | ╟⊱ *${prefix}text1 narutobanner* _teks_
296 | ╟⊱ *${prefix}text1 paperonglass* _teks_
297 | ╟⊱ *${prefix}text1 romancetext* _teks_
298 | ╟⊱ *${prefix}text1 shadowtext* _teks_
299 | ╟⊱ *${prefix}text1 tiktokeffect* _teks_
300 | ║
301 | ╚══❉ *HisokaBOT* ❉════
302 | `
303 | }
304 |
305 | exports.fakeLink = () => {
306 | return `Ups, link ini terlihat mencurigakan. Demi keamanan grup, aku harus mengeluarkan mu...\n`
307 | }
308 |
309 | exports.muteChatOn = () => {
310 | return `Berhasil *mute* bot pada grup ini!`
311 | }
312 |
313 | exports.muteChatOff = () => {
314 | return `Berhasil *unmute* bot pada grup ini!`
315 | }
316 |
317 | exports.muteChatOnAlready = () => {
318 | return `Mute telah diaktifkan di grup ini sebelumnya!`
319 | }
320 |
321 | exports.randomQuran = (ranquran) => {
322 | return `
323 | بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم
324 | *Nama surah*: ${ranquran.data.result.nama} / ${ranquran.data.result.asma}
325 | *Arti*: ${ranquran.data.result.arti}
326 | *Surat ke*: ${ranquran.data.result.nomor}
327 | *Keterangan*: ${ranquran.data.result.keterangan}
328 | *Link audio*: ${ranquran.data.result.audio}
329 | `
330 | }
331 |
332 | exports.hadis = () => {
333 | return `
334 | _*Assalamu'alaikum wr. wb.*_
335 |
336 | *Daftar hadis*:
337 | 1. Hadis Bukhari ada 6638 hadis
338 | _usage_: ${prefix}hadis bukhari 1
339 | 2. Hadis Muslim ada 4930 hadis
340 | _usage_: ${prefix}hadis muslim 25
341 | 3. Hadis Tirmidzi ada 3625 hadis
342 | _usage_: ${prefix}hadis tirmidzi 10
343 | 4. Hadis nasai ada 5364 hadis
344 | _usage_: ${prefix}hadis nasai 6
345 | 5. Hadis Ahmad ada 4305 hadis
346 | _usage_: ${prefix}hadis ahmad 5
347 | 6. Hadis Abu Daud ada 4419 hadis
348 | _usage_: ${prefix}hadis abudaud 45
349 | 7. Hadis Malik ada 1587 hadis
350 | _usage_: ${prefix}hadis malik 45
351 | 8. Hadis Ibnu Majah ada 4285 hadis
352 | _usage_: ${prefix}hadis ibnumajah 8
353 | 9. Hadis Darimi ada 2949 hadis
354 | _usage_: ${prefix}hadis darimi 3
355 |
356 | *Semoga bermanfaat*
357 | _*Wassalam*_
358 | `
359 | }
360 |
361 | exports.limit = () => {
362 | return `
363 | *── 「 LIMIT 」 ──*
364 |
365 | Limit penggunaan kamu telah habis! Silakan lakukan hal berikut:
366 | ❏ *_Tunggu hingga jam 00:00 WIB_*
367 | `
368 | }
369 |
370 | exports.asmaulHusna = (assna) => {
371 | return `
372 | ───❉ 𝐀𝐬𝐦𝐚𝐮𝐥 𝐇𝐮𝐬𝐧𝐚 ❉──
373 |
374 | *${assna.name}*
375 | ❏ *Asmaul husna ke*: ${assna.number}
376 | ❏ *Pelafalan*: ${assna.transliteration}
377 | ❏ *Inggris*: ${assna.en.meaning}
378 | `
379 | }
380 |
381 | exports.menu = (jumlahUser, level, xp, role, pushname, requiredXp, premium) => {
382 | return `
383 | ------[ WELCOME ]-----
384 |
385 | ======================
386 | ➸ *Nama*: ${pushname}
387 | ➸ *Level*: ${level}
388 | ➸ *XP*: ${xp} / ${requiredXp}
389 | ➸ *Role*: ${role}
390 | ➸ *Premium*: ${premium}
391 | ======================
392 |
393 | Total pendaftar: *${jumlahUser}*
394 |
395 | Berikut adalah menu yang tersedia:
396 |
397 | *[1]* Downloader
398 | *[2]* Bot
399 | *[3]* Misc
400 | *[4]* Sticker
401 | *[5]* Weeaboo
402 | *[6]* Fun
403 | *[7]* Moderation
404 | *[8]* NSFW
405 | *[9]* Owner
406 | *[10]* Leveling
407 |
408 | Ketik *${prefix}menu* angka_index untuk membuka menu page yang dipilih.
409 |
410 | Catatan:
411 | Perlakukan bot secara baik, dev akan bertindak tegas apabila user melanggar rules.
412 | Bot ini terdapat anti-spam yang berupa cooldown command selama *5 detik* setiap kali pemakaian.
413 | `
414 | }
415 |
416 | exports.menuDownloader = () => {
417 | return `
418 | -----[ DOWNLOADER ]-----
419 |
420 | 1. *${prefix}facebook*
421 | Download Facebook video.
422 | Aliases: *fb*
423 | Usage: *${prefix}facebook* link_video
424 |
425 | 2. *${prefix}ytmp3*
426 | Download YouTube audio.
427 | Aliases: -
428 | Usage: *${prefix}ytmp3* link
429 |
430 | 3. *${prefix}ytmp4*
431 | Download YouTube video.
432 | Aliases: -
433 | Usage: *${prefix}ytmp4* link
434 |
435 | 4. *${prefix}joox*
436 | Mencari dan men-download lagu dari Joox.
437 | Aliases: -
438 | Usage: *${prefix}joox* judul_lagu
439 |
440 | 5. *${prefix}tiktok*
441 | Mendownload video TikTok.
442 | Aliases: -
443 | Usage: *${prefix}tiktok* link_video
444 |
445 | 6. *${prefix}twitter*
446 | Download Twitter media.
447 | Aliases: *twt*
448 | Usage: *${prefix}twiter* link
449 |
450 | 7. *${prefix}tiktokpic*
451 | Download profile pic user
452 | Aliases: -
453 | Usage: *${prefix}tiktokpic* username
454 |
455 | 8. *${prefix}tiktoknowm*
456 | Download video TikTok tanpa WM.
457 | Aliases: *tktnowm*
458 | Usage: *${prefix}tiktoknowm* link_video
459 |
460 | 9. *${prefix}moddroid*
461 | Cari APK mod dari moddroid.
462 | Aliases: -
463 | Usage: *${prefix}moddroid* nama_APK
464 |
465 | 10. *${prefix}happymod*
466 | Cari APK mod dari happymod.
467 | Aliases: -
468 | Usage: *${prefix}happymod* nama_APK
469 |
470 | 11. *${prefix}linedl*
471 | Stiker Line downloader.
472 | Aliases: -
473 | Usage: *${prefix}linedl* link_stiker
474 |
475 | _Index of [1]_
476 | `
477 | }
478 |
479 | exports.menuBot = () => {
480 | return `
481 | -----[ BOT ]-----
482 |
483 | 1. *${prefix}rules*
484 | Wajib baca.
485 | Aliases: *rule*
486 | Usage: *${prefix}rules*
487 |
488 | 2. *${prefix}menu*
489 | Menampilkan commands yang tersedia.
490 | Aliases: *help*
491 | Usage: *${prefix}menu* angka_index
492 |
493 | 3. *${prefix}status*
494 | Menampilkan status bot.
495 | Aliases: *stats*
496 | Usage: *${prefix}status*
497 |
498 | 4. *${prefix}listblock*
499 | Cek nomor yang diblokir.
500 | Aliases: -
501 | Usage: *${prefix}listblock*
502 |
503 | 5. *${prefix}ping*
504 | Cek speed bot.
505 | Aliases: *p*
506 | Usage: *${prefix}ping*
507 |
508 | 6. *${prefix}delete*
509 | Hapus pesan dari bot.
510 | Aliases: *del*
511 | Usage: Reply pesan yang dihapus dengan caption *${prefix}delete*.
512 |
513 | 7. *${prefix}report*
514 | Laporkan bug ke dev.
515 | Aliases: -
516 | Usage: *${prefix}report* pesan
517 |
518 | 8. *${prefix}tos*
519 | Syarat dan ketentuan. (TOS)
520 | Aliases: -
521 | Usage: *${prefix}tos*
522 |
523 | 9. *${prefix}join*
524 | Join grup via link.
525 | Aliases: -
526 | Usage: *${prefix}join* link_group
527 |
528 | 10. *${prefix}ownerbot*
529 | Mengirim kontak owner.
530 | Aliases: -
531 | Usage: *${prefix}ownerbot*
532 |
533 | 11. *${prefix}getpic*
534 | Mengirim foto profil user.
535 | Aliases: -
536 | Usage: *${prefix}getpic* @user/62812xxxxxxxx
537 |
538 | 12. *${prefix}premiumcheck*
539 | Cek masa aktif premium.
540 | Aliases: *cekpremium*
541 | Usage: *${prefix}premiumcheck*
542 |
543 | 13. *${prefix}premiumlist*
544 | Cek list user premium.
545 | Aliases: *listpremium*
546 | Usage: *${prefix}premiumlist*
547 |
548 | _Index of [2]_
549 | `
550 | }
551 |
552 | exports.menuMisc = () => {
553 | return `
554 | -----[ MISC ]-----
555 |
556 | 1. *${prefix}say*
557 | Bot akan mengulang pesan mu.
558 | Aliases: -
559 | Usage: *${prefix}say* teks
560 |
561 | 2. *${prefix}lirik*
562 | Mencari lirik lagu.
563 | Aliases: -
564 | Usage: *${prefix}lirik* judul_lagu
565 |
566 | 3. *${prefix}shortlink*
567 | Membuat shortlink.
568 | Aliases: -
569 | Usage: *${prefix}shortlink* link
570 |
571 | 4. *${prefix}wikipedia*
572 | Mengirim Wikipedia dari teks yang diberikan.
573 | Aliases: *wiki*
574 | Usage: *${prefix}wikipedia* teks
575 |
576 | 5. *${prefix}kbbi*
577 | Mengirim definisi kata dari KBBI.
578 | Aliases: -
579 | Usage: *${prefix}kbbi* teks
580 |
581 | 6. *${prefix}igstalk*
582 | Stalk akun Instagram.
583 | Aliases: -
584 | Usage: *${prefix}igstalk* username
585 |
586 | 7. *${prefix}gsmarena*
587 | Mengirim info spesifikasi HP dari GSMArena.
588 | Aliases: -
589 | Usage: *${prefix}gsmarena* model_hp
590 |
591 | 8. *${prefix}receipt*
592 | Mengirim resep makanan.
593 | Aliases: *resep*
594 | Usage: *${prefix}receipt* nama_makanan
595 |
596 | 9. *${prefix}ytsearch*
597 | Mengirim hasil pencarian di YouTube.
598 | Aliases: *yts*
599 | Usage: *${prefix}ytsearch* query
600 |
601 | 10. *${prefix}tts*
602 | Membuat Text to Speech. Kalian perlu kode bahasa setiap menggunakan, cek di sini https://id.wikipedia.org/wiki/Daftar_bahasa_menurut_ISO_639-2
603 | Aliases: -
604 | Usage: *${prefix}tts* kode_bahasa | teks
605 |
606 | 11. *${prefix}afk*
607 | Set akun kamu ke mode AFK, aku akan mengirim pesan ke orang yang me-mention kamu.
608 | Aliases: -
609 | Usage: *${prefix}afk* alasan. Kirim pesan ke grup untuk menonaktifkan mode AFK.
610 |
611 | 12. *${prefix}distance*
612 | Untuk mengetahui jarak dari kotamu ke kota yang kamu tuju
613 | Aliases: -
614 | Usage: *${prefix}distance* kota_asal | kota_tujuan
615 |
616 | 13. *${prefix}findsticker*
617 | Untuk mencari sticker yang kamu cari
618 | Aliases: *findstiker*
619 | Usage: *${prefix}findsticker* teks
620 |
621 | 14. *${prefix}math*
622 | Kalkulator.
623 | * = Perkalian
624 | + = Pertambahan
625 | - = Pengurangan
626 | / = Pembagian
627 | Aliases: -
628 | Usage: *${prefix}math* 12*12
629 |
630 | 15. *${prefix}listsurah*
631 | Melihat list surah Al-Qur'an.
632 | Aliases: -
633 | Usage: *${prefix}listsurah*
634 |
635 | 16. *${prefix}surah*
636 | Mengirim surah Al-Qur'an.
637 | Aliases: -
638 | Usage: *${prefix}surah* nomor_surah
639 |
640 | 17. *${prefix}js*
641 | Mengetahui jadwal shalat di daerah kalian
642 | Aliases: -
643 | Usage: *${prefix}js* namadaerah
644 |
645 | 18. *${prefix}mutual*
646 | Dapatkan kontak WA random.
647 | Aliases: -
648 | Usage: *${prefix}mutual*
649 |
650 | 19. *${prefix}whois*
651 | IP look-up.
652 | Aliases: -
653 | Usage: *${prefix}whois* ip_address
654 |
655 | 20. *${prefix}play*
656 | Play audio dari YouTube.
657 | Aliases: -
658 | Usage: *${prefix}play* judul_video
659 |
660 | 21. *${prefix}sms*
661 | Mengirim SMS secara anonymous. (SMS gateway)
662 | Aliases: -
663 | Usage: *${prefix}sms* pesan | nomor_penerima
664 |
665 | 22. *${prefix}toxic*
666 | Random toxic.
667 | Aliases: -
668 | Usage: *${prefix}toxic*
669 |
670 | 23. *${prefix}tafsir*
671 | Tafsir ayat surah Al-Qur'an.
672 | Aliases: -
673 | Usage: *${prefix}tafsir* nama_surah ayat
674 |
675 | 24. *${prefix}motivasi*
676 | Kata-kata motivasi.
677 | Aliases: -
678 | Usage: *${prefix}motivasi*
679 |
680 | 25. *${prefix}linesticker*
681 | Sticker Line terbaru.
682 | Aliases: *linestiker*
683 | Usage: *${prefix}linesticker*
684 |
685 | 26. *${prefix}alkitab*
686 | Al-Kitab search.
687 | Aliases: -
688 | Usage: *${prefix}* nama_injil
689 |
690 | 27. *${prefix}cekongkir*
691 | Cek ongkos kirim.
692 | Aliases: -
693 | Usage: *${prefix}ongkir* kurir | asal | tujuan
694 |
695 | 28. *${prefix}movie*
696 | Cari film.
697 | Aliases: -
698 | Usage: *${prefix}movie* judul
699 |
700 | 28. *${prefix}reminder*
701 | Pengingat.
702 | *s* - detik
703 | *m* - menit
704 | *h* - jam
705 | *d* - hari
706 | Aliases: -
707 | Usage: *${prefix}reminder* 10s | pesan_pengingat
708 |
709 | 29. *${prefix}imagetourl*
710 | Image uploader.
711 | Aliases: *imgtourl*
712 | Usage: Kirim gambar dengan caption *${prefix}imagetourl* atau reply gambar dengan caption *${prefix}imagetourl*.
713 |
714 | 30. *${prefix}infohoax*
715 | Cek update info hoax.
716 | Aliases: -
717 | Usage: *${prefix}infohoax*
718 |
719 | 31. *${prefix}trending*
720 | Cek trending di Twitter.
721 | Aliases: -
722 | Usage: *${prefix}trending*
723 |
724 | 32. *${prefix}jobseek*
725 | Mencari info lowongan kerja.
726 | Aliases: -
727 | Usage: *${prefix}jobseek*
728 |
729 | 33. *${prefix}spamcall*
730 | Spam call.
731 | Aliases: -
732 | Usage: *${prefix}spamcall* 812xxxxxxxx
733 |
734 | 34. *${prefix}spamsms*
735 | Spam SMS.
736 | Aliases: -
737 | Usage: *${prefix}spamsms* 0812xxxxxxxx jumlah_pesan
738 |
739 | 35. *${prefix}email*
740 | Mengirim email secara anonymous.
741 | Aliases: -
742 | Usage: *${prefix}email* email_target | subjek | pesan_email
743 |
744 | 36. *${prefix}quotes*
745 | Random quotes bahasa indonesia.
746 | Aliases: -
747 | Usage: *${prefix}quotes*
748 |
749 | 37. *${prefix}genshininfo*
750 | Kirim info karakter Genshin Impact.
751 | Aliases: *genshin*
752 | Usage: *${prefix}genshininfo* nama_karakter
753 |
754 | 38. *${prefix}translate*
755 | Terjemahkan teks.
756 | Aliases: *trans*
757 | Usage: *${prefix}translate* teks | kode_bahasa
758 |
759 | 39. *${prefix}hadis*
760 | Info hadis.
761 | Aliases: -
762 | Usage: *${prefix}hadis* kitab_hadis | nomor_hadis
763 |
764 | 40. *${prefix}asmaulhusna*
765 | Asmaul husna.
766 | Aliases: -
767 | Usage: *${prefix}asmaulhusna* nomor_asmaulhusna
768 |
769 | 41. *${prefix}randomquran*
770 | Kirim surah Al-Qur'an secara random.
771 | Aliases: -
772 | Usage: *${prefix}randomquran*
773 |
774 | 42. *${prefix}coronavirus*
775 | Cek kasus COVID-19.
776 | Aliases: *corona*
777 | Usage: *${prefix}coronavirus* negara
778 |
779 | 43. *${prefix}tomp3*
780 | Format video ke MP3.
781 | Aliases: -
782 | Usage: Kirim video dengan caption *${prefix}tomp3* atau reply video dengan caption *${prefix}tomp3*.
783 |
784 | 44. *${prefix}ttp*
785 | Buat teks menjadi stiker.
786 | Aliases: -
787 | UsageL *${prefix}ttp* teks
788 |
789 | _Index of [3]_
790 | `
791 | }
792 |
793 | exports.menuSticker = () => {
794 | return `
795 | -----[ STICKER ]-----
796 |
797 | 1. *${prefix}sticker*
798 | Membuat stiker dari gambar yang dikirim atau di-reply.
799 | Aliases: *stiker*
800 | Usage: Kirim gambar dengan caption *${prefix}sticker* atau reply gambar dengan caption *${prefix}sticker*.
801 |
802 | 2. *${prefix}stickergif*
803 | Membuat stiker dari video MP4 atau GIF yang dikirim atau di-reply.
804 | Aliases: *stikergif*
805 | Usage: Kirim video/GIF dengan caption *${prefix}stickergif* atau reply video/GIF dengan caption *${prefix}stickergif*.
806 |
807 | 3. *${prefix}ttg*
808 | Membuat stiker text to GIF.
809 | Aliases: -
810 | Usage: *${prefix}ttg* teks
811 |
812 | 4. *${prefix}stickertoimg*
813 | Konversi stiker ke foto.
814 | Aliases: *stikertoimg toimg*
815 | Usage: Reply sticker dengan caption *${prefix}stickertoimg*.
816 |
817 | 5. *${prefix}emojisticker*
818 | Konversi emoji ke stiker.
819 | Aliases: *emojistiker*
820 | Usage: *${prefix}emojisticker* emoji
821 |
822 | 6. *${prefix}stickerwm*
823 | Buat stiker dengan WM.
824 | Aliases: *stcwm*
825 | Usage: Kirim gambar dengan caption *${prefix}stickerwm* pack_name | author_name atau reply gambar dengan caption *${prefix}stickerwm* pack_name | author_name.
826 |
827 | 7. *${prefix}stickermeme*
828 | Buat sticker meme.
829 | Aliases: *stcmeme*
830 | Usage: Kirim gambar dengan caption *${prefix}stickermeme* teks_atas | teks_bawah atau reply gambar dengan caption *${prefix}stickermeme* teks_atas | teks_bawah.
831 |
832 | 8. *${prefix}takestick*
833 | Merubah watermark sticker.
834 | Aliases: -
835 | Usage: Reply stiker dengan caption *${prefix}takestick* pack_name | author_name
836 |
837 | _Index of [4]_
838 | `
839 | }
840 |
841 | exports.menuWeeaboo = () => {
842 | return `
843 | -----[ WEEABOO ]-----
844 |
845 | 1. *${prefix}neko*
846 | Mengirim foto neko girl.
847 | Aliases: -
848 | Usage: *${prefix}neko*
849 |
850 | 2. *${prefix}wallpaper*
851 | Mengirim wallpaper anime.
852 | Aliases: *wp*
853 | Usage: *${prefix}wallpaper*
854 |
855 | 3. *${prefix}kemono*
856 | Mengirim foto kemonomimi girl.
857 | Aliases: -
858 | Usage: *${prefix}kemono*
859 |
860 | 4. *${prefix}kusonime*
861 | Mencari info anime dan link download batch di Kusonime.
862 | Aliases: -
863 | Usage: *${prefix}kusonime* judul_anime
864 |
865 | 5. *${prefix}komiku*
866 | Mencari info manga dan link download di Komiku.
867 | Aliases: -
868 | Usage: *${prefix}komiku* judul_manga
869 |
870 | 6. *${prefix}wait*
871 | Mencari source anime dari screenshot scene.
872 | Aliases: -
873 | Usage: Kirim screenshot dengan caption *${prefix}wait* atau reply screenshot dengan caption *${prefix}wait*.
874 |
875 | 7. *${prefix}source*
876 | Mencari source dari panel doujin, ilustrasi, dan gambar yang berhubungan dengan anime.
877 | Aliases: *sauce*
878 | Usage: Kirim gambar dengan caption *${prefix}source* atau reply gambar dengan caption *${prefix}source*.
879 |
880 | 8. *${prefix}waifu*
881 | Mengirim random foto waifu.
882 | Aliases: -
883 | Usage: *${prefix}waifu*
884 |
885 | 9. *${prefix}anitoki*
886 | Cek update terbaru Anitoki.
887 | Aliases: -
888 | Usage: *${prefix}anitoki*
889 |
890 | 10. *${prefix}neonime*
891 | Cek update terbaru Neonime.
892 | Aliases: -
893 | Usage: *${prefix}neonime*
894 |
895 | 11. *${prefix}anoboy*
896 | Cek on-going anime dari Anoboy.
897 | Aliases: -
898 | Usage: *${prefix}anoboy*
899 |
900 | _Index of [5]_
901 | `
902 | }
903 |
904 | exports.menuFun = () => {
905 | return `
906 | -----[ FUN ]-----
907 |
908 | 1. *${prefix}hartatahta*
909 | Membuat gambar Harta Tahta Nama.
910 | Aliases: -
911 | Usage: *${prefix}hartatahta* nama
912 |
913 | 2. *${prefix}partner*
914 | Weton jodoh.
915 | Aliases: *pasangan*
916 | Usage: *${prefix}partner* nama | pasangan
917 |
918 | 3. *${prefix}zodiac*
919 | Ramalan zodiak Mingguan.
920 | Aliases: *zodiak*
921 | Usage: *${prefix}zodiac* zodiak
922 |
923 | 4. *${prefix}write*
924 | Membuat catatan tulisan di buku.
925 | Aliases: *nulis*
926 | Usage: *${prefix}write* teks
927 |
928 | 5. *${prefix}glitchtext*
929 | Membuat gambar teks glitch.
930 | Aliases: *glitext*
931 | Usage: *${prefix}glitchtext* teks1 | teks2
932 |
933 | 6. *${prefix}simi*
934 | Chat SimiSimi.
935 | Aliases: -
936 | Usage: *${prefix}simi* teks
937 |
938 | 7. *${prefix}blackpink*
939 | Membuat teks dengan style logo Blackpink.
940 | Aliases: -
941 | Usage: *${prefix}blackpink* teks
942 |
943 | 8. *${prefix}phmaker*
944 | Membuat teks dengan style logo Pornhub.
945 | Aliases: -
946 | Usage: *${prefix}phmaker* teks_kiri | teks_kanan
947 |
948 | 9. *${prefix}galaxy*
949 | Membuat gambar teks galaxy.
950 | Aliases: -
951 | Usage: *${prefix}galaxy* teks
952 |
953 | 10. *${prefix}tod*
954 | Bermain truth or dare.
955 | Aliases: -
956 | Usage: *${prefix}tod*
957 |
958 | 11. *${prefix}weton*
959 | Kirim ramalan weton.
960 | Aliases: -
961 | Usage: *${prefix}weton* tanggal | bulan | tahun
962 |
963 | 12. *${prefix}triggered*
964 | Membuat efek triggered.
965 | Aliases: -
966 | Usage: Kirim gambar dengan caption *${prefix}triggered* atau reply pesan orang dengan *${prefix}triggered*.
967 |
968 | 13. *${prefix}kiss*
969 | Kiss someone ( ͡° ͜ʖ ͡°).
970 | Aliases: -
971 | Usage: Kirim gambar dengan caption *${prefix}kiss* atau reply gambar dengan *${prefix}kiss*.
972 |
973 | 14. *${prefix}asupan*
974 | Asupan video cewek-cewek.
975 | Aliases: -
976 | Usage: *${prefix}asupan*
977 |
978 | 15. *${prefix}citacita*
979 | Meme cita-cita.
980 | Aliases: -
981 | Usage: *${prefix}citacita*
982 |
983 | 16. *${prefix}phcomment*
984 | Membuat capton ala PH comment.
985 | Aliases: -
986 | Usage: *${prefix}phcomment* username | teks
987 |
988 | 17. *${prefix}ffbanner*
989 | Membuat banner Free Fire.
990 | Aliases: -
991 | Usage: *${prefix}ffbanner* teks1 | teks2
992 |
993 | 18. *${prefix}fflogo*
994 | Membuat logo karakter Free Fire.
995 | Aliases: -
996 | Usage: *${prefix}fflogo* teks1 | teks2
997 |
998 | 19. *${prefix}neontext*
999 | Membuat gambar neon teks.
1000 | Aliases: *neon*
1001 | Usage: *${prefix}neontext* teks_atas | teks_tengah | teks_bawah
1002 |
1003 | 20. *${prefix}firemaker*
1004 | Membuat gambar teks fire.
1005 | Aliases: -
1006 | Usage: *${prefix}firemaker* teks
1007 |
1008 | 21. *${prefix}mlmaker*
1009 | Membuat gambar karakter hero ML dengan teks.
1010 | Aliases: -
1011 | Usage: *${prefix}mlmaker* nama_hero | teks
1012 |
1013 | 22. *${prefix}balloonmaker*
1014 | Membuat gambar couple balloon.
1015 | Aliases: *blmaker*
1016 | Usage: *${prefix}balloonmaker* nama1 | nama2
1017 |
1018 | 23. *${prefix}sliding*
1019 | Membuat GIF sliding text.
1020 | Aliases: -
1021 | Usage: *${prefix}sliding* teks
1022 |
1023 | 24. *${prefix}wasted*
1024 | Membuat gambar wasted.
1025 | Aliases: -
1026 | Usage: Upload foto dengan caption *${prefix}wasted*
1027 |
1028 | 25. *${prefix}caklontong*
1029 | Bermain kuis caklontong.
1030 | Aliases: -
1031 | Usage: *${prefix}caklontong*
1032 |
1033 | 26. *${prefix}hilih*
1034 | Replace beberapa huruf menjadi i.
1035 | Aliases: -
1036 | Usage: *${prefix}hilih* teks
1037 |
1038 | 27. *${prefix}tebakgambar*
1039 | Bermain kuis tebak gambar.
1040 | Aliases: -
1041 | Usage: *${prefix}tebakgambar*
1042 |
1043 | _Index of [6]_
1044 | `
1045 | }
1046 |
1047 | exports.menuModeration = () => {
1048 | return `
1049 | -----[ MODERATION ]-----
1050 |
1051 | 1. *${prefix}add*
1052 | Menambah user ke dalam group.
1053 | Aliases: -
1054 | Usage: *${prefix}add* 628xxxxxxxxxx
1055 |
1056 | 2. *${prefix}kick*
1057 | Mengeluarkan member dari grup.
1058 | Aliases: -
1059 | Usage: *${prefix}kick* @member1
1060 |
1061 | 3. *${prefix}promote*
1062 | Promote member menjadi admin.
1063 | Aliases: -
1064 | Usage: *${prefix}promote* @member1
1065 |
1066 | 4. *${prefix}demote*
1067 | Demote member dari admin.
1068 | Aliases: -
1069 | Usage: *${prefix}demote* @member1
1070 |
1071 | 5. *${prefix}leave*
1072 | Bot akan meninggalkan grup.
1073 | Aliases: -
1074 | Usage: *${prefix}leave*
1075 |
1076 | 6. *${prefix}everyone*
1077 | Mention semua member group.
1078 | Aliases: -
1079 | Usage: *${prefix}everyone*
1080 |
1081 | 7. *${prefix}nsfw*
1082 | Mematikan/menyalakan mode NSFW.
1083 | Aliases: -
1084 | Usage: *${prefix}nsfw* enable/disable
1085 |
1086 | 8. *${prefix}groupicon*
1087 | Mengganti icon grup.
1088 | Aliases: -
1089 | Usage: Kirim gambar dengan caption *${prefix}groupicon* atau reply gambar dengan caption *${prefix}groupicon*.
1090 |
1091 | 9. *${prefix}antilink*
1092 | Mematikan/menyalakan fitur anti-group link.
1093 | Aliases: -
1094 | Usage: *${prefix}antilink* enable/disable
1095 |
1096 | 10. *${prefix}welcome*
1097 | Mematikan/menyalakan fitur welcome di grup agar menyambut setiap kedatangan member.
1098 | Aliases: -
1099 | Usage: *${prefix}welcome* enable/disable
1100 |
1101 | 11. *${prefix}autosticker*
1102 | Mematikan/menyalakan fitur auto-stiker. Setiap foto yang dikirim akan selalu diubah ke stiker.
1103 | Aliases: *autostiker autostik*
1104 | Usage: *${prefix}autostiker* enable/disable
1105 |
1106 | 12. *${prefix}antinsfw*
1107 | Mematikan/menyalakan fitur anti-NSFW link.
1108 | Aliases: -
1109 | Usage: *${prefix}antinsfw* enable/disable
1110 |
1111 | 13. *${prefix}mutegc*
1112 | Set group hanya admin yang bisa mengirim pesan.
1113 | Aliases: -
1114 | Usage: *${prefix}mutegc* enabled/disable
1115 |
1116 | _Index of [7]_
1117 | `
1118 | }
1119 |
1120 | exports.menuNsfw = () => {
1121 | return `
1122 | -----[ NSFW ]-----
1123 |
1124 | 1. *${prefix}lewds*
1125 | Mengirim pict anime lewd.
1126 | Aliases: *lewd*
1127 | Usage: *${prefix}lewds*
1128 |
1129 | 2. *${prefix}multilewds*
1130 | Mengirim up to 5 anime lewd pics. (PREMIUM ONLY)
1131 | Aliases: *multilewds multilewd mlewd mlewds*
1132 | Usage: *${prefix}multilewds*
1133 |
1134 | 3. *${prefix}nhentai*
1135 | Mengirim info doujinshi dari nHentai.
1136 | Aliases: *nh*
1137 | Usage: *${prefix}nhentai* kode
1138 |
1139 | 4. *${prefix}nhdl*
1140 | Mendownload doujin dari nHentai sebagai file PDF. (PREMIUM ONLY)
1141 | Aliases: -
1142 | Usage: *${prefix}nhdl* kode
1143 |
1144 | 5. *${prefix}nekopoi*
1145 | Mengirim video link Nekopoi terbaru.
1146 | Aliases: -
1147 | Usage: *${prefix}nekopoi*
1148 |
1149 | 6. *${prefix}multifetish*
1150 | Mengirim up to 5 fetish pics. (PREMIUM ONLY)
1151 | Aliases: *mfetish*
1152 | Usage: *${prefix}multifetish*
1153 |
1154 | 7. *${prefix}waifu18*
1155 | Mengirim random foto waifu NSFW.
1156 | Aliases: -
1157 | Usage: *${prefix}waifu18*
1158 |
1159 | 8. *${prefix}fetish*
1160 | Mengirim fetish pics.
1161 | Aliases: -
1162 | Usage: *${prefix}fetish* armpits/feets/thighs/ass/boobs/belly/sideboobs/ahegao
1163 |
1164 | 9. *${prefix}phdl*
1165 | Download video dari Pornhub.
1166 | Aliases: -
1167 | Usage *${prefix}phdl* link
1168 |
1169 | 10. *${prefix}yuri*
1170 | Mengirim random foto lewd yuri.
1171 | Aliases: -
1172 | Usage: *${prefix}yuri*
1173 |
1174 | 11. *${prefix}lewdavatar*
1175 | Mengirim random avatar lewd.
1176 | Aliases: -
1177 | Usage: *${prefix}lewdavatar*
1178 |
1179 | 12. *${prefix}femdom*
1180 | Mengirim random foto ero femdom.
1181 | Aliases: -
1182 | Usage: *${prefix}femdom*
1183 |
1184 | 13. *${prefix}nhsearch*
1185 | nHentai search.
1186 | Aliases: -
1187 | Usage: *${prefix}nhsearch* query
1188 |
1189 | 14. *${prefix}nekosearch*
1190 | Nekopoi search.
1191 | Aliases: -
1192 | Usage: *${prefix}nekosearch* query
1193 |
1194 | 15. *${prefix}cersex*
1195 | Random cerita sex.
1196 | Aliases: -
1197 | Usage: *${prefix}cersex*
1198 |
1199 | _Index of [8]_
1200 | `
1201 | }
1202 |
1203 | exports.menuOwner = () => {
1204 | return `
1205 | -----[ OWNER ]-----
1206 | Halo Owner HisakaBot, Berikut adalah Command khusus owner bot!
1207 |
1208 | 1. *${prefix}bc*
1209 | Membuat broadcast.
1210 | Aliases: -
1211 | Usage: *${prefix}bc*
1212 |
1213 | 2. *${prefix}clearall*
1214 | Menghapus semua chat di akun bot.
1215 | Aliases: -
1216 | Usage: *${prefix}clearall*
1217 |
1218 | 3. *${prefix}getses*
1219 | Mengambil screenshot sesi dari akun bot.
1220 | Aliases: -
1221 | Usage: *${prefix}getses*
1222 |
1223 | 4. *${prefix}ban*
1224 | Menambah/menghapus user yang diban.
1225 | Aliases: -
1226 | Usage: *${prefix}ban* add/del @user/62812xxxxxxxx
1227 |
1228 | 5. *${prefix}leaveall*
1229 | Keluar dari semua grup.
1230 | Aliases: -
1231 | Usage: *${prefix}leaveall*
1232 |
1233 | 6. *${prefix}eval*
1234 | Evaluate kode JavaScript.
1235 | Aliases: *ev*
1236 | Usage: *${prefix}eval*
1237 |
1238 | 7. *${prefix}shutdown*
1239 | Men-shutdown bot.
1240 | Aliases: -
1241 | Usage: *${prefix}shutdown*
1242 |
1243 | 8. *${prefix}premium*
1244 | Menambah/menghapus user premium.
1245 | *s* - detik
1246 | *m* - menit
1247 | *h* - jam
1248 | *d* - hari
1249 | Aliases: -
1250 | Usage: *${prefix}premium* add/del @user/62812xxxxxxxx 30d
1251 |
1252 | 9. *${prefix}setstatus*
1253 | Mengganti status about me.
1254 | Aliases: *setstats setstat*
1255 | Usage: *${prefix}status* teks
1256 |
1257 | 10. *${prefix}serial*
1258 | Cek pendaftaran akun via serial.
1259 | Aliases: -
1260 | Usage: *${prefix}serial* serial_user
1261 |
1262 | 11. *${prefix}exif*
1263 | Atur WM stiker bot.
1264 | Aliases: -
1265 | Usage: *${prefix}exif* pack_name | author_name
1266 |
1267 | 12. *${prefix}mute*
1268 | Mute semua user.
1269 | Aliases: -
1270 | Usage: Gunakan *${prefix}mute* untuk mute dan gunakan *${prefix}mute* kembali untuk unmute.
1271 |
1272 | 13. *${prefix}setname*
1273 | Mengganti username bot. Maksimal 25 huruf.
1274 | Aliases: -
1275 | Usage: *${prefix}name* username_baru
1276 |
1277 | _Index of [9]_
1278 | `
1279 | }
1280 |
1281 | exports.menuLeveling = () => {
1282 | return `
1283 | -----[ LEVELING ]-----
1284 |
1285 | 1. *${prefix}level*
1286 | Untuk melihat level kamu.
1287 | Aliases: -
1288 | Usage: *${prefix}level*
1289 |
1290 | 2. *${prefix}leaderboard*
1291 | Untuk melihat leaderboard.
1292 | Aliaases: -
1293 | Usage: *${prefix}leaderboard*
1294 |
1295 | _Index of [10]_
1296 | `
1297 | }
1298 |
1299 | exports.rules = () => {
1300 | return `
1301 | -----[ RULES ]-----
1302 |
1303 | 1. Jangan spam bot.
1304 | Sanksi: *WARN/SOFT BLOCK*
1305 |
1306 | 2. Jangan telepon bot.
1307 | Sanksi: *SOFT BLOCK*
1308 |
1309 | 3. Jangan mengeksploitasi bot.
1310 | Sanksi: *PERMANENT BLOCK*
1311 |
1312 | Jika sudah dipahami rules-nya, silakan ketik *${prefix}menu* untuk memulai!`
1313 | }
1314 |
1315 | // Dimohon untuk owner/hoster jangan mengedit ini, terima kasih.
1316 | exports.tos = (ownerNumber) => {
1317 | return `
1318 | -----[ TERMS OF SERVICE ]-----
1319 |
1320 | Bot ini merupakan open-source bot dengan nama asli HisokaBot yang tersedia di GitHub secara gratis.
1321 | Owner/hoster dari bot ini terlepas dari tanggung jawab dan pengawasan developer.
1322 | Owner/hoster boleh menjiplak, menambahkan, menghapus, mengganti source code dengan catatan *tidak memperjualbelikannya* dalam bentuk apapun.
1323 | Apabila terjadi sebuah error, orang yang pertama yang harus kalian hubungi ialah owner/hoster.
1324 |
1325 | Jika kalian ingin berkontribusi dalam projek ini, silakan kunjungi:
1326 | https://github.com/dxxoo/HisokaBOT-Whatsapp-Bot
1327 |
1328 | Contact person:
1329 | wa.me/${ownerNumber.replace('@c.us', '')} (Owner/hoster)
1330 |
1331 | Kalian juga bisa mendukung saya agar bot ini tetap up to date dengan:
1332 | https://saweria.co/dxxoo
1333 |
1334 | Terima kasih!.`
1335 | }
1336 |
--------------------------------------------------------------------------------
/message/text/lang/index.js:
--------------------------------------------------------------------------------
1 | exports.ind = require('./ind')
2 | exports.eng = require('./eng')
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "HisokaBOT-Whatsapp-Bot",
3 | "version": "0.0.1",
4 | "description": "HisokaBOT is a multipurpose WhatsApp bot.",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "node ./test/test.js",
8 | "start": "node index.js"
9 | },
10 | "author": "DXXOO",
11 | "repository": {
12 | "type": "git",
13 | "url": "https://github.com/dxxoo/HisokaBOT-Whatsapp-Bot.git"
14 | },
15 | "bugs": {
16 | "url": "https://github.com/dxxoo/HisokaBOT-Whatsapp-Bot/issues"
17 | },
18 | "homepage": "https://github.com/dxxoo/HisokaBOT-Whatsapp-Bott",
19 | "license": "MIT",
20 | "dependencies": {
21 | "@justalk/pornhub-api": "^3.4.0",
22 | "@open-wa/wa-automate": "^3.5.0",
23 | "@vitalets/google-translate-api": "^5.0.0",
24 | "await-exec": "^0.1.2",
25 | "axios": "^0.21.1",
26 | "bent": "^7.3.12",
27 | "canvacord": "^5.0.8",
28 | "chalk": "^4.1.0",
29 | "discord-canvas": "^1.4.1",
30 | "emoji-unicode": "^2.0.1",
31 | "figlet": "^1.5.0",
32 | "file-type": "^16.2.0",
33 | "fluent-ffmpeg": "^2.1.2",
34 | "form-data": "^3.0.1",
35 | "fs-extra": "^9.1.0",
36 | "genshin-impact-api": "^1.0.8",
37 | "google-it": "^1.5.0",
38 | "is-porn": "^0.9.0",
39 | "mathjs": "^9.0.0",
40 | "moment-timezone": "^0.5.33",
41 | "ms": "^2.1.3",
42 | "nana-api": "^1.1.3",
43 | "needle": "^2.6.0",
44 | "nekobocc": "^1.1.0",
45 | "nekos.life": "^2.0.7",
46 | "nhentai-api": "^3.0.2",
47 | "nhentai-js": "^4.0.0",
48 | "node-cron": "^2.0.3",
49 | "node-fetch": "^2.6.1",
50 | "node-gtts": "^2.0.2",
51 | "parse-ms": "^2.1.0",
52 | "rumus-bdr": "^1.0.0",
53 | "sagiri": "^3.1.1",
54 | "sharp": "^0.27.0",
55 | "video-url-link": "git+https://github.com/YogaSakti/video-url-link.git",
56 | "webp-converter": "^2.3.2"
57 | },
58 | "devDependencies": {
59 | "eslint": "^7.20.0"
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/temp/NOTE.txt:
--------------------------------------------------------------------------------
1 | This folder contains a temporary files.
2 |
--------------------------------------------------------------------------------
/temp/audio/NOTE.txt:
--------------------------------------------------------------------------------
1 | This folder contains a temporary files.
2 |
--------------------------------------------------------------------------------
/temp/data.exif:
--------------------------------------------------------------------------------
1 | II* AW ~ {"sticker-pack-id":"com.snowcorp.stickerly.android.stickercontentprovider b5e7275f-f1de-4137-961f-57becfad34f2","sticker-pack-name":"BocchiBot","sticker-pack-publisher":"@SlavyanDesu","android-app-store-link":"https://play.google.com/store/apps/details?id=com.marsconstd.stickermakerforwhatsapp","ios-app-store-link":"https://itunes.apple.com/app/sticker-maker-studio/id1443326857"}
--------------------------------------------------------------------------------
/temp/video/NOTE.txt:
--------------------------------------------------------------------------------
1 | This folder contains a temporary files.
2 |
--------------------------------------------------------------------------------
/test/test.js:
--------------------------------------------------------------------------------
1 | const txt = 'Hello world!'
2 | for (let i = 0; i < txt.length; i++) {
3 | console.log(txt.charAt(i))
4 | }
5 |
--------------------------------------------------------------------------------
/tools/exif.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Originally created by cwke
3 | * Reuploaded by Waxaranai
4 | * Recoded by SlavyanDesu
5 | */
6 |
7 | const fs = require('fs-extra')
8 | const packID = 'com.snowcorp.stickerly.android.stickercontentprovider b5e7275f-f1de-4137-961f-57becfad34f2'
9 | const playstore = 'https://play.google.com/store/apps/details?id=com.stickify.stickermaker'
10 | const itunes = 'https://itunes.apple.com/app/sticker-maker-studio/id1443326857'
11 |
12 | /**
13 | * @class Exif
14 | */
15 | module.exports = class Exif {
16 | /**
17 | * Create an EXIF file.
18 | * @param {string} packname
19 | * @param {string} authorname
20 | * @param {string} [filename=data]
21 | */
22 | create(packname, authorname, filename) {
23 | if (!filename) filename = 'data'
24 | const json = {
25 | 'sticker-pack-id': packID,
26 | 'sticker-pack-name': packname,
27 | 'sticker-pack-publisher': authorname,
28 | 'android-app-store-link': playstore,
29 | 'ios-app-store-link': itunes
30 | }
31 | let len = JSON.stringify(json).length
32 | const f = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00])
33 | const code = [0x00, 0x00, 0x16, 0x00, 0x00, 0x00]
34 | if (len > 256) {
35 | len = len - 256
36 | code.unshift(0x01)
37 | } else {
38 | code.unshift(0x00)
39 | }
40 | const fff = Buffer.from(code)
41 | const ffff = Buffer.from(JSON.stringify(json))
42 | if (len < 16) {
43 | len = len.toString(16)
44 | len = '0' + len
45 | } else {
46 | len = len.toString(16)
47 | }
48 | const ff = Buffer.from(len, 'hex')
49 | const buffer = Buffer.concat([f, ff, fff, ffff])
50 | fs.writeFile(`./temp/${filename}.exif`, buffer, (err) => {
51 | if (err) return console.error(err)
52 | console.log('Success create EXIF file!')
53 | })
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/tools/fetcher.js:
--------------------------------------------------------------------------------
1 | const fetch = require('node-fetch')
2 | const { fromBuffer } = require('file-type')
3 | const fs = require('fs-extra')
4 | const FormData = require('form-data')
5 |
6 | /**
7 | * Fetch JSON from URL.
8 | * @param {string} url
9 | * @param {object} [options]
10 | * @returns {Promise}
11 | */
12 | const fetchJson = (url, options) => {
13 | return new Promise((resolve, reject) => {
14 | return fetch(url, options)
15 | .then((response) => response.json())
16 | .then((json) => resolve(json))
17 | .catch((err) => reject(err))
18 | })
19 | }
20 |
21 | /**
22 | * Fetch text from URL.
23 | * @param {string} url
24 | * @param {object} [options]
25 | * @returns {Promise}
26 | */
27 | const fetchText = (url, options) => {
28 | return new Promise((resolve, reject) => {
29 | return fetch(url, options)
30 | .then((response) => response.text())
31 | .then((text) => resolve(text))
32 | .catch((err) => reject(err))
33 | })
34 | }
35 |
36 | /**
37 | * Get buffer from direct media.
38 | * @param {string} url
39 | * @param {object} [options]
40 | * @returns {Promise}
41 | */
42 | const fetchBuffer = (url, options) => {
43 | return new Promise((resolve, reject) => {
44 | return fetch(url, options)
45 | .then((response) => response.buffer())
46 | .then((result) => resolve(result))
47 | .catch((err) => reject(err))
48 | })
49 | }
50 |
51 | /**
52 | * Upload images to telegra.ph server.
53 | * @param {Buffer} buffData
54 | * @param {string} fileName
55 | * @returns {Promise}
56 | */
57 | const uploadImages = (buffData, fileName) => {
58 | return new Promise(async (resolve, reject) => {
59 | const { ext } = await fromBuffer(buffData)
60 | const filePath = `temp/${fileName}.${ext}`
61 | fs.writeFile(filePath, buffData, { encoding: 'base64' }, (err) => {
62 | if (err) reject(err)
63 | console.log('Uploading image to telegra.ph server...')
64 | const fileData = fs.readFileSync(filePath)
65 | const form = new FormData()
66 | form.append('file', fileData, `${fileName}.${ext}`)
67 | fetch('https://telegra.ph/upload', {
68 | method: 'POST',
69 | body: form
70 | })
71 | .then((response) => response.json())
72 | .then((result) => {
73 | if (result.error) reject(result.error)
74 | resolve('https://telegra.ph' + result[0].src)
75 | })
76 | .then(() => fs.unlinkSync(filePath))
77 | .catch((err) => reject(err))
78 | })
79 | })
80 | }
81 |
82 | module.exports = {
83 | fetchJson,
84 | fetchText,
85 | fetchBuffer,
86 | uploadImages
87 | }
88 |
--------------------------------------------------------------------------------
/tools/index.js:
--------------------------------------------------------------------------------
1 | const chalk = require('chalk')
2 | const crypto = require('crypto')
3 | const moment = require('moment-timezone')
4 | moment.tz.setDefault('Asia/Jakarta').locale('id')
5 |
6 | /**
7 | * Get text with color.
8 | * @param {string} text
9 | * @param {string} [color]
10 | */
11 | const color = (text, color) => {
12 | return !color ? chalk.green(text) : chalk.keyword(color)(text)
13 | }
14 |
15 | /**
16 | * Create serial ID.
17 | * @param {number} size
18 | * @returns {string}
19 | */
20 | const createSerial = (size) => {
21 | return crypto.randomBytes(size).toString('hex').slice(0, size)
22 | }
23 |
24 | /**
25 | * URL validator.
26 | * @param {string} url
27 | * @returns {boolean}
28 | */
29 | const isUrl = (url) => {
30 | return url.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/gi))
31 | }
32 |
33 | /**
34 | * Get time duration.
35 | * @param {Date} timestamp
36 | * @param {Date} now
37 | * @returns {number}
38 | */
39 | const processTime = (timestamp, now) => {
40 | return moment.duration(now - moment(timestamp * 1000)).asSeconds()
41 | }
42 |
43 | /**
44 | * Client options.
45 | * @param {Function} start
46 | * @returns {object}
47 | */
48 | const options = (start) => {
49 | const options = {
50 | sessionId: 'HisokaBOT',
51 | headless: true,
52 | qrTimeout: 0,
53 | authTimeout: 0,
54 | restartOnCrash: start,
55 | cacheEnabled: false,
56 | useChrome: true,
57 | killProcessOnBrowserClose: true,
58 | throwErrorOnTosBlock: false,
59 | chromiumArgs: [
60 | '--no-sandbox',
61 | '--disable-setuid-sandbox',
62 | '--aggressive-cache-discard',
63 | '--disable-cache',
64 | '--disable-application-cache',
65 | '--disable-offline-load-stale-cache',
66 | '--disk-cache-size=0'
67 | ]
68 | }
69 | return options
70 | }
71 |
72 | // Anti-spam
73 | const usedCommandRecently = new Set()
74 |
75 | /**
76 | * Check is number filtered.
77 | * @param {string} from
78 | * @returns {boolean}
79 | */
80 | const isFiltered = (from) => {
81 | return !!usedCommandRecently.has(from)
82 | }
83 |
84 | /**
85 | * Add filter to number.
86 | * @param {string} from
87 | */
88 | const addFilter = (from) => {
89 | usedCommandRecently.add(from)
90 | setTimeout(() => {
91 | return usedCommandRecently.delete(from)
92 | }, 5000) // 5 seconds delay.
93 | }
94 |
95 | module.exports = {
96 | msgFilter: {
97 | isFiltered,
98 | addFilter
99 | },
100 | color,
101 | isUrl,
102 | processTime,
103 | options,
104 | createSerial
105 | }
106 |
--------------------------------------------------------------------------------