├── lib ├── lowdb │ ├── nothing │ ├── adapters │ │ ├── nothing │ │ ├── MemorySync.js │ │ ├── Memory.js │ │ ├── LocalStorage.js │ │ ├── JSONFile.js │ │ ├── JSONFileSync.js │ │ ├── TextFile.js │ │ └── TextFileSync.js │ ├── MissingAdapterError.js │ ├── index.js │ ├── LowSync.js │ └── Low.js ├── getMime.js ├── uploadImage.js ├── uploadFile.js └── tictactoe.js ├── media └── sticker │ └── emror.webp ├── .gitignore ├── plugins ├── tools-getid.js ├── tools-say.js ├── info-sc.js ├── tools-getip.js ├── game-tebaklagu_hint.js ├── _afk_afk.js ├── game-tebak_ff_hint.js ├── game-tebakhero_hint.js ├── game-kpop_hint.js ├── game-tebakjkt48_hint.js ├── game-tebak_logo_hint.js ├── game-tebak_tokoh_hint.js ├── game-tebak_gambar3.js ├── game-tebakanime_hint.js ├── game-tebak_pemain_bola_hint.js ├── game-tebak_wallet_hint.js ├── game-tebakmakanan_hint.js ├── game-tebakpokemon_hint.js ├── game-tebak_genshin_hint.js ├── game-tebaktempat_hint.js ├── game-tebak_presiden_hint.js ├── info-tqto.js ├── owner-getdb.js ├── game-tekateki_hint.js ├── game-tebakkimia_hint.js ├── game-tebakkata_hint.js ├── game-asahotak_hint.js ├── game-kuis_kemerdekaan_hint.js ├── game-tebak-islami_hint.js ├── game-lirik_hint.js ├── game-tebakjenaka_hint.js ├── game-tebakkode_hint.js ├── game-siapakahaku_hint.js ├── game-tebakkalimat_hint.js ├── game-tebakbendera_hint.js ├── game-tebaktebakan_hint.js ├── game-dare.js ├── owner-exec2.js ├── game-truth.js ├── owner-getplugins.js ├── info-gempa.js ├── tools-uploader.js ├── xp-unreg.js ├── downloader-gitclone.js ├── tools-ss2code.js ├── game-tebakkata_ans.js ├── game-tebakjenaka_ans.js ├── tools-remini.js ├── game-tebak_ff_ans.js ├── game-tebakkalimat_ans.js ├── game-tebakanime_ans.js ├── game-tebak_pemain_bola_ans.js ├── _afk.js ├── game-tebakkimia_ans.js ├── game-tebak_wallet_ans.js ├── game-tebakhero_ans.js ├── game-kuis_kemerdekaan_ans.js ├── game-asahotak_ans.js ├── game-tebakjkt48_ans.js ├── game-kpop_ans.js ├── game-tebak_presiden_ans.js ├── game-tebak_logo_ans.js ├── info-owner.js ├── internet-kodepos.js ├── game-lirik_ans.js ├── game-tebak_tokoh_ans.js ├── game-siapakahaku_ans.js ├── game-tebak_gambar2.js ├── game-tebakmakanan_ans.js ├── game-tebakpokemon_ans.js ├── game-tebak_genshin_ans.js ├── game-tebaktebakan_ans.js ├── game-tebakbendera_ans.js ├── info-bot.js ├── game-iqtest.js ├── tools-searchfitur.js ├── downloader-ytmp3.js ├── game-math_ans.js ├── game-tekateki_ans.js ├── game-tebakkode_ans.js ├── game-tebaklagu_ans.js ├── game-tebak-islami_ans.js ├── game-tebaktempat_ans.js ├── game-tebakjkt48.js ├── game-tebak_tokoh.js ├── game-tebak_ff.js ├── xp-limit.js ├── game-tekateki.js ├── xp-regist.js ├── game-tebaklagu.js ├── game-tebakheroml.js ├── owner-loadplugin.js ├── game-tebak_gambar1.js ├── game-tebakmakanan.js ├── game-tebakpokemon.js ├── game-kpop.js ├── game-tebak_logo.js ├── stalker-igstalk.js ├── downloader-ytv.js ├── game-tebakkata.js ├── game-asahotak.js ├── game-kuis_kemerdekaan.js ├── game-tebak_genshin.js ├── game-lirik.js ├── game-tebak_pemain_bola.js ├── xp-profile.js ├── game-siapakahaku.js ├── game-tebak_wallet.js ├── game-tebakkimia.js ├── game-tebakjenaka.js ├── game-tebaktebakan.js ├── game-tebakkalimat.js ├── game-tebak_presiden.js ├── game-tebakbendera.js ├── stalker-ttstalk.js ├── game-bomb.js ├── game-suit.js ├── game-tebakanime.js ├── game-tebak-islami.js ├── game-tebakkode.js ├── list-afk.js ├── game-tebaktempat.js ├── downloader-play.js ├── maker-jadianime.js ├── downloader-douyin-tiktok.js ├── info-server.js ├── owner-sfp-df.js ├── game-family100.js ├── game-family100_ans.js ├── stalker-twstalk.js ├── owner-sf.js ├── openai-ai.js ├── stalker-ghstalk.js ├── maker-aiMusic.js ├── game-math.js ├── tools-tmpmail.js ├── owner-exec.js ├── game-tictactoe.js ├── game-bomb_ans.js ├── internet-growgarden.js ├── info-ping.js └── game-family100_hint.js ├── package.json └── config.js /lib/lowdb/nothing: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/nothing: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /media/sticker/emror.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ERLANRAHMAT/telebot-wa/HEAD/media/sticker/emror.webp -------------------------------------------------------------------------------- /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/getMime.js: -------------------------------------------------------------------------------- 1 | async function getMimeType(buffer) { 2 | const { fromBuffer } = require('file-type'); 3 | const mime = await fromBuffer(buffer); 4 | if (!mime) throw new Error('Unable to determine MIME type'); 5 | return mime.mime; 6 | }; 7 | 8 | module.exports = { getMimeType }; -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # plugins/.gitignore 2 | # Ignore all plugin files 3 | # Ignore node_modules directory 4 | node_modules/ 5 | # Ignore log files 6 | *.log 7 | # Ignore temporary files 8 | *.tmp 9 | # Ignore compiled files 10 | *.js.map 11 | # Ignore configuration files 12 | package-lock.json 13 | .git 14 | database.json 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /plugins/tools-getid.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let id = m.sender; 3 | let name = m.pushName || 'Unknown'; 4 | let message = `Your ID: ${id}\nYour Name: ${name}`; 5 | m.reply(message); 6 | } 7 | handler.help = handler.command = ['getid', 'myid']; 8 | handler.tags = ['inownerfo']; 9 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/tools-say.js: -------------------------------------------------------------------------------- 1 | const handler = async (m, { conn, text, usedPrefix, command }) => { 2 | if (!text) m.reply(`Harap masukkan text!\n\ncontoh:\n${usedPrefix + command} Haruno`) 3 | conn.reply(m.chat, text, null) 4 | } 5 | 6 | handler.help = ["say "] 7 | handler.tags = ["tools"] 8 | handler.command = ["say"] 9 | 10 | module.exports = handler 11 | -------------------------------------------------------------------------------- /plugins/info-sc.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let ye = `@${m.pushName}` 3 | let esce = ` 4 | Hai ${ye} Bot Ini Menggunakan Script :\n• https://github.com/ERLANRAHMAT/telebot-wa 5 | ` 6 | m.reply(esce) 7 | } 8 | handler.help = ['sc', 'sourcecode'] 9 | handler.tags = ['info'] 10 | handler.command = /^(sc|sourcecode)$/i 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/tools-getip.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch'); 2 | 3 | let handler = async (m, { conn }) => { 4 | let ip = await fetch(`https://api.betabotz.eu.org/ip`).then(response => response.text()); 5 | let message = `your ip: ${ip}` 6 | m.reply(message) 7 | }; 8 | 9 | handler.help = ['getip'] 10 | handler.tags = ['owner'] 11 | handler.command = /^(getip)$/i; 12 | handler.owner = true; 13 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/game-tebaklagu_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebaklagu = conn.tebaklagu ? conn.tebaklagu : {} 3 | let id = m.chat 4 | if (!(id in conn.tebaklagu)) throw false 5 | let json = conn.tebaklagu[id][1] 6 | conn.reply(m.chat, '```' + json.judul.replace(/[AIUEOaiueo]/ig, '_') + '```', m) 7 | } 8 | handler.command = /^lag$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler; -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /plugins/_afk_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(`@${m.pushName} sekarang AFK ${text ? '\nDengan Alasan : ' + text : 'Tanpa Alasan'} 6 | `) 7 | } 8 | handler.help = ['afk [alasan]'] 9 | handler.tags = ['main'] 10 | handler.command = /^afk$/i 11 | 12 | module.exports = handler 13 | //@${who.split`@`[0]} /////@${m.sender.split`@`[0] -------------------------------------------------------------------------------- /plugins/game-tebak_ff_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakff = conn.tebakff ? conn.tebakff : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakff)) throw false 5 | let json = conn.tebakff[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^tbff$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakhero_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakml = conn.tebakml ? conn.tebakml : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakml)) throw false 5 | let json = conn.tebakml[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^tml$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-kpop_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakkpop = conn.tebakkpop ? conn.tebakkpop : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakkpop)) throw false 5 | let json = conn.tebakkpop[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^kpp$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakjkt48_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakjkt = conn.tebakjkt ? conn.tebakjkt : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakjkt)) throw false 5 | let json = conn.tebakjkt[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^jkcu$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /plugins/game-tebak_logo_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebaklogo = conn.tebaklogo ? conn.tebaklogo : {} 3 | let id = m.chat 4 | if (!(id in conn.tebaklogo)) throw false 5 | let json = conn.tebaklogo[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^lgo$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_tokoh_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebaktokoh = conn.tebaktokoh ? conn.tebaktokoh : {} 3 | let id = m.chat 4 | if (!(id in conn.tebaktokoh)) throw false 5 | let json = conn.tebaktokoh[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^tbok$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_gambar3.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakgambar = conn.tebakgambar ? conn.tebakgambar : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakgambar)) throw false 5 | let json = conn.tebakgambar[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^hint$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakanime_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakanime = conn.tebakanime ? conn.tebakanime : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakanime)) throw false 5 | let json = conn.tebakanime[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^tbam$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_pemain_bola_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakbola = conn.tebakbola ? conn.tebakbola : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakbola)) throw false 5 | let json = conn.tebakbola[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^tboa$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/game-tebak_wallet_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakwallet = conn.tebakwallet ? conn.tebakwallet : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakwallet)) throw false 5 | let json = conn.tebakwallet[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^twa$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/game-tebakmakanan_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakmakanan = conn.tebakmakanan ? conn.tebakmakanan : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakmakanan)) throw false 5 | let json = conn.tebakmakanan[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^tebma$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakpokemon_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakpokemon = conn.tebakpokemon ? conn.tebakpokemon : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakpokemon)) throw false 5 | let json = conn.tebakpokemon[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^tebpo$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_genshin_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakgenshin = conn.tebakgenshin ? conn.tebakgenshin : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakgenshin)) throw false 5 | let json = conn.tebakgenshin[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^gca$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/game-tebaktempat_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebaktempat = conn.tebaktempat ? conn.tebaktempat : {} 3 | let id = m.chat 4 | if (!(id in conn.tebaktempat)) throw false 5 | let json = conn.tebaktempat[id][1] 6 | let ans = json.jawaban 7 | let clue = ans.replace(/[bcdfghjklmnpqrstvwxyz123456789]/gi, '_') 8 | m.reply('```' + clue + '```') 9 | } 10 | handler.command = /^tpc/i 11 | handler.limit = true 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/game-tebak_presiden_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakpresiden = conn.tebakpresiden ? conn.tebakpresiden : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakpresiden)) throw false 5 | let json = conn.tebakpresiden[id][1] 6 | m.reply('```' + json.jawaban.replace(/[bcdfghjklmnpqrstvwxyz]/gi, '_') + '```\n*BALAS SOALNYA, BUKAN PESAN INI!*') 7 | } 8 | handler.command = /^pra$/i 9 | 10 | handler.limit = true 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/info-tqto.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let ye = `@${m.pushName}` 3 | let esce = ` 4 | Hai ${ye}\nDengan ini saya ingin mengucapkan terima kasih kepada:\n\n• Erlan ( Betabotz )\n• Dreamliner21 ( Paull )\n• Danaputra\n• Botcahx ( Tio )\n• Dan semua yang telah berkontribusi dalam pembuatan bot ini.\n\nTerima kasih atas dukungan dan kontribusinya! 5 | ` 6 | m.reply(esce) 7 | } 8 | handler.help = handler.command = ['thanksto', 'tqto'] 9 | handler.tags = ['info'] 10 | module.exports = handler 11 | -------------------------------------------------------------------------------- /plugins/owner-getdb.js: -------------------------------------------------------------------------------- 1 | let fs = require ('fs') 2 | let handler = async (m, { conn, text }) => { 3 | m.reply('Tunggu Sebentar, Sedang mengambil file Database') 4 | let sesi = await fs.readFileSync('./database.json') 5 | return await conn.sendMessage(m.chat, { document: sesi, mimetype: 'application/json', fileName: 'database.json' }, { quoted: m }) 6 | } 7 | handler.help = ['getdb'] 8 | handler.tags = ['owner'] 9 | handler.command = /^(getdb)$/i 10 | 11 | handler.rowner = true 12 | 13 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tekateki_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tekateki = conn.tekateki ? conn.tekateki : {} 3 | let id = m.chat 4 | if (!(id in conn.tekateki)) throw false 5 | let json = conn.tekateki[id][1] 6 | let ans = json.data.jawaban.trim() 7 | let clue = ans.replace(/[AIUEOaiueo]/g, '_') 8 | conn.reply(m.chat, '```' + clue + '```\nReply soalnya, bukan pesan ini', conn.tekateki[id][0]) 9 | } 10 | handler.command = /^tete$/i 11 | handler.limit = true 12 | module.exports = handler -------------------------------------------------------------------------------- /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.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/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/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 | -------------------------------------------------------------------------------- /plugins/game-tebakkimia_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.kimia = conn.kimia ? conn.kimia : {} 3 | let id = m.chat 4 | if (!(id in conn.kimia)) throw false 5 | let json = conn.kimia[id][1] 6 | let ans = json.lambang 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[BCDFGHJKLMNPQRSTVWXYZ]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^kmi/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-tebakkata_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tbkata = conn.tbkata ? conn.tbkata : {} 3 | let id = m.chat 4 | if (!(id in conn.tbkata)) throw false 5 | let json = conn.tbkata[id][1] 6 | let ans = json.jawaban 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[BCDFGHJKLMNPQRSTFWXYZ]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^tkaa/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-asahotak_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.asahotak = conn.asahotak ? conn.asahotak : {} 3 | let id = m.chat 4 | if (!(id in conn.asahotak)) throw false 5 | let json = conn.asahotak[id][1] 6 | let ans = json.jawaban 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[bcdfghjklmnpqrstvwxyz]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^toka/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-kuis_kemerdekaan_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.merdeka = conn.merdeka ? conn.merdeka : {} 3 | let id = m.chat 4 | if (!(id in conn.merdeka)) throw false 5 | let json = conn.merdeka[id][1] 6 | let ans = json.jawaban 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[BCDFGHJKLMNPQERSVWXYZ]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^mka/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-tebak-islami_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakislami = conn.tebakislami ? conn.tebakislami : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakislami)) throw false 5 | let json = conn.tebakislami[id][1] 6 | let ans = json.jawaban 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[bcdfghjklmnpqrstvwxyz123456789]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^tsa/i 12 | handler.limit = true 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /plugins/game-lirik_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebaklirik = conn.tebaklirik ? conn.tebaklirik : {} 3 | let id = m.chat 4 | if (!(id in conn.tebaklirik)) throw false 5 | let json = conn.tebaklirik[id][1] 6 | let ans = json.answer 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[bcdfghjklmnpqrstvwxyz]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^liga/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-tebakjenaka_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakjenaka = conn.tebakjenaka ? conn.tebakjenaka : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakjenaka)) throw false 5 | let json = conn.tebakjenaka[id][1] 6 | let ans = json.jawaban 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[AIUEOaiueo]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^tbk/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-tebakkode_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakkode = conn.tebakkode ? conn.tebakkode : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakkode)) throw false 5 | let json = conn.tebakkode[id][1] 6 | let ans = json.jawaban 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[bcdfghjklmnpqrstvwxyz123456789]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^kdo/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-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.jawaban 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[bcdfghjklmnpqrstvwxyz]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^maka/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-tebakkalimat_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakkalimat = conn.tebakkalimat ? conn.tebakkalimat : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakkalimat)) throw false 5 | let json = conn.tebakkalimat[id][1] 6 | let ans = json.jawaban 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[bcdfghjklmnpqrstvwxyz]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^tela/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-tebakbendera_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebakbendera2 = conn.tebakbendera2 ? conn.tebakbendera2 : {} 3 | let id = m.chat 4 | if (!(id in conn.tebakbendera2)) throw false 5 | let json = conn.tebakbendera2[id][1] 6 | let ans = json.nama 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[bcdfghjklmnpqrstvwxyz]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^teii/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /plugins/game-tebaktebakan_hint.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.tebaktebakan = conn.tebaktebakan ? conn.tebaktebakan : {} 3 | let id = m.chat 4 | if (!(id in conn.tebaktebakan)) throw false 5 | let json = conn.tebaktebakan[id][1] 6 | let ans = json.jawaban 7 | // kalau ini error clue nya ak mau ada tanda (_) nya ganti string dalam function di bawah ini jadi huruf kecil 8 | let clue = ans.replace(/[BCDFGHJKLMNPQRSTFWXYZbcdfghjklmnpqrstvwxyz]/g, '_') 9 | m.reply('```' + clue + '```') 10 | } 11 | handler.command = /^tika/i 12 | handler.limit = true 13 | module.exports = handler 14 | 15 | //gh: dana_putra13 -------------------------------------------------------------------------------- /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 }; -------------------------------------------------------------------------------- /plugins/game-dare.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { conn }) => { 3 | let img = 'https://api.betabotz.eu.org/api/tools/uploader-get?id=QWdBQ0FnVUFBeUVHQUFTclJWR2lBQUVCYzkxb2pLX0pnN2NEMkxlMjBSVERjbl96WGNyOVd3QUNHc2t4R19YRGFWU19yUmFLZ01HNlhBRUFBd0lBQTNnQUF6WUU6OjU4NjYyNzM5Njg6QUFFcHVLbFNGRW9Pd2ZScF9kUG9zVlZPbWVCa2JybWhlMFk=&mime=image/jpeg' 4 | let dare = await fetch(`https://api.betabotz.eu.org/api/random/dare?apikey=${lann}`).then(result => result.json()) 5 | conn.sendFile(m.chat, img, 'dare.png', `*DARE*\n\n“${dare.result}”`, m) 6 | } 7 | handler.help = ['dare'] 8 | handler.tags = ['fun'] 9 | handler.command = /^(dare|berani|tantangan)$/i 10 | handler.limit = true 11 | 12 | module.exports = handler 13 | -------------------------------------------------------------------------------- /plugins/owner-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.help = ['$'] 19 | handler.tags = ['advanced'] 20 | handler.customPrefix = /^[$] / 21 | handler.command = new RegExp 22 | handler.rowner = true 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/game-truth.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch'); 2 | 3 | let handler = async (m, { conn }) => { 4 | let img = 'https://api.betabotz.eu.org/api/tools/uploader-get?id=QWdBQ0FnVUFBeUVHQUFTclJWR2lBQUVCYzkxb2pLX0pnN2NEMkxlMjBSVERjbl96WGNyOVd3QUNHc2t4R19YRGFWU19yUmFLZ01HNlhBRUFBd0lBQTNnQUF6WUU6OjU4NjYyNzM5Njg6QUFFcHVLbFNGRW9Pd2ZScF9kUG9zVlZPbWVCa2JybWhlMFk=&mime=image/jpeg' 5 | let truth = await fetch(`https://api.betabotz.eu.org/api/random/truth?apikey=${lann}`).then(result => result.json()) 6 | conn.sendFile(m.chat, img, 'truth.png', `*TRUTH*\n\n“${truth.result}”`, m) 7 | } 8 | handler.help = ['truth'] 9 | handler.tags = ['fun'] 10 | handler.command = /^(truth|kebenaran|kejujuran)$/i 11 | handler.limit = true 12 | 13 | module.exports = handler 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /plugins/owner-getplugins.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | let handler = async (m, { usedPrefix, command, text }) => { 4 | if (!text) throw `where is the text?\n\nexempel: ${usedPrefix + command} menu` 5 | const filename = path.join(__dirname, `./${text}${!/\.js$/i.test(text) ? '.js' : ''}`) 6 | const listPlugins = fs.readdirSync(path.join(__dirname)).map(v => v.replace(/\.js/, '')) 7 | if (!fs.existsSync(filename)) return m.reply(` 8 | '${filename}' not found! 9 | ${listPlugins.map(v => v).join('\n').trim()} 10 | `.trim()) 11 | m.reply(fs.readFileSync(filename, 'utf8')) 12 | } 13 | handler.help = ['getplugin'].map(v => v + ' [filename]') 14 | handler.tags = ['owner'] 15 | handler.command = /^(getplugin|get ?plugin|gp)$/i 16 | 17 | handler.rowner = true 18 | 19 | module.exports = handler 20 | -------------------------------------------------------------------------------- /plugins/info-gempa.js: -------------------------------------------------------------------------------- 1 | var axios = require('axios'); 2 | var handler = async (m, { conn }) => { 3 | try { 4 | var response = await axios.get(`https://api.betabotz.eu.org/api/search/gempa?apikey=${lann}`); 5 | var dataGempa = response.data.result.result; 6 | var caption = `Waktu : ${dataGempa.waktu}\nLintang : ${dataGempa.Lintang}\nBujur : ${dataGempa.Bujur}\nMagnitude : ${dataGempa.Magnitudo}\nKedalaman : ${dataGempa.Kedalaman}\nWilayah : ${dataGempa.Wilayah}`; 7 | conn.sendFile(m.chat, dataGempa.image, 'map.png', caption, m); 8 | } catch (e) { 9 | console.log(e); 10 | conn.reply(m.chat, 'Terjadi kesalahan saat mengambil data gempa', m); 11 | } 12 | }; 13 | handler.command = handler.help = ['infogempa', 'gempa']; 14 | handler.tags = ['info']; 15 | handler.premium = false; 16 | handler.limit = true; 17 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/tools-uploader.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 'Tidak ada media yang ditemukan' 8 | let media = await q.download() 9 | let isTele = /image\/(png|jpe?g|gif)|video\/mp4/.test(mime) 10 | let fileSizeLimit = 5 * 1024 * 1024 11 | if (media.length > fileSizeLimit) { 12 | throw 'Ukuran media tidak boleh melebihi 5MB' 13 | } 14 | let link = await (isTele ? uploadImage : uploadFile)(media) 15 | m.reply(`${link} 16 | ${media.length} Byte(s) 17 | ${isTele ? '(Tidak Ada Tanggal Kedaluwarsa)' : '(No Expired))'}`) 18 | } 19 | handler.help = ['tourl '] 20 | handler.tags = ['sticker'] 21 | handler.command = /^(upload|tourl)$/i 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/xp-unreg.js: -------------------------------------------------------------------------------- 1 | const handler = async (m, { conn, text }) => { 2 | const user = global.db.data.users[m.sender] 3 | 4 | if (!user.registered) return m.reply(`Anda belum terdaftar!\nKetik */daftar nama.umur* untuk mendaftar`) 5 | 6 | if (!text) return m.reply(`Serial Number tidak ditemukan!\n\nCara menggunakan:\n*/unreg *`) 7 | 8 | const sn = require("crypto").createHash("md5").update(m.sender.toString()).digest("hex") 9 | 10 | if (text !== sn) return m.reply(`Serial Number salah!\n\nSerial Number anda: ${sn}`) 11 | 12 | user.registered = false 13 | user.name = "" 14 | user.age = 0 15 | delete user.regTime 16 | 17 | conn.reply(m.chat, `✅ Berhasil unregister!\n\nAnda sekarang bisa daftar ulang dengan */daftar nama.umur*`, { 18 | message_id: m.id, 19 | }) 20 | } 21 | 22 | handler.help = ["unreg "] 23 | handler.tags = ["main"] 24 | handler.command = /^(unreg|unregister)$/i 25 | handler.register = true 26 | 27 | module.exports = handler 28 | -------------------------------------------------------------------------------- /plugins/downloader-gitclone.js: -------------------------------------------------------------------------------- 1 | let regex = /(?:https|git)(?::\/\/|@)github\.com[\/:]([^\/:]+)\/(.+)/i 2 | let fetch = require('node-fetch') 3 | let handler = async (m, { args, usedPrefix, command, conn }) => { 4 | 5 | if (!args[0]) throw 'link githubnya mana? contoh: https://github.com/ERLANRAHMAT/telebot-wa' 6 | 7 | if (!regex.test(args[0])) throw 'link salah!' 8 | 9 | let [, user, repo] = args[0].match(regex) || [] 10 | repo = repo.replace(/.git$/, '') 11 | let url = `https://api.github.com/repos/${user}/${repo}/zipball` 12 | let filename = (await fetch(url, { method: 'HEAD' })).headers.get('content-disposition').match(/attachment; filename=(.*)/)[1] 13 | m.reply(wait) 14 | await conn.sendMessage(m.chat, { document: { url: url }, mimetype: 'application/zip', fileName: filename.replace('.zip.zip','.zip')}, { quoted : m }) 15 | 16 | } 17 | handler.help = ['gitclone '] 18 | handler.tags = ['github'] 19 | handler.command = /gitclone/i 20 | 21 | handler.limit = true 22 | 23 | module.exports = handler 24 | -------------------------------------------------------------------------------- /plugins/tools-ss2code.js: -------------------------------------------------------------------------------- 1 | const fetch = require("node-fetch"); 2 | const uploadImage = require('../lib/uploadImage.js') 3 | let handler = async (m, { 4 | conn, 5 | usedPrefix, 6 | command 7 | }) => { 8 | var q = m.quoted ? m.quoted : m 9 | var mime = (q.msg || q).mimetype || q.mediaType || '' 10 | if (/image/g.test(mime) && !/webp/g.test(mime)) { 11 | try { 12 | await conn.reply(m.chat, wait, m) 13 | const img = await q.download?.() 14 | let out = await uploadImage(img) 15 | let res = await fetch(`https://api.betabotz.eu.org/api/tools/ss2code?url=${out}&apikey=${lann}`) 16 | let json = await res.json() 17 | await m.reply(json.result) 18 | } catch (e) { 19 | console.log(e) 20 | m.reply(`[ ! ] Identifikasi Code gagal.`) 21 | } 22 | } else { 23 | m.reply(`Kirim gambar dengan caption *${usedPrefix + command}* atau tag gambar yang sudah dikirim`) 24 | } 25 | }; 26 | handler.help = ['ss2code']; 27 | handler.command = ['ss2code']; 28 | handler.tags = ['tools']; 29 | handler.premium = false; 30 | handler.limit = true; 31 | 32 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/game-tebakkata_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.*tkaa/i.test(m.quoted.text)) return !0 7 | this.tbkata = this.tbkata ? this.tbkata : {} 8 | if (!(id in this.tbkata)) return m.reply('Soal itu telah berakhir') 9 | if (m.quoted.id == this.tbkata[id][0].id) { 10 | let json = JSON.parse(JSON.stringify(this.tbkata[id][1])) 11 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 12 | global.db.data.users[m.sender].exp += this.tbkata[id][2] 13 | m.reply(`*Benar!*\n+${this.tbkata[id][2]} Kredit sosial`) 14 | clearTimeout(this.tbkata[id][3]) 15 | delete this.tbkata[id] 16 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 17 | else m.reply(`*Salah!*`) 18 | } 19 | return !0 20 | } 21 | handler.exp = 0 22 | 23 | module.exports = handler -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs", 3 | "version": "1.0.1", 4 | "description": "Script made by Lann with telegraf", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [ 11 | "telegram", 12 | "telegram-bot", 13 | "lightweight", 14 | "telegraf", 15 | "telegram-bot-api", 16 | "nodejs", 17 | "javascript", 18 | "bot", 19 | "betabotz" 20 | ], 21 | "author": "Betabotz", 22 | "license": "ISC", 23 | "dependencies": { 24 | "axios": "^1.10.0", 25 | "chalk": "^3.0.0", 26 | "didyoumean": "^1.2.2", 27 | "express": "^5.1.0", 28 | "file-type": "^16.5.3", 29 | "form-data": "^4.0.4", 30 | "human-readable": "^0.2.1", 31 | "lodash": "^4.17.21", 32 | "lowdb": "^2.1.0", 33 | "moment-timezone": "^0.6.0", 34 | "node-fetch": "^2.6.9", 35 | "node-os-utils": "^1.3.7", 36 | "similarity": "^1.2.1", 37 | "syntax-error": "^1.4.0", 38 | "telegraf": "^4.16.3", 39 | "util": "^0.12.5", 40 | "yt-search": "^2.13.1" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/uploadImage.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const FormData = require('form-data'); 3 | const { fromBuffer } = require('file-type'); 4 | 5 | /** 6 | * Upload image to api.betabotz.eu.org 7 | * Supported mimetype: 8 | `` 9 | * - `image/jpeg` 10 | * - `image/png` 11 | * - `image/webp` 12 | * - `video/mp4` 13 | * - `video/avi` 14 | * - `video/mkv` 15 | * - `audio/mpeg` 16 | * - `audio/wav` 17 | * - `audio/ogg` 18 | * @param {Buffer} buffer 19 | * @param {String} tmp true or false 20 | *@param {apikey} register on api.betabotz.eu.org 21 | */ 22 | 23 | module.exports = async (buffer, tmp = 'false') => { 24 | const { ext, mime } = (await fromBuffer(buffer)) || {}; 25 | const form = new FormData(); 26 | form.append("file", buffer, { filename: `tmp.${ext}`, contentType: mime }); 27 | form.append("apikey", lann); 28 | form.append("tmp", tmp); 29 | try { 30 | const { data } = await axios.post("https://api.betabotz.eu.org/api/tools/upload", form, { 31 | headers: form.getHeaders(), 32 | }); 33 | console.log(data); 34 | return data.result; 35 | } catch (error) { 36 | throw error; 37 | } 38 | }; -------------------------------------------------------------------------------- /plugins/game-tebakjenaka_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.*tbk/i.test(m.quoted.text)) return !0 7 | this.tebakjenaka = this.tebakjenaka ? this.tebakjenaka : {} 8 | if (!(id in this.tebakjenaka)) return m.reply('Soal itu telah berakhir') 9 | if (m.quoted.id == this.tebakjenaka[id][0].id) { 10 | let json = JSON.parse(JSON.stringify(this.tebakjenaka[id][1])) 11 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 12 | global.db.data.users[m.sender].exp += this.tebakjenaka[id][2] 13 | m.reply(`*Benar!*\n+${this.tebakjenaka[id][2]} Kredit sosial`) 14 | clearTimeout(this.tebakjenaka[id][3]) 15 | delete this.tebakjenaka[id] 16 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 17 | else m.reply(`*Salah!*`) 18 | } 19 | return !0 20 | } 21 | handler.exp = 0 22 | 23 | module.exports = handler -------------------------------------------------------------------------------- /plugins/tools-remini.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch'); 2 | const uploadImage = require('../lib/uploadImage.js'); 3 | 4 | async function handler(m, { conn, usedPrefix, command }) { 5 | try { 6 | const q = m.quoted ? m.quoted : m; 7 | const mime = (q.msg || q).mimetype || q.mediaType || ''; 8 | if (/^image/.test(mime) && !/webp/.test(mime)) { 9 | const img = await q.download(); 10 | m.reply(wait) 11 | const out = await uploadImage(img); 12 | const api = await fetch(`https://api.betabotz.eu.org/api/tools/remini?url=${out}&apikey=${lann}`); 13 | const image = await api.json(); 14 | const { url } = image 15 | conn.sendFile(m.chat, url, null, wm, m); 16 | } else { 17 | m.reply(`Kirim gambar dengan caption *${usedPrefix + command}* atau tag gambar yang sudah dikirim.`); 18 | } 19 | } catch (e) { 20 | console.error(e); 21 | m.reply(`Identifikasi gagal. Silakan coba lagi.`); 22 | } 23 | } 24 | 25 | handler.help = ['remini']; 26 | handler.tags = ['tools']; 27 | handler.command = ['remini']; 28 | handler.premium = false; 29 | handler.limit = false; 30 | 31 | module.exports = handler; 32 | -------------------------------------------------------------------------------- /plugins/game-tebak_ff_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik .tbff/i.test(m.quoted.text)) return !0 9 | this.tebakff = this.tebakff ? this.tebakff : {} 10 | if (!(id in this.tebakff)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakff[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakff[id][1])) 13 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.tebakff[id][2] 15 | global.db.data.users[m.sender].tiketcoin += 1 16 | users.money += poin 17 | m.reply(`*Benar!*\n+${this.tebakff[id][2]} money`) 18 | clearTimeout(this.tebakff[id][3]) 19 | delete this.tebakff[id] 20 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 21 | else m.reply(`*Salah!*`) 22 | } 23 | return !0 24 | } 25 | handler.exp = 0 26 | 27 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakkalimat_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.*tela/i.test(m.quoted.text)) return !0 7 | this.tebakkalimat = this.tebakkalimat ? this.tebakkalimat : {} 8 | if (!(id in this.tebakkalimat)) return m.reply('Soal itu telah berakhir') 9 | if (m.quoted.id == this.tebakkalimat[id][0].id) { 10 | let json = JSON.parse(JSON.stringify(this.tebakkalimat[id][1])) 11 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 12 | global.db.data.users[m.sender].exp += this.tebakkalimat[id][2] 13 | m.reply(`*Benar!*\n+${this.tebakkalimat[id][2]} Kredit sosial`) 14 | clearTimeout(this.tebakkalimat[id][3]) 15 | delete this.tebakkalimat[id] 16 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 17 | else m.reply(`*Salah!*`) 18 | } 19 | return !0 20 | } 21 | handler.exp = 0 22 | 23 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakanime_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik .tbam/i.test(m.quoted.text)) return !0 9 | this.tebakanime = this.tebakanime ? this.tebakanime : {} 10 | if (!(id in this.tebakanime)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakanime[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakanime[id][1])) 13 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.tebakanime[id][2] 15 | global.db.data.users[m.sender].tiketcoin += 1 16 | users.money += poin 17 | m.reply(`*Benar!*\n+${this.tebakanime[id][2]} money`) 18 | clearTimeout(this.tebakanime[id][3]) 19 | delete this.tebakanime[id] 20 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 21 | else m.reply(`*Salah!*`) 22 | } 23 | return !0 24 | } 25 | handler.exp = 0 26 | 27 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_pemain_bola_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*tboa/i.test(m.quoted.text)) return !0 9 | this.tebakbola = this.tebakbola ? this.tebakbola : {} 10 | if (!(id in this.tebakbola)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakbola[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakbola[id][1])) 13 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.tebakbola[id][2] 15 | global.db.data.users[m.sender].tiketcoin += 1 16 | users.money += poin 17 | m.reply(`*Benar!*\n+${this.tebakbola[id][2]} money`) 18 | clearTimeout(this.tebakbola[id][3]) 19 | delete this.tebakbola[id] 20 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 21 | else m.reply(`*Salah!*`) 22 | } 23 | return !0 24 | } 25 | handler.exp = 0 26 | 27 | module.exports = handler 28 | -------------------------------------------------------------------------------- /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 | Kamu berhenti AFK${user.afkReason ? ' setelah ' + user.afkReason : ''} 7 | Selama ${clockString(new Date - user.afk)} 8 | `.trim()) 9 | user.afk = -1 10 | user.afkReason = '' 11 | } 12 | let jids = [...new Set([...(m.mentionedJid || []), ...(m.quoted ? [m.quoted.sender] : [])])] 13 | for (let jid of jids) { 14 | let user = global.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 | Jangan tag dia! 21 | Dia sedang AFK ${reason ? 'dengan alasan ' + reason : 'tanpa alasan'} 22 | Selama ${clockString(new Date - afkTime)} 23 | `.trim()) 24 | } 25 | return true 26 | } 27 | 28 | module.exports = handler 29 | 30 | function clockString(ms) { 31 | let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000) 32 | let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60 33 | let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60 34 | return [h, m, s].map(v => v.toString().padStart(2, 0) ).join(':') 35 | } 36 | -------------------------------------------------------------------------------- /plugins/game-tebakkimia_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const similarity = require('similarity') 4 | const threshold = 0.72 5 | let handler = m => m 6 | handler.before = async function (m) { 7 | let id = m.chat 8 | let users = global.db.data.users[m.sender] 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*kmi/i.test(m.quoted.text)) return !0 10 | this.kimia = this.kimia ? this.kimia : {} 11 | if (!(id in this.kimia)) return m.reply('Soal itu telah berakhir') 12 | if (m.quoted.id == this.kimia[id][0].id) { 13 | let json = JSON.parse(JSON.stringify(this.kimia[id][1])) 14 | if (m.text.toLowerCase() == json.lambang.toLowerCase().trim()) { 15 | users.money += poin 16 | global.db.data.users[m.sender].exp += this.kimia[id][2] 17 | m.reply(`*Benar!*\n+${this.kimia[id][2]} money`) 18 | clearTimeout(this.kimia[id][3]) 19 | delete this.kimia[id] 20 | } else if (similarity(m.text.toLowerCase(), json.lambang.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 21 | else m.reply(`*Salah!*`) 22 | } 23 | return !0 24 | } 25 | handler.exp = 0 26 | 27 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_wallet_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*twa/i.test(m.quoted.text)) return !0 9 | this.tebakwallet = this.tebakwallet ? this.tebakwallet : {} 10 | if (!(id in this.tebakwallet)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakwallet[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakwallet[id][1])) 13 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.tebakwallet[id][2] 15 | global.db.data.users[m.sender].tiketcoin += 1 16 | users.money += poin 17 | m.reply(`*Benar!*\n+${this.tebakwallet[id][2]} money`) 18 | clearTimeout(this.tebakwallet[id][3]) 19 | delete this.tebakwallet[id] 20 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 21 | else m.reply(`*Salah!*`) 22 | } 23 | return !0 24 | } 25 | handler.exp = 0 26 | 27 | module.exports = handler 28 | -------------------------------------------------------------------------------- /plugins/game-tebakhero_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | const similarity = require('similarity') 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*tml/i.test(m.quoted.text)) return !0 9 | this.tebakml = this.tebakml ? this.tebakml : {} 10 | if (!(id in this.tebakml)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakml[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakml[id][1])) 13 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.tebakml[id][2] 15 | users.money += poin 16 | m.reply(`*Benar!*\n+${this.tebakml[id][2]} money`) 17 | clearTimeout(this.tebakml[id][3]) 18 | delete this.tebakml[id] 19 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 20 | else m.reply(`*Salah!*`) 21 | } 22 | return !0 23 | } 24 | handler.exp = 0 25 | 26 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-kuis_kemerdekaan_ans.js: -------------------------------------------------------------------------------- 1 | const similarity = require('similarity') 2 | const threshold = 0.72 3 | let poin = 10000 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*mka/i.test(m.quoted.text)) return !0 9 | this.merdeka = this.merdeka ? this.merdeka : {} 10 | if (!(id in this.merdeka)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.merdeka[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.merdeka[id][1])) 13 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.merdeka[id][2] 15 | users.money += poin 16 | m.reply(`*Benar!*\n+${this.merdeka[id][2]} money`) 17 | clearTimeout(this.merdeka[id][3]) 18 | delete this.merdeka[id] 19 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 20 | else m.reply(`*Salah!*`) 21 | } 22 | return !0 23 | } 24 | handler.exp = 0 25 | 26 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-asahotak_ans.js: -------------------------------------------------------------------------------- 1 | const similarity = require('similarity') 2 | const threshold = 0.72 3 | let poin = 10000 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*toka/i.test(m.quoted.text)) return !0 9 | this.asahotak = this.asahotak ? this.asahotak : {} 10 | if (!(id in this.asahotak)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.asahotak[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.asahotak[id][1])) 13 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.asahotak[id][2] 15 | users.money += poin 16 | m.reply(`*Benar!*\n+${this.asahotak[id][2]} money`) 17 | clearTimeout(this.asahotak[id][3]) 18 | delete this.asahotak[id] 19 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 20 | else m.reply(`*Salah!*`) 21 | } 22 | return !0 23 | } 24 | handler.exp = 0 25 | 26 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakjkt48_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*jkcu/i.test(m.quoted.text)) return !0 9 | this.tebakjkt = this.tebakjkt ? this.tebakjkt : {} 10 | if (!(id in this.tebakjkt)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakjkt[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakjkt[id][1])) 13 | // m.reply(JSON.stringify(json, null, '\t')) 14 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebakjkt[id][2] 16 | global.db.data.users[m.sender].tiketcoin += 1 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebakjkt[id][2]} money`) 19 | clearTimeout(this.tebakjkt[id][3]) 20 | delete this.tebakjkt[id] 21 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-kpop_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*kpp/i.test(m.quoted.text)) return !0 9 | this.tebakkpop = this.tebakkpop ? this.tebakkpop : {} 10 | if (!(id in this.tebakkpop)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakkpop[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakkpop[id][1])) 13 | // m.reply(JSON.stringify(json, null, '\t')) 14 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebakkpop[id][2] 16 | global.db.data.users[m.sender].tiketcoin += 1 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebakkpop[id][2]} money`) 19 | clearTimeout(this.tebakkpop[id][3]) 20 | delete this.tebakkpop[id] 21 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_presiden_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*pra/i.test(m.quoted.text)) return !0 9 | this.tebakpresiden = this.tebakpresiden ? this.tebakpresiden : {} 10 | if (!(id in this.tebakpresiden)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakpresiden[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakpresiden[id][1])) 13 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.tebakpresiden[id][2] 15 | global.db.data.users[m.sender].tiketcoin += 1 16 | users.money += poin 17 | m.reply(`*Benar!*\n+${this.tebakpresiden[id][2]} money`) 18 | clearTimeout(this.tebakpresiden[id][3]) 19 | delete this.tebakpresiden[id] 20 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 21 | else m.reply(`*Salah!*`) 22 | } 23 | return !0 24 | } 25 | handler.exp = 0 26 | 27 | module.exports = handler 28 | -------------------------------------------------------------------------------- /plugins/game-tebak_logo_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*lgo/i.test(m.quoted.text)) return !0 9 | this.tebaklogo = this.tebaklogo ? this.tebaklogo : {} 10 | if (!(id in this.tebaklogo)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebaklogo[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebaklogo[id][1])) 13 | // m.reply(JSON.stringify(json, null, '\t')) 14 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebaklogo[id][2] 16 | global.db.data.users[m.sender].tiketcoin += 1 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebaklogo[id][2]} money`) 19 | clearTimeout(this.tebaklogo[id][3]) 20 | delete this.tebaklogo[id] 21 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler -------------------------------------------------------------------------------- /plugins/info-owner.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | // daftar owner dari config (array nomor) 3 | const ownerNumbers = (global.owner || []); 4 | 5 | // siapkan objek-objek contact 6 | const contacts = ownerNumbers.map(num => ({ 7 | phone_number: num, 8 | first_name: global.ownername || 'Owner', 9 | // optional: 10 | // last_name: '', 11 | // vcard: '...string vcard jika kamu punya...', 12 | })); 13 | 14 | const caption = `${global.botname}\nOwner: @${global.ownername}\nID: ${global.ownerid}`; 15 | await conn.sendContact( 16 | m.chat, 17 | contacts, // <= array -> dikirim satu-satu 18 | caption, // <= caption (pesan teks terpisah) 19 | m, // <= quoted (reply ke pesan user) 20 | { 21 | parse_mode: 'HTML', // untuk caption di atas 22 | auto_vcard: true, // aktifkan kalau mau auto-generate vCard 23 | vcard_org: 'Betabotz', 24 | vcard_title: 'Owner', 25 | dedupe: false, // false untuk mengirim semua kontak meskipun ada yang sama 26 | } 27 | ); 28 | }; 29 | 30 | handler.command = handler.help = ['owner', 'creator']; 31 | handler.tags = ['info']; 32 | module.exports = handler; 33 | -------------------------------------------------------------------------------- /plugins/internet-kodepos.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch'); 2 | 3 | let handler = async (m, { text, usedPrefix, command }) => { 4 | if (!text) throw `Penggunaan:\n${usedPrefix + command} \n\nContoh:\n${usedPrefix + command} Cilacap`; 5 | try { 6 | let res = await fetch(`https://api.betabotz.eu.org/api/search/kodepos?query=${encodeURIComponent(text)}&apikey=${lann}`); 7 | if (!res.ok) throw 'Data tidak ditemukan'; 8 | let json = await res.json(); 9 | if (!json.status || json.code !== 200) throw eror; 10 | let result = json.result; 11 | if (result.length === 0) throw 'Kode pos tidak ditemukan'; 12 | 13 | let message = result.map((item, index) => 14 | `${index + 1}. Provinsi: ${item.province}\nKota: ${item.city}\nKecamatan: ${item.district}\nDesa: ${item.village}\nKode Pos: ${item.postalCode}` 15 | ).join('\n\n'); 16 | 17 | m.reply(message); 18 | } catch (error) { 19 | m.reply('Terjadi error saat mencari kode pos, silakan coba lagi nanti'); 20 | } 21 | }; 22 | 23 | handler.help = ['kodepos']; 24 | handler.tags = ['internet']; 25 | handler.command = /^(kodepos)$/i; 26 | 27 | module.exports = handler; 28 | -------------------------------------------------------------------------------- /plugins/game-lirik_ans.js: -------------------------------------------------------------------------------- 1 | const similarity = require('similarity') 2 | const threshold = 0.72 3 | let poin = 10000 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*liga/i.test(m.quoted.text)) return !0 9 | this.tebaklirik = this.tebaklirik ? this.tebaklirik : {} 10 | if (!(id in this.tebaklirik)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebaklirik[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebaklirik[id][1])) 13 | if (m.text.toLowerCase() == json.answer.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.tebaklirik[id][2] 15 | users.money += poin 16 | m.reply(`*Benar!*\n+${this.tebaklirik[id][2]} money`) 17 | clearTimeout(this.tebaklirik[id][3]) 18 | delete this.tebaklirik[id] 19 | } else if (similarity(m.text.toLowerCase(), json.answer.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 20 | else m.reply(`*Salah!*`) 21 | } 22 | return !0 23 | } 24 | handler.exp = 0 25 | 26 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_tokoh_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*tbok/i.test(m.quoted.text)) return !0 9 | this.tebaktokoh = this.tebaktokoh ? this.tebaktokoh : {} 10 | if (!(id in this.tebaktokoh)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebaktokoh[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebaktokoh[id][1])) 13 | // m.reply(JSON.stringify(json, null, '\t')) 14 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebaktokoh[id][2] 16 | global.db.data.users[m.sender].tiketcoin += 1 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebaktokoh[id][2]} money`) 19 | clearTimeout(this.tebaktokoh[id][3]) 20 | delete this.tebaktokoh[id] 21 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-siapakahaku_ans.js: -------------------------------------------------------------------------------- 1 | const similarity = require('similarity') 2 | const threshold = 0.72 3 | let poin = 10000 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*maka/i.test(m.quoted.text)) return !0 9 | this.siapakahaku = this.siapakahaku ? this.siapakahaku : {} 10 | if (!(id in this.siapakahaku)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.siapakahaku[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.siapakahaku[id][1])) 13 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 14 | global.db.data.users[m.sender].exp += this.siapakahaku[id][2] 15 | users.money += poin 16 | m.reply(`*Benar!*\n+${this.siapakahaku[id][2]} money`) 17 | clearTimeout(this.siapakahaku[id][3]) 18 | delete this.siapakahaku[id] 19 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 20 | else m.reply(`*Salah!*`) 21 | } 22 | return !0 23 | } 24 | handler.exp = 0 25 | 26 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_gambar2.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*hint/i.test(m.quoted.text)) return !0 9 | this.tebakgambar = this.tebakgambar ? this.tebakgambar : {} 10 | if (!(id in this.tebakgambar)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakgambar[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakgambar[id][1])) 13 | // m.reply(JSON.stringify(json, null, '\t')) 14 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebakgambar[id][2] 16 | global.db.data.users[m.sender].tiketcoin += 1 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebakgambar[id][2]} money`) 19 | clearTimeout(this.tebakgambar[id][3]) 20 | delete this.tebakgambar[id] 21 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakmakanan_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*tebma/i.test(m.quoted.text)) return !0 9 | this.tebakmakanan = this.tebakmakanan ? this.tebakmakanan : {} 10 | if (!(id in this.tebakmakanan)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakmakanan[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakmakanan[id][1])) 13 | // m.reply(JSON.stringify(json, null, '\t')) 14 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebakmakanan[id][2] 16 | global.db.data.users[m.sender].tiketcoin += 1 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebakmakanan[id][2]} money`) 19 | clearTimeout(this.tebakmakanan[id][3]) 20 | delete this.tebakmakanan[id] 21 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakpokemon_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*tebpo/i.test(m.quoted.text)) return !0 9 | this.tebakpokemon = this.tebakpokemon ? this.tebakpokemon : {} 10 | if (!(id in this.tebakpokemon)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakpokemon[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakpokemon[id][1])) 13 | // m.reply(JSON.stringify(json, null, '\t')) 14 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebakpokemon[id][2] 16 | global.db.data.users[m.sender].tiketcoin += 1 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebakpokemon[id][2]} money`) 19 | clearTimeout(this.tebakpokemon[id][3]) 20 | delete this.tebakpokemon[id] 21 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_genshin_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const threshold = 0.72 4 | let handler = m => m 5 | handler.before = async function (m) { 6 | let id = m.chat 7 | let users = global.db.data.users[m.sender] 8 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*gca/i.test(m.quoted.text)) return !0 9 | this.tebakgenshin = this.tebakgenshin ? this.tebakgenshin : {} 10 | if (!(id in this.tebakgenshin)) return m.reply('Soal itu telah berakhir') 11 | if (m.quoted.id == this.tebakgenshin[id][0].id) { 12 | let json = JSON.parse(JSON.stringify(this.tebakgenshin[id][1])) 13 | // m.reply(JSON.stringify(json, null, '\t')) 14 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebakgenshin[id][2] 16 | global.db.data.users[m.sender].tiketcoin += 1 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebakgenshin[id][2]} money`) 19 | clearTimeout(this.tebakgenshin[id][3]) 20 | delete this.tebakgenshin[id] 21 | } else if ((m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler 29 | -------------------------------------------------------------------------------- /plugins/game-tebaktebakan_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const similarity = require('similarity') 4 | const threshold = 0.72 5 | let handler = m => m 6 | handler.before = async function (m) { 7 | let id = m.chat 8 | let users = global.db.data.users[m.sender] 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*tika/i.test(m.quoted.text)) return !0 10 | this.tebaktebakan = this.tebaktebakan ? this.tebaktebakan : {} 11 | if (!(id in this.tebaktebakan)) return m.reply('Soal itu telah berakhir') 12 | if (m.quoted.id == this.tebaktebakan[id][0].id) { 13 | let json = JSON.parse(JSON.stringify(this.tebaktebakan[id][1])) 14 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebaktebakan[id][2] 16 | users.money += poin 17 | m.reply(`*Benar!*\n+${this.tebaktebakan[id][2]} money`) 18 | clearTimeout(this.tebaktebakan[id][3]) 19 | delete this.tebaktebakan[id] 20 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 21 | else m.reply(`*Salah!*`) 22 | } 23 | return !0 24 | } 25 | handler.exp = 0 26 | 27 | module.exports = handler 28 | -------------------------------------------------------------------------------- /plugins/game-tebakbendera_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const similarity = require('similarity') 4 | const threshold = 0.72 5 | let handler = m => m 6 | handler.before = async function (m) { 7 | let id = m.chat 8 | let users = global.db.data.users[m.sender] 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*teii/i.test(m.quoted.text)) return !0 10 | this.tebakbendera2 = this.tebakbendera2 ? this.tebakbendera2 : {} 11 | if (!(id in this.tebakbendera2)) return m.reply('Soal itu telah berakhir') 12 | if (m.quoted.id == this.tebakbendera2[id][0].id) { 13 | let json = JSON.parse(JSON.stringify(this.tebakbendera2[id][1])) 14 | if (m.text.toLowerCase() == json.nama.toLowerCase().trim()) { 15 | global.db.data.users[m.sender].exp += this.tebakbendera2[id][2] 16 | users.money += poin 17 | m.reply(`*Benar!*\n+${this.tebakbendera2[id][2]} Kredit sosial`) 18 | clearTimeout(this.tebakbendera2[id][3]) 19 | delete this.tebakbendera2[id] 20 | } else if (similarity(m.text.toLowerCase(), json.nama.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 21 | else m.reply(`*Salah!*`) 22 | } 23 | return !0 24 | } 25 | handler.exp = 0 26 | 27 | module.exports = handler -------------------------------------------------------------------------------- /plugins/info-bot.js: -------------------------------------------------------------------------------- 1 | const handler = async (m, { conn }) => { 2 | const totalUsers = Object.keys(global.db.data.users).length 3 | const totalChats = Object.keys(global.db.data.chats).length 4 | const uptime = process.uptime() 5 | const hours = Math.floor(uptime / 3600) 6 | const minutes = Math.floor((uptime % 3600) / 60) 7 | const seconds = Math.floor(uptime % 60) 8 | 9 | const infoText = `📊 *BOT INFORMATION* 10 | 11 | 🤖 *Bot Name:* ${global.botname} 12 | 👑 *Owner:* ${global.ownername} 13 | 📱 *Platform:* Telegram 14 | 🔧 *Library:* Telegraf v4 15 | ⚡ *Runtime:* Node.js 16 | 17 | 📈 *Statistics:* 18 | 👥 Total Users: ${totalUsers} 19 | 💬 Total Chats: ${totalChats} 20 | ⏱️ Uptime: ${hours}h ${minutes}m ${seconds}s 21 | 💾 Memory: ${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MB 22 | 23 | 🌟 *Features:* 24 | • Plugin System 25 | • Database Storage 26 | • Limit System 27 | • Registration System 28 | • Anti-Link Protection 29 | • Welcome/Goodbye Messages 30 | 31 | 📞 *Contact Owner:* @${global.ownername}` 32 | 33 | await conn.sendMessage(m.chat, { text: infoText }, { quoted: { message_id: m.id } }) 34 | } 35 | 36 | handler.help = ["info", "botinfo"] 37 | handler.tags = ["info"] 38 | handler.command = /^(info|botinfo)$/i 39 | 40 | module.exports = handler 41 | -------------------------------------------------------------------------------- /plugins/game-iqtest.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | conn.reply(m.chat,`${pickRandom(global.iq)}`, m) 3 | } 4 | handler.help = ['iqtest'] 5 | handler.tags = ['game'] 6 | handler.command = /^(iqtest)$/i 7 | handler.owner = false 8 | handler.mods = false 9 | handler.premium = false 10 | handler.group = false 11 | handler.private = false 12 | 13 | handler.admin = false 14 | handler.botAdmin = false 15 | 16 | handler.fail = null 17 | 18 | module.exports = handler 19 | 20 | function pickRandom(list) { 21 | return list[Math.floor(list.length * Math.random())] 22 | } 23 | 24 | global.iq = [ 25 | 'IQ Anda Sebesar : 1', 26 | 'IQ Anda Sebesar : 14', 27 | 'IQ Anda Sebesar : 23', 28 | 'IQ Anda Sebesar : 35', 29 | 'IQ Anda Sebesar : 41', 30 | 'IQ Anda Sebesar : 50', 31 | 'IQ Anda Sebesar : 67', 32 | 'IQ Anda Sebesar : 72', 33 | 'IQ Anda Sebesar : 86', 34 | 'IQ Anda Sebesar : 99', 35 | 'IQ Anda Sebesar : 150', 36 | 'IQ Anda Sebesar : 340', 37 | 'IQ Anda Sebesar : 423', 38 | 'IQ Anda Sebesar : 500', 39 | 'IQ Anda Sebesar : 676', 40 | 'IQ Anda Sebesar : 780', 41 | 'IQ Anda Sebesar : 812', 42 | 'IQ Anda Sebesar : 945', 43 | 'IQ Anda Sebesar : 1000', 44 | 'IQ Anda Sebesar : Tidak Terbatas!', 45 | 'IQ Anda Sebesar : 5000', 46 | 'IQ Anda Sebesar : 7500', 47 | 'IQ Anda Sebesar : 10000', 48 | ] 49 | -------------------------------------------------------------------------------- /plugins/tools-searchfitur.js: -------------------------------------------------------------------------------- 1 | /* 2 | Jangan delete wm ini,kalo mau recode silahkan tapi sertain juga credits saya Lann 3 | Dibuat pada 22 February 2025 4 | © Betabotz 5 | */ 6 | 7 | let handler = async (m, { conn, args, command, usedPrefix }) => { 8 | if (!args.length) { 9 | return conn.reply(m.chat, `✨ *Example Usage:* \n🔍 ${usedPrefix}${command} fitur`, m); 10 | } 11 | 12 | let plugins = Object.entries(global.plugins).filter(([name, v]) => v.help && Array.isArray(v.tags)); 13 | let query = args.join(' ').toLowerCase(); 14 | let filteredPlugins = plugins.filter(([name, v]) => v.help.some(h => h.toLowerCase().includes(query))); 15 | 16 | if (filteredPlugins.length === 0) { 17 | return conn.reply(m.chat, `❌ *Tidak ada fitur yang cocok dengan pencarian:* \n🔍 '${query}'`, m); 18 | } 19 | 20 | let message = `🔎 *Hasil Pencarian untuk:* '${query}' \n\n`; 21 | message += filteredPlugins.map(([name, v]) => `✅ *${v.help.join(', ')}*\n📌 *Tags:* ${Array.isArray(v.tags) ? v.tags.join(', ') : 'Tidak ada'}\n📂 *Plugin:* ${name}\n`).join('\n'); 22 | conn.reply(m.chat, message, m); 23 | } 24 | 25 | handler.help = ['searchfitur'] 26 | handler.tags = ['tools'] 27 | handler.command = ['searchfitur'] 28 | 29 | module.exports = handler; 30 | -------------------------------------------------------------------------------- /plugins/downloader-ytmp3.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `Masukan URL!\n\ncontoh:\n${usedPrefix + command} https://youtu.be/4rDOsvzTicY?si=3Ps-SJyRGzMa83QT`; 5 | 6 | if (!text) throw 'masukan link youtube'; 7 | m.reply(wait); 8 | const response = await axios.get(`https://api.betabotz.eu.org/api/download/ytmp3?url=${text}&apikey=${lann}`); 9 | const res = response.data.result; 10 | var { mp3, id, title, source, duration } = res; 11 | let caption = `*Title:* ${title}\n*Duration:* ${duration}` 12 | // await conn.sendFile(m.chat, mp3, null, m); 13 | await conn.sendMessage(m.chat, { 14 | document: { url: mp3 }, 15 | mimetype: 'audio/mpeg', 16 | fileName: `${title}.mp3`, 17 | caption: caption 18 | }, { quoted: m }); 19 | }; 20 | handler.help = ['ytmp3']; 21 | handler.command = /^(ytmp3)$/i 22 | handler.tags = ['downloader']; 23 | handler.limit = true; 24 | handler.group = false; 25 | handler.premium = false; 26 | handler.owner = false; 27 | handler.admin = false; 28 | handler.botAdmin = false; 29 | handler.fail = null; 30 | handler.private = false; 31 | 32 | module.exports = handler; 33 | 34 | -------------------------------------------------------------------------------- /plugins/game-math_ans.js: -------------------------------------------------------------------------------- 1 | let handler = m => m; 2 | 3 | handler.before = async function (m) { 4 | let users = global.db.data.users[m.sender]; 5 | if (!m.quoted || m.quoted.sender != this.user.jid || !/^Berapa jawaban dari/i.test(m.quoted.text)) return !0; 6 | 7 | this.math = this.math ? this.math : {}; 8 | let id = m.chat; 9 | 10 | if (!(id in this.math)) { 11 | return m.reply('Soal itu telah berakhir atau kadaluwarsa.'); 12 | } 13 | 14 | if (m.quoted.id == this.math[id][0].id) { 15 | let math = JSON.parse(JSON.stringify(this.math[id][1])); 16 | 17 | if (m.text == math.jawaban) { 18 | users.exp += math.bonus; 19 | users.money += math.money; 20 | 21 | clearTimeout(this.math[id][3]); 22 | delete this.math[id]; 23 | 24 | m.reply(`🎉 *Jawaban Benar!* 🎉\n\nKamu mendapatkan:\n+${math.bonus} XP\n+${math.money} Money`); 25 | } else { 26 | this.math[id][2]--; 27 | if (this.math[id][2] == 0) { 28 | clearTimeout(this.math[id][3]); 29 | delete this.math[id]; 30 | m.reply(`*Kesempatan habis!* 😥\nJawaban yang benar adalah: *${math.jawaban}*`); 31 | } else { 32 | m.reply(`*Jawaban Salah!* ❌\nMasih ada ${this.math[id][2]} kesempatan.`); 33 | } 34 | } 35 | } 36 | return !0; 37 | }; 38 | 39 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/game-tekateki_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const similarity = require('similarity') 4 | const threshold = 0.72 5 | let handler = m => m 6 | handler.before = async function (m) { 7 | let id = m.chat 8 | let users = global.db.data.users[m.sender] 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/TEKA TEKI/i.test(m.quoted.text)) return !0 10 | this.tekateki = this.tekateki ? this.tekateki : {} 11 | if (!(id in this.tekateki)) return m.reply('Soal itu telah berakhir') 12 | // if (m.quoted.id == this.tekateki[id][0].id) { 13 | let json = JSON.parse(JSON.stringify(this.tekateki[id][1])) 14 | if (/^(.tete|bantuan|^$)/i.test(m.text)) return !0 15 | if (m.text.toLowerCase() == json.data.jawaban.toLowerCase().trim()) { 16 | global.db.data.users[m.sender].exp += this.tekateki[id][2] 17 | users.money += poin 18 | await this.reply(m.chat, `*Benar!* +${this.tekateki[id][2]}money`, m) 19 | this.sendMessage(m.chat, { delete: this.tekateki[id][0].key }).catch(e => e) 20 | clearTimeout(this.tekateki[id][3]) 21 | delete this.tekateki[id] 22 | } else if (similarity(m.text.toLowerCase(), json.data.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 23 | else m.reply(`*Salah!*`) 24 | // } 25 | return !0 26 | } 27 | handler.exp = 0 28 | 29 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakkode_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const similarity = require('similarity') 4 | const threshold = 0.72 5 | let handler = m => m 6 | handler.before = async function (m) { 7 | let id = m.chat 8 | let users = global.db.data.users[m.sender] 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*kdo/i.test(m.quoted.text)) return !0 10 | this.tebakkode = this.tebakkode ? this.tebakkode : {} 11 | if (!(id in this.tebakkode)) return m.reply('Soal itu telah berakhir') 12 | if (m.quoted.id == this.tebakkode[id][0].id) { 13 | let json = JSON.parse(JSON.stringify(this.tebakkode[id][1])) 14 | let answerIndex = ['a', 'b', 'c', 'd'].indexOf(m.text.toLowerCase()) 15 | if (json.pilihan[answerIndex] && json.pilihan[answerIndex].toLowerCase() == json.jawaban.toLowerCase().trim()) { 16 | global.db.data.users[m.sender].exp += this.tebakkode[id][2] 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebakkode[id][2]} money\n\n${json.deskripsi}`) 19 | clearTimeout(this.tebakkode[id][3]) 20 | delete this.tebakkode[id] 21 | } else if (similarity(json.pilihan[answerIndex].toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebaklagu_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | let similarity = require('similarity') 4 | const threshold = 0.72 5 | let handler = m => m 6 | handler.before = async function (m) { 7 | let id = m.chat 8 | let users = global.db.data.users[m.sender] 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text || !/Ketik.*lag/i.test(m.quoted.text) || /.*lag/i.test(m.text)) 10 | return !0 11 | this.tebaklagu = this.tebaklagu ? this.tebaklagu : {} 12 | if (!(id in this.tebaklagu)) 13 | return this.reply(m.chat, 'Soal itu telah berakhir', m) 14 | if (m.quoted.id == this.tebaklagu[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.tebaklagu[id][1])) 16 | // m.reply(JSON.stringify(json, null, '\t')) 17 | if (m.text.toLowerCase() == json.judul.toLowerCase().trim()) { 18 | global.db.data.users[m.sender].exp += this.tebaklagu[id][2] 19 | users.money += poin 20 | this.reply(m.chat, `*Benar!*\n+${this.tebaklagu[id][2]} money`, m) 21 | clearTimeout(this.tebaklagu[id][3]) 22 | delete this.tebaklagu[id] 23 | } else if (similarity(m.text.toLowerCase(), json.judul.toLowerCase().trim()) >= threshold) 24 | m.reply(`*Dikit Lagi!*`) 25 | else 26 | this.reply(m.chat, `*Salah!*`, m) 27 | } 28 | return !0 29 | } 30 | handler.exp = 0 31 | 32 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/game-tebak-islami_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const similarity = require('similarity') 4 | const threshold = 0.72 5 | let handler = m => m 6 | handler.before = async function (m) { 7 | let id = m.chat 8 | let users = global.db.data.users[m.sender] 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*tsa/i.test(m.quoted.text)) return !0 10 | this.tebakislami = this.tebakislami ? this.tebakislami : {} 11 | if (!(id in this.tebakislami)) return m.reply('Soal itu telah berakhir') 12 | if (m.quoted.id == this.tebakislami[id][0].id) { 13 | let json = JSON.parse(JSON.stringify(this.tebakislami[id][1])) 14 | let answerIndex = ['a', 'b', 'c', 'd'].indexOf(m.text.toLowerCase()) 15 | if (json.pilihan[answerIndex] && json.pilihan[answerIndex].toLowerCase() == json.jawaban.toLowerCase().trim()) { 16 | global.db.data.users[m.sender].exp += this.tebakislami[id][2] 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebakislami[id][2]} money\n\n${json.deskripsi}`) 19 | clearTimeout(this.tebakislami[id][3]) 20 | delete this.tebakislami[id] 21 | } else if (similarity(json.pilihan[answerIndex].toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler 29 | -------------------------------------------------------------------------------- /plugins/game-tebaktempat_ans.js: -------------------------------------------------------------------------------- 1 | let poin = 10000 2 | 3 | const similarity = require('similarity') 4 | const threshold = 0.72 5 | let handler = m => m 6 | handler.before = async function (m) { 7 | let id = m.chat 8 | let users = global.db.data.users[m.sender] 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !/Ketik.*tpc/i.test(m.quoted.text)) return !0 10 | this.tebaktempat = this.tebaktempat ? this.tebaktempat : {} 11 | if (!(id in this.tebaktempat)) return m.reply('Soal itu telah berakhir') 12 | if (m.quoted.id == this.tebaktempat[id][0].id) { 13 | let json = JSON.parse(JSON.stringify(this.tebaktempat[id][1])) 14 | let answerIndex = ['a', 'b', 'c', 'd'].indexOf(m.text.toLowerCase()) 15 | if (json.pilihan[answerIndex] && json.pilihan[answerIndex].toLowerCase() == json.jawaban.toLowerCase().trim()) { 16 | global.db.data.users[m.sender].exp += this.tebaktempat[id][2] 17 | users.money += poin 18 | m.reply(`*Benar!*\n+${this.tebaktempat[id][2]} money\n\n${json.deskripsi}`) 19 | clearTimeout(this.tebaktempat[id][3]) 20 | delete this.tebaktempat[id] 21 | } else if (similarity(json.pilihan[answerIndex].toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`*Dikit Lagi!*`) 22 | else m.reply(`*Salah!*`) 23 | } 24 | return !0 25 | } 26 | handler.exp = 0 27 | 28 | module.exports = handler 29 | -------------------------------------------------------------------------------- /plugins/game-tebakjkt48.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | let src 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | conn.tebakjkt = conn.tebakjkt ? conn.tebakjkt : {} 6 | let id = m.chat 7 | if (id in conn.tebakjkt) { 8 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakjkt[id][0]) 9 | throw false 10 | } 11 | if (!src) src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakjkt48?apikey=${lann}`)).json() 12 | let json = src[Math.floor(Math.random() * src.length)] 13 | if (!json) throw "Terjadi kesalahan, ulangi lagi perintah!" 14 | let caption = ` 15 | ≡ _GAME TEBAK GAMBAR_ 16 | 17 | ┌─⊷ *SOAL* 18 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 19 | ▢ Bonus: ${poin} money 20 | ▢ Ketik ${usedPrefix}jkcu untuk clue jawaban 21 | ▢ *REPLAY* pesan ini untuk\nmenjawab 22 | └────────────── 23 | 24 | `.trim() 25 | conn.tebakjkt[id] = [ 26 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 27 | json, poin, 28 | setTimeout(() => { 29 | if (conn.tebakjkt[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakjkt[id][0]) 30 | delete conn.tebakjkt[id] 31 | }, timeout) 32 | ] 33 | } 34 | 35 | handler.help = ['tebakjkt'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebakjkt/i 38 | handler.limit = false 39 | handler.group = true 40 | 41 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_tokoh.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | let src 4 | const fs = require('fs'); 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebaktokoh = conn.tebaktokoh ? conn.tebaktokoh : {} 7 | let id = m.chat 8 | if (id in conn.tebaktokoh) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebaktokoh[id][0]) 10 | throw false 11 | } 12 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebaknamatokoh?apikey=${lann}`)).json() 13 | let json = src[Math.floor(Math.random() * src.length)] 14 | let caption = ` 15 | ≡ _GAME TEBAK TOKOH_ ≡ 16 | ${json.soal} 17 | 18 | ┌─⊷ *SOAL* 19 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 20 | ▢ Bonus: ${poin} money 21 | ▢ Ketik ${usedPrefix}tbok untuk clue jawaban 22 | ▢ *REPLAY* pesan ini untuk\nmenjawab 23 | └────────────── 24 | 25 | `.trim() 26 | conn.tebaktokoh[id] = [ 27 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebaktokoh[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebaktokoh[id][0]) 31 | delete conn.tebaktokoh[id] 32 | }, timeout) 33 | ] 34 | } 35 | 36 | handler.help = ['tebaktokoh'] 37 | handler.tags = ['game'] 38 | handler.command = /^tebaktokoh/i 39 | handler.limit = false 40 | handler.group = true 41 | 42 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_ff.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | let src 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | conn.tebakff = conn.tebakff ? conn.tebakff : {} 6 | let id = m.chat 7 | if (id in conn.tebakff) { 8 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakff[id][0]) 9 | throw false 10 | } 11 | if (!src) src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakepep?apikey=${lann}`)).json() 12 | let json = src[Math.floor(Math.random() * src.length)] 13 | if (!json) throw "Terjadi kesalahan, ulangi lagi perintah!" 14 | let caption = ` 15 | ≡ _GAME TEBAK FF_ 16 | 17 | ┌─⊷ *SOAL* 18 | ▢ Penjelasan: *${json.deskripsi}* 19 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 20 | ▢ Bonus: ${poin} money 21 | ▢ Ketik ${usedPrefix}tbff untuk clue jawaban 22 | ▢ *REPLAY* pesan ini untuk\nmenjawab 23 | └────────────── 24 | 25 | `.trim() 26 | conn.tebakff[id] = [ 27 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakff[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakff[id][0]) 31 | delete conn.tebakff[id] 32 | }, timeout) 33 | ] 34 | } 35 | 36 | handler.help = ['tebakff'] 37 | handler.tags = ['game'] 38 | handler.command = /^tebakff/i 39 | handler.limit = false 40 | handler.group = true 41 | 42 | module.exports = handler -------------------------------------------------------------------------------- /plugins/xp-limit.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let user = global.db.data.users[m.sender] 3 | if (!user) { 4 | return m.reply('Data user tidak ditemukan!') 5 | } 6 | 7 | let limit = user.limit || 0 8 | let premium = user.premium || false 9 | let premiumTime = user.premiumTime || 0 10 | let isPremium = premium || premiumTime > Date.now() 11 | 12 | let premiumTimeText = 'Tidak ada' 13 | if (premiumTime > Date.now()) { 14 | let date = new Date(premiumTime) 15 | premiumTimeText = date.toLocaleDateString('id-ID', { 16 | day: '2-digit', 17 | month: '2-digit', 18 | year: 'numeric' 19 | }) 20 | } 21 | 22 | let text = `╭─「 💎 LIMIT INFO 」 23 | │ • *User:* ${m.name || 'User'} 24 | │ • *ID:* ${m.sender} 25 | │ • *Limit:* ${limit} 🎫 26 | │ • *Premium:* ${isPremium ? 'Ya ✅' : 'Tidak ❌'} 27 | │ • *Premium Time:* ${premiumTimeText} 28 | │ • *Level:* ${user.level || 1} ⭐ 29 | │ • *EXP:* ${user.exp || 0} 🎯 30 | ╰──────────────── 31 | 32 | 💡 *Tips:* 33 | • Gunakan /buylimit untuk membeli limit 34 | • Premium member mendapat unlimited limit 35 | • Limit reset setiap hari pada jam 00:00 WIB 36 | 37 | 📌 *Note:* Setiap command menggunakan 1 limit` 38 | 39 | m.reply(text) 40 | } 41 | 42 | handler.help = ['limit', 'checklimit', 'ceklimit'] 43 | handler.tags = ['xp'] 44 | handler.command = ['limit', 'checklimit', 'ceklimit'] 45 | 46 | module.exports = handler 47 | -------------------------------------------------------------------------------- /plugins/game-tekateki.js: -------------------------------------------------------------------------------- 1 | let fs = require('fs') 2 | let fetch = require('node-fetch') 3 | 4 | let timeout = 100000 5 | let poin = 10000 6 | let handler = async (m, { conn, usedPrefix }) => { 7 | conn.tekateki = conn.tekateki ? conn.tekateki : {} 8 | let id = m.chat 9 | if (id in conn.tekateki) { 10 | if (conn.tekateki[id].length !== 0) return conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tekateki[id][0]) 11 | delete conn.tekateki[id] 12 | throw false 13 | } 14 | conn.tekateki[id] = [] 15 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tekateki?apikey=${lann}`)).json() 16 | let json = src[Math.floor(Math.random() * src.length)] 17 | 18 | let caption = ` 19 | *TEKA TEKI* 20 | 21 | ${json.data.pertanyaan} 22 | ┌─⊷ *SOAL* 23 | ▢ Waktu jawab *${(timeout / 1000).toFixed(2)} detik* 24 | ▢ Bonus: ${poin} money 25 | ▢ Bantuan ${usedPrefix}tete 26 | ▢ *Balas/ replay soal ini untuk menjawab* 27 | └────────────── 28 | `.trim() 29 | conn.tekateki[id] = [ 30 | await conn.reply(m.chat, caption, m), 31 | json, poin, 32 | setTimeout(() => { 33 | if (conn.tekateki[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.data.jawaban}*`, conn.tekateki[id][0]) 34 | delete conn.tekateki[id] 35 | }, timeout) 36 | ] 37 | } 38 | handler.help = ['tekateki'] 39 | handler.tags = ['game'] 40 | handler.command = /^tekateki/i 41 | handler.group = true 42 | 43 | module.exports = handler -------------------------------------------------------------------------------- /plugins/xp-regist.js: -------------------------------------------------------------------------------- 1 | const handler = async (m, { conn, text, usedPrefix, command }) => { 2 | const user = global.db.data.users[m.sender] 3 | 4 | if (user.registered) return m.reply(`Anda sudah terdaftar!\nIngin daftar ulang? ${usedPrefix}unreg `) 5 | 6 | if (!text) 7 | return m.reply( 8 | `Format salah!\n\nPenggunaan:\n${usedPrefix + command} .\n\nContoh: ${usedPrefix + command} budi.17`, 9 | ) 10 | 11 | const [nama, umur] = text.split(".") 12 | if (!nama) return m.reply(`Nama tidak boleh kosong!`) 13 | if (!umur) return m.reply(`Umur tidak boleh kosong!`) 14 | if (isNaN(umur)) return m.reply(`Umur harus berupa angka!`) 15 | if (umur < 5) return m.reply(`Umur minimal 5 tahun!`) 16 | if (umur > 120) return m.reply(`Umur maksimal 120 tahun!`) 17 | 18 | user.name = nama.trim() 19 | user.age = Number.parseInt(umur) 20 | user.registered = true 21 | user.regTime = +new Date() 22 | 23 | const sn = require("crypto").createHash("md5").update(m.sender.toString()).digest("hex") 24 | 25 | const caption = ` 26 | ┌─〔 INFO PENGGUNA 〕 27 | ├ Nama: ${nama} 28 | ├ Umur: ${umur} tahun 29 | ├ SN: ${sn} 30 | └──── 31 | 32 | Selamat! Anda berhasil terdaftar. 33 | Ketik */menu* untuk melihat daftar perintah. 34 | `.trim() 35 | 36 | conn.reply(m.chat, caption, { message_id: m.id }) 37 | } 38 | 39 | handler.help = ["daftar ."] 40 | handler.tags = ["main"] 41 | handler.command = /^(daftar|register)$/i 42 | 43 | module.exports = handler 44 | -------------------------------------------------------------------------------- /plugins/game-tebaklagu.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let timeout = 100000 3 | let poin = 10000 4 | let handler = async (m, { conn, command, usedPrefix }) => { 5 | 6 | conn.tebaklagu = conn.tebaklagu ? conn.tebaklagu : {} 7 | let id = m.chat 8 | if (id in conn.tebaklagu) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebaklagu[id][0]) 10 | throw false 11 | } 12 | let data = await (await fetch(`https://api.betabotz.eu.org/api/game/tebaklagu?apikey=${lann}`)).json() 13 | let json = data[Math.floor(Math.random() * data.length)] 14 | let caption = `*${command.toUpperCase()}* 15 | Penyanyi: ${json.artis} 16 | 17 | ┌─⊷ *SOAL* 18 | ▢Timeout *${(timeout / 1000).toFixed(2)} detik* 19 | ▢Ketik *${usedPrefix}lag* untuk bantuan 20 | ▢Bonus: ${poin} money 21 | ▢*Balas/ replay soal ini untuk menjawab* 22 | └────────────── 23 | `.trim() 24 | conn.tebaklagu[id] = [ 25 | await conn.reply(m.chat, caption, m), 26 | json, poin, 27 | setTimeout(() => { 28 | if (conn.tebaklagu[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.judul}*`, conn.tebaklagu[id][0]) 29 | delete conn.tebaklagu[id] 30 | }, timeout) 31 | ] 32 | await conn.sendFile(m.chat, json.lagu, 'tebaklagu.mp3', '', conn.tebaklagu[id][0]) 33 | 34 | } 35 | handler.help = ['tebaklagu'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebaklagu/i 38 | handler.limit = true 39 | 40 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/game-tebakheroml.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 1000 3 | let src 4 | let fetch = require ('node-fetch'); 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebakml = conn.tebakml ? conn.tebakml : {} 7 | let id = m.chat 8 | if (id in conn.tebakml) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakml[id][0]) 10 | throw false 11 | } 12 | if (!src) src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakheroml?apikey=${lann}`)).json() 13 | let json = src[Math.floor(Math.random() * src.length)] 14 | if (!json) throw "Terjadi kesalahan, ulangi lagi perintah!" 15 | let caption = ` 16 | ≡ _TEBAK HERO ML_ 17 | 18 | ┌─⊷ *SOAL* 19 | ▢ Deskripsi: *${json.deskripsi}* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Bonus: ${poin} money 22 | ▢ Ketik ${usedPrefix}tml untuk clue jawaban 23 | ▢ *REPLAY* pesan ini untuk\nmenjawab 24 | └────────────── 25 | 26 | `.trim() 27 | conn.tebakml[id] = [ 28 | await conn.sendMessage(m.chat, { image: { url: json.fullimg }, caption: caption}, { quoted: m }), 29 | json, poin, 30 | setTimeout(() => { 31 | if (conn.tebakml[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakml[id][0]) 32 | delete conn.tebakml[id] 33 | }, timeout) 34 | ] 35 | } 36 | 37 | handler.help = ['tebakml'] 38 | handler.tags = ['game'] 39 | handler.command = /^tebakml/i 40 | handler.limit = false 41 | handler.group = true 42 | 43 | module.exports = handler -------------------------------------------------------------------------------- /plugins/owner-loadplugin.js: -------------------------------------------------------------------------------- 1 | const { readdirSync } = require('fs') 2 | const { join } = require ('path') 3 | const { pathToFileURL } = require('url') 4 | 5 | const pluginFolder = './plugins' 6 | const pluginFilter = file => file.endsWith('.js') 7 | 8 | // Pastikan global.plugins sudah didefinisikan 9 | global.plugins = global.plugins || {} 10 | 11 | const handler = async (m) => { 12 | let loaded = 0 13 | let failed = [] 14 | 15 | for (let filename of readdirSync(pluginFolder).filter(pluginFilter)) { 16 | try { 17 | const filePath = pathToFileURL(join(pluginFolder, filename)).href 18 | const module = await import(filePath) 19 | // Simpan plugin jika berhasil dimuat 20 | global.plugins[filename] = module.default || module 21 | loaded++ 22 | } catch (e) { 23 | // Catat error tanpa menghapus plugin dari global.plugins 24 | failed.push({ filename, error: `${e.name}: ${e.message}` }) 25 | // Jangan hapus entri dari global.plugins, sehingga jika plugin sebelumnya pernah dimuat, entri itu tetap ada 26 | } 27 | } 28 | 29 | let reply = `✅ ${loaded} plugin berhasil dimuat` 30 | if (failed.length > 0) { 31 | reply += `\n❌ ${failed.length} plugin gagal dimuat:\n\n` + 32 | failed.map(p => `*• ${p.filename}*\n> ${p.error}`).join('\n\n') 33 | } 34 | 35 | m.reply(reply) 36 | } 37 | 38 | handler.help = ['loadplugin'] 39 | handler.tags = ['owner'] 40 | handler.command = /^loadplug(in)?$/i 41 | handler.owner = true 42 | 43 | module.exports = handler; 44 | -------------------------------------------------------------------------------- /plugins/game-tebak_gambar1.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | let src 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | conn.tebakgambar = conn.tebakgambar ? conn.tebakgambar : {} 6 | let id = m.chat 7 | if (id in conn.tebakgambar) { 8 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakgambar[id][0]) 9 | throw false 10 | } 11 | if (!src) src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakgambar?apikey=${lann}`)).json() 12 | let json = src[Math.floor(Math.random() * src.length)] 13 | if (!json) throw "Terjadi kesalahan, ulangi lagi perintah!" 14 | let caption = ` 15 | ≡ _GAME TEBAK GAMBAR_ 16 | 17 | ┌─⊷ *SOAL* 18 | ▢ Penjelasan: *${json.deskripsi}* 19 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 20 | ▢ Bonus: ${poin} money 21 | ▢ Ketik ${usedPrefix}hint untuk clue jawaban 22 | ▢ *REPLAY* pesan ini untuk\nmenjawab 23 | └────────────── 24 | 25 | `.trim() 26 | conn.tebakgambar[id] = [ 27 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakgambar[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakgambar[id][0]) 31 | delete conn.tebakgambar[id] 32 | }, timeout) 33 | ] 34 | } 35 | 36 | handler.help = ['tebakgambar'] 37 | handler.tags = ['game'] 38 | handler.command = /^tebakgambar/i 39 | handler.limit = false 40 | handler.group = true 41 | 42 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakmakanan.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | conn.tebakmakanan = conn.tebakmakanan ? conn.tebakmakanan : {} 6 | let id = m.chat 7 | if (id in conn.tebakmakanan) { 8 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakmakanan[id][0]) 9 | throw false 10 | } 11 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakmakanan?apikey=${lann}`)).json() 12 | let json = src[Math.floor(Math.random() * src.length)] 13 | if (!json) throw "Terjadi kesalahan, ulangi lagi perintah!" 14 | let caption = ` 15 | ≡ _GAME TEBAK MAKANAN_ 16 | 17 | ┌─⊷ *SOAL* 18 | ▢ Penjelasan: *${json.deskripsi}* 19 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 20 | ▢ Bonus: ${poin} money 21 | ▢ Ketik ${usedPrefix}tebma untuk clue jawaban 22 | ▢ *REPLAY* pesan ini untuk\nmenjawab 23 | └────────────── 24 | 25 | `.trim() 26 | conn.tebakmakanan[id] = [ 27 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakmakanan[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakmakanan[id][0]) 31 | delete conn.tebakmakanan[id] 32 | }, timeout) 33 | ] 34 | } 35 | 36 | handler.help = ['tebakmakanan'] 37 | handler.tags = ['game'] 38 | handler.command = /^tebakmakanan/i 39 | handler.limit = false 40 | handler.group = true 41 | 42 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebakpokemon.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | conn.tebakpokemon = conn.tebakpokemon ? conn.tebakpokemon : {} 6 | let id = m.chat 7 | if (id in conn.tebakpokemon) { 8 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakpokemon[id][0]) 9 | throw false 10 | } 11 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakpokemon?apikey=${lann}`)).json() 12 | let json = src[Math.floor(Math.random() * src.length)] 13 | if (!json) throw "Terjadi kesalahan, ulangi lagi perintah!" 14 | let caption = ` 15 | ≡ _GAME TEBAK POKEMON_ 16 | 17 | ┌─⊷ *SOAL* 18 | ▢ Penjelasan: *${json.deskripsi}* 19 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 20 | ▢ Bonus: ${poin} money 21 | ▢ Ketik ${usedPrefix}tebpo untuk clue jawaban 22 | ▢ *REPLAY* pesan ini untuk\nmenjawab 23 | └────────────── 24 | 25 | `.trim() 26 | conn.tebakpokemon[id] = [ 27 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakpokemon[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakpokemon[id][0]) 31 | delete conn.tebakpokemon[id] 32 | }, timeout) 33 | ] 34 | } 35 | 36 | handler.help = ['tebakpokemon'] 37 | handler.tags = ['game'] 38 | handler.command = /^tebakpokemon/i 39 | handler.limit = false 40 | handler.group = true 41 | 42 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-kpop.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | let src 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | conn.tebakkpop = conn.tebakkpop ? conn.tebakkpop : {} 6 | let id = m.chat 7 | if (id in conn.tebakkpop) { 8 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakkpop[id][0]) 9 | throw false 10 | } 11 | if (!src) src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakpop?apikey=${lann}`)).json() 12 | let json = src[Math.floor(Math.random() * src.length)] 13 | if (!json) throw "Terjadi kesalahan, ulangi lagi perintah!" 14 | let caption = ` 15 | ≡ _GAME TEBAK KPOP_ 16 | 17 | ┌─⊷ *SOAL* 18 | ▢ Penjelasan: *${json.deskripsi}* 19 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 20 | ▢ Bonus: ${poin} money 21 | ▢ Ketik ${usedPrefix}kpp untuk clue jawaban 22 | ▢ *REPLAY* pesan ini untuk\nmenjawab 23 | └────────────── 24 | 25 | `.trim() 26 | conn.tebakkpop[id] = [ 27 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakkpop[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakkpop 31 | 32 | 33 | [id][0]) 34 | delete conn.tebakkpop[id] 35 | }, timeout) 36 | ] 37 | } 38 | 39 | handler.help = ['tebakkpop'] 40 | handler.tags = ['game'] 41 | handler.command = /^tebakkpop/i 42 | handler.limit = false 43 | handler.group = true 44 | 45 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak_logo.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | let src 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | conn.tebaklogo = conn.tebaklogo ? conn.tebaklogo : {} 6 | let id = m.chat 7 | if (id in conn.tebaklogo) { 8 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebaklogo[id][0]) 9 | throw false 10 | } 11 | if (!src) src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebaklogo?apikey=${lann}`)).json() 12 | let json = src[Math.floor(Math.random() * src.length)] 13 | if (!json) throw "Terjadi kesalahan, ulangi lagi perintah!" 14 | let caption = ` 15 | ≡ _GAME TEBAK LOGO_ 16 | 17 | ┌─⊷ *SOAL* 18 | ▢ Penjelasan: *${json.deskripsi}* 19 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 20 | ▢ Bonus: ${poin} money 21 | ▢ Ketik ${usedPrefix}lgo untuk clue jawaban 22 | ▢ *REPLAY* pesan ini untuk\nmenjawab 23 | └────────────── 24 | 25 | `.trim() 26 | conn.tebaklogo[id] = [ 27 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebaklogo[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebaklogo 31 | 32 | 33 | [id][0]) 34 | delete conn.tebaklogo[id] 35 | }, timeout) 36 | ] 37 | } 38 | 39 | handler.help = ['tebaklogo'] 40 | handler.tags = ['game'] 41 | handler.command = /^tebaklogo/i 42 | handler.limit = false 43 | handler.group = true 44 | 45 | module.exports = handler -------------------------------------------------------------------------------- /plugins/stalker-igstalk.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { text, usedPrefix, command, conn }) => { 3 | if (!text) return m.reply(`Contoh:\n${usedPrefix + command} erlanrahmat_14`.replace(/[\\_*[\]()~`>#+\-=|{}.!]/g, '\\$&')) 4 | try { 5 | let api = await fetch(`https://api.betabotz.eu.org/api/stalk/ig?username=${text}&apikey=${lann}`) 6 | let response = await api.json() 7 | if (response.status) { 8 | let { photoUrl, postsCount, followers, following, bio, fullName, username } = response.result 9 | let capig = `乂 *I G S T A L K E R*\n\n` 10 | capig += `◦ *Username* : ${username}\n` 11 | capig += `◦ *Full Name* : ${fullName}\n` 12 | capig += `◦ *Bio* : ${bio}\n` 13 | capig += `◦ *Followers* : ${followers}\n` 14 | capig += `◦ *Following* : ${following}\n` 15 | capig += `◦ *Total Post* : ${postsCount}\n\n` 16 | capig += `🔗 Profile: https://instagram.com/${username}` 17 | 18 | await conn.sendMessage( 19 | m.chat, 20 | { 21 | image: { url: photoUrl }, 22 | caption: capig, 23 | }, 24 | { quoted: { message_id: m.id } } 25 | ) 26 | 27 | } else { 28 | throw 'Sistem Sedang Bermasalah!' 29 | } 30 | } catch (e) { 31 | console.error(e) 32 | m.reply('Sistem Sedang Bermasalah!') 33 | } 34 | } 35 | 36 | handler.help = ['igstalk '] 37 | handler.tags = ['stalk'] 38 | handler.command = /^(igstalk)$/i 39 | handler.limit = true 40 | 41 | module.exports = handler -------------------------------------------------------------------------------- /plugins/downloader-ytv.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `Masukan URL!\n\ncontoh:\n${usedPrefix + command} https://youtu.be/4rDOsvzTicY?si=3Ps-SJyRGzMa83QT`; 5 | 6 | if (!text) throw 'masukan link youtube'; 7 | m.reply(wait); 8 | const response = await axios.get(`https://api.betabotz.eu.org/api/download/ytmp4?url=${text}&apikey=${lann}`); 9 | const res = response.data.result; 10 | var { mp4, id, title, source, duration } = res; 11 | console.log(res); 12 | let capt = `YT MP4*\n\n`; 13 | capt += `◦ id : ${id}\n`; 14 | capt += `◦ title : ${title}\n`; 15 | capt += `◦ source : ${source}\n`; 16 | capt += `◦ duration : ${duration}\n`; 17 | capt += `\n`; 18 | // await conn.sendFile(m.chat, mp4, null, capt, m); 19 | await conn.sendMessage(m.chat, { 20 | document: { url: mp4 }, 21 | mimetype: 'video/mp4', 22 | fileName: `${title}.mp4`, 23 | caption: capt 24 | }, { quoted: m }); 25 | 26 | }; 27 | handler.help = ['ytmp4']; 28 | handler.command = /^(ytmp4)$/i 29 | handler.tags = ['downloader']; 30 | handler.limit = true; 31 | handler.group = false; 32 | handler.premium = false; 33 | handler.owner = false; 34 | handler.admin = false; 35 | handler.botAdmin = false; 36 | handler.fail = null; 37 | handler.private = false; 38 | 39 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/game-tebakkata.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tbkata = conn.tbkata ? conn.tbkata : {} 7 | let id = m.chat 8 | if (id in conn.tbkata) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tbkata[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakkata?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.soal} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}tkaa untuk bantuan 22 | ▢ Bonus: ${poin} money 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.tbkata[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tbkata[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tbkata[id][0]) 31 | delete conn.tbkata[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['tebakkata'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebakkata/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-asahotak.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.asahotak = conn.asahotak ? conn.asahotak : {} 7 | let id = m.chat 8 | if (id in conn.asahotak) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.asahotak[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/asahotak?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.soal} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}toka untuk bantuan 22 | ▢ Bonus: ${poin} money 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.asahotak[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.asahotak[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.asahotak[id][0]) 31 | delete conn.asahotak[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['asahotak'] 36 | handler.tags = ['game'] 37 | handler.command = /^asahotak/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-kuis_kemerdekaan.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.merdeka = conn.merdeka ? conn.merdeka : {} 7 | let id = m.chat 8 | if (id in conn.merdeka) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.merdeka[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/kuismerdeka?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.soal} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}mka untuk bantuan 22 | ▢ Bonus: ${poin} money 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.merdeka[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.merdeka[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.merdeka[id][0]) 31 | delete conn.merdeka[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['kuismerdeka'] 36 | handler.tags = ['game'] 37 | handler.command = /^kuismerdeka/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.7.9 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-tebak_genshin.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | let fetch = require('node-fetch') 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | conn.tebakgenshin = conn.tebakgenshin ? conn.tebakgenshin : {} 6 | let id = m.chat 7 | if (id in conn.tebakgenshin) { 8 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakgenshin[id][0]) 9 | throw false 10 | } 11 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebak-genshin?apikey=${lann}`)).json() 12 | let json = src[Math.floor(Math.random() * src.length)] 13 | if (!json) throw "Terjadi kesalahan, ulangi lagi perintah!" 14 | let caption = ` 15 | ≡ _GAME TEBAK GENSHIN_ 16 | 17 | ┌─⊷ *SOAL* 18 | ▢ Penjelasan: *${json.deskripsi}* 19 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 20 | ▢ Bonus: ${poin} money 21 | ▢ Ketik ${usedPrefix}gca untuk clue jawaban 22 | ▢ *REPLAY* pesan ini untuk\nmenjawab 23 | └────────────── 24 | 25 | `.trim() 26 | conn.tebakgenshin[id] = [ 27 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakgenshin[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakgenshin[id][0]) 31 | delete conn.tebakgenshin[id] 32 | }, timeout) 33 | ] 34 | } 35 | 36 | handler.help = ['tebakgenshin'] 37 | handler.tags = ['game'] 38 | handler.command = /^tebakgenshin/i 39 | handler.limit = false 40 | handler.group = true 41 | 42 | module.exports = handler 43 | -------------------------------------------------------------------------------- /plugins/game-lirik.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebaklirik = conn.tebaklirik ? conn.tebaklirik : {} 7 | let id = m.chat 8 | if (id in conn.tebaklirik) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebaklirik[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebaklirik?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.question} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}liga untuk bantuan 22 | ▢ Bonus: ${poin} money 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.tebaklirik[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebaklirik[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.answer}*`, conn.tebaklirik[id][0]) 31 | delete conn.tebaklirik[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['tebaklirik'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebaklirik/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-tebak_pemain_bola.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebakbola = conn.tebakbola ? conn.tebakbola : {} 7 | let id = m.chat 8 | if (id in conn.tebakbola) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakbola[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakpemainbola?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.soal} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}tboa untuk bantuan 22 | ▢ Bonus: ${poin} money 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.tebakbola[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakbola[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakbola[id][0]) 31 | delete conn.tebakbola[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['tebakbola'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebakbola/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.7.9 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/xp-profile.js: -------------------------------------------------------------------------------- 1 | const handler = async (m, { conn }) => { 2 | const user = global.db.data.users[m.sender] 3 | const isOwner = global.ownerid.includes(m.sender.toString()) 4 | const isPrems = global.premid.includes(m.sender.toString()) || user.premium || user.premiumTime > 0 5 | 6 | if (!user.registered) return m.reply(`Anda belum terdaftar!\nKetik /daftar nama.umur untuk mendaftar`) 7 | 8 | let status = "User" 9 | let limitText = `${user.limit}` 10 | 11 | if (isOwner) { 12 | status = "Owner" 13 | limitText = "Unlimited" 14 | } else if (isPrems) { 15 | status = "Premium" 16 | limitText = "Unlimited" 17 | } 18 | 19 | const regDate = new Date(user.regTime) 20 | const sn = require("crypto").createHash("md5").update(m.sender.toString()).digest("hex") 21 | 22 | const profileText = `👤 *PROFILE INFORMATION* 23 | 24 | 📝 *Personal Data:* 25 | • Name: ${user.name} 26 | • Age: ${user.age} tahun 27 | • Status: ${status} 28 | • Registered: ${regDate.toLocaleDateString("id-ID")} 29 | 30 | 📊 *Statistics:* 31 | • Level: ${user.level} 32 | • EXP: ${user.exp} 33 | • Limit: ${limitText} 34 | • Commands Used: ${user.commandTotal} 35 | • Chat Count: ${user.chatTotal} 36 | 37 | 🔐 *Serial Number:* 38 | \`${sn}\` 39 | 40 | 💡 *Tip:* Simpan Serial Number untuk unregister` 41 | 42 | await conn.sendMessage(m.chat, { text: profileText }, { quoted: { message_id: m.id } }) 43 | } 44 | 45 | handler.help = ["profile", "me"] 46 | handler.tags = ["main"] 47 | handler.command = /^(profile|me)$/i 48 | handler.register = true 49 | 50 | module.exports = handler 51 | -------------------------------------------------------------------------------- /plugins/game-siapakahaku.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 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 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/siapakahaku?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.soal} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}maka untuk bantuan 22 | ▢ Bonus: ${poin} money 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.siapakahaku[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.siapakahaku[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.siapakahaku[id][0]) 31 | delete conn.siapakahaku[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['siapakahaku'] 36 | handler.tags = ['game'] 37 | handler.command = /^siapakahaku/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-tebak_wallet.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebakwallet = conn.tebakwallet ? conn.tebakwallet : {} 7 | let id = m.chat 8 | if (id in conn.tebakwallet) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakwallet[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakwallet?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.soal} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}twa untuk bantuan 22 | ▢ Bonus: ${poin} money 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.tebakwallet[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakwallet[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakwallet[id][0]) 31 | delete conn.tebakwallet[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['tebakwallet'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebakwallet/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.7.9 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-tebakkimia.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.kimia = conn.kimia ? conn.kimia : {} 7 | let id = m.chat 8 | if (id in conn.kimia) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.kimia[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakkimia?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | *${json.nama}* 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Apa rumus kimia dari zat kimia/ senyawa di atas? 21 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 22 | ▢ Ketik ${usedPrefix}kmi untuk bantuan 23 | ▢ Bonus: ${poin} money 24 | ▢ *Balas/ replay soal ini untuk menjawab* 25 | └────────────── 26 | `.trim() 27 | conn.kimia[id] = [ 28 | await conn.reply(m.chat, caption, m), 29 | json, poin, 30 | setTimeout(() => { 31 | if (conn.kimia[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.lambang}*`, conn.kimia[id][0]) 32 | delete conn.kimia[id] 33 | }, timeout) 34 | ] 35 | } 36 | handler.help = ['tebakkimia'] 37 | handler.tags = ['game'] 38 | handler.command = /^tebakkimia/i 39 | handler.register = false 40 | handler.group = false 41 | 42 | module.exports = handler 43 | 44 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 45 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-tebakjenaka.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 500 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebakjenaka = conn.tebakjenaka ? conn.tebakjenaka : {} 7 | let id = m.chat 8 | if (id in conn.tebakjenaka) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakjenaka[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakjenaka?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.pertanyaan} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}tbk untuk bantuan 22 | ▢ Bonus: ${poin} Kredit sosial 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.tebakjenaka[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakjenaka[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakjenaka[id][0]) 31 | delete conn.tebakjenaka[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['tebakjenaka'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebakjenaka/i 38 | handler.register = false 39 | handler.group = false 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-tebaktebakan.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebaktebakan = conn.tebaktebakan ? conn.tebaktebakan : {} 7 | let id = m.chat 8 | if (id in conn.tebaktebakan) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebaktebakan[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebaktebakan?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.soal} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}tika untuk bantuan 22 | ▢ Bonus: ${poin} money 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.tebaktebakan[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebaktebakan[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebaktebakan[id][0]) 31 | delete conn.tebaktebakan[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['tebaktebakan'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebaktebakan/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-tebakkalimat.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 500 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebakkalimat = conn.tebakkalimat ? conn.tebakkalimat : {} 7 | let id = m.chat 8 | if (id in conn.tebakkalimat) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakkalimat[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakkalimat?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.soal} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}tela untuk bantuan 22 | ▢ Bonus: ${poin} Kredit sosial 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.tebakkalimat[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakkalimat[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakkalimat[id][0]) 31 | delete conn.tebakkalimat[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['tebakkalimat'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebakkalimat/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-tebak_presiden.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebakpresiden = conn.tebakpresiden ? conn.tebakpresiden : {} 7 | let id = m.chat 8 | if (id in conn.tebakpresiden) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakpresiden[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakpresiden?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.soal} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}pra untuk bantuan 22 | ▢ Bonus: ${poin} money 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.tebakpresiden[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakpresiden[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakpresiden[id][0]) 31 | delete conn.tebakpresiden[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['tebakpresiden'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebakpresiden/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.7.9 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/game-tebakbendera.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 500 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebakbendera2 = conn.tebakbendera2 ? conn.tebakbendera2 : {} 7 | let id = m.chat 8 | if (id in conn.tebakbendera2) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakbendera2[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakbendera?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let caption = ` 17 | ${json.bendera} 18 | 19 | ┌─⊷ *SOAL* 20 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 21 | ▢ Ketik ${usedPrefix}teii untuk bantuan 22 | ▢ Bonus: ${poin} Kredit sosial 23 | ▢ *Balas/ replay soal ini untuk menjawab* 24 | └────────────── 25 | `.trim() 26 | conn.tebakbendera2[id] = [ 27 | await conn.reply(m.chat, caption, m), 28 | json, poin, 29 | setTimeout(() => { 30 | if (conn.tebakbendera2[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.nama}*`, conn.tebakbendera2[id][0]) 31 | delete conn.tebakbendera2[id] 32 | }, timeout) 33 | ] 34 | } 35 | handler.help = ['tebakbendera'] 36 | handler.tags = ['game'] 37 | handler.command = /^tebakbendera/i 38 | handler.register = false 39 | handler.group = true 40 | 41 | module.exports = handler 42 | 43 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 44 | // danaputra133 -------------------------------------------------------------------------------- /plugins/stalker-ttstalk.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | let handler = async (m, { text, usedPrefix, command, conn }) => { 3 | if (!text) return m.reply(`Contoh:\n${usedPrefix + command} annchire`.replace(/[\\_*[\]()~`>#+\-=|{}.!]/g, '\\$&')) 4 | try { 5 | let json = await fetch(`https://api.betabotz.eu.org/api/stalk/tt?username=${text}&apikey=${lann}`).then(res => res.json()) 6 | 7 | if (!json.result) return m.reply('Username tidak ditemukan atau API error') 8 | 9 | let pp = json.result.profile 10 | let username = json.result.username 11 | 12 | let captt = `乂 *T T S T A L K E R*\n\n` 13 | captt += `◦ *Username* : ${username}\n` 14 | captt += `◦ *Description* : ${json.result.description}\n` 15 | captt += `◦ *Likes* : ${json.result.likes.toLocaleString()}\n` 16 | captt += `◦ *Followers* : ${json.result.followers.toLocaleString()}\n` 17 | captt += `◦ *Following* : ${json.result.following.toLocaleString()}\n` 18 | captt += `◦ *Total Post* : ${json.result.totalPosts.toLocaleString()}\n\n` 19 | captt += `🔗 Profile: https://tiktok.com/@${username}` 20 | 21 | await conn.sendMessage( 22 | m.chat, 23 | { 24 | image: { url: pp }, 25 | caption: captt, 26 | }, 27 | { quoted: { message_id: m.id } } 28 | ) 29 | 30 | } catch (e) { 31 | console.error(e) 32 | m.reply('Gagal menemukan username atau sistem sedang bermasalah') 33 | } 34 | } 35 | 36 | handler.help = ['ttstalk '] 37 | handler.tags = ['stalk'] 38 | handler.command = /^(ttstalk)$/i 39 | handler.limit = true 40 | 41 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-bomb.js: -------------------------------------------------------------------------------- 1 | // Thanks To Kasan 2 | 3 | let handler = async (m, { conn }) => { 4 | conn.bomb = conn.bomb ? conn.bomb : {}; 5 | let id = m.sender, 6 | timeout = 180000; 7 | if (id in conn.bomb) return conn.reply(m.chat, '*^ sesi ini belum selesai!*', conn.bomb[id][0]); 8 | const bom = ['💥', '✅', '✅', '✅', '✅', '✅', '✅', '✅', '✅'].sort(() => Math.random() - 0.5); 9 | const number = ['1️⃣', '2️⃣', '3️⃣', '4️⃣', '5️⃣', '6️⃣', '7️⃣', '8️⃣', '9️⃣']; 10 | const array = bom.map((v, i) => ({ 11 | emot: v, 12 | number: number[i], 13 | position: i + 1, 14 | state: false 15 | })); 16 | let teks = `乂 *B O M B*\n\nKirim angka *1* - *9* untuk membuka *9* kotak nomor di bawah ini :\n\n`; 17 | for (let i = 0; i < array.length; i += 3) teks += array.slice(i, i + 3).map(v => v.state ? v.emot : v.number).join('') + '\n'; 18 | teks += `\nTimeout : [ *${((timeout / 1000) / 60)} menit* ]\nApabila mendapat kotak yang berisi bom maka point akan di kurangi. Ketik suren untuk menyerah.`; 19 | let msg = await conn.sendMessage( 20 | m.chat, 21 | { 22 | image: { url: 'https://telegra.ph/file/b3138928493e78b55526f.jpg' }, 23 | caption: teks, 24 | }, 25 | { quoted: m } 26 | ) 27 | let { key } = msg 28 | 29 | let v; 30 | conn.bomb[id] = [ 31 | msg, 32 | array, 33 | setTimeout(() => { 34 | v = array.find(v => v.emot == '💥'); 35 | if (conn.bomb[id]) conn.reply(m.chat, `*Waktu habis!*, Bom berada di kotak nomor ${v.number}.`, conn.bomb[id][0].key); 36 | delete conn.bomb[id]; 37 | }, timeout), 38 | key 39 | ]; 40 | 41 | } 42 | 43 | handler.help = ["bomb"]; 44 | handler.tags = ["game"]; 45 | handler.command = /^(bomb)$/i; 46 | 47 | module.exports = handler; 48 | -------------------------------------------------------------------------------- /plugins/game-suit.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { text, usedPrefix }) => { 2 | let salah = `Pilihan yang tersedia\n\ngunting, kertas, batu\n\n${usedPrefix}suit gunting\n\nkasih spasi!` 3 | if (!text) throw salah 4 | var astro = Math.random() 5 | 6 | if (astro < 0.34) { 7 | astro = 'batu' 8 | } else if (astro > 0.34 && astro < 0.67) { 9 | astro = 'gunting' 10 | } else { 11 | astro = 'kertas' 12 | } 13 | 14 | //menentukan rules 15 | if (text == astro) { 16 | m.reply(`Seri!\nkamu: ${text}\nBot: ${astro}`) 17 | } else if (text == 'batu') { 18 | if (astro == 'gunting') { 19 | global.db.data.users[m.sender].money += 1000 20 | m.reply(`Kamu menang! +Rp1000\nKamu: ${text}\nBot: ${astro}`) 21 | } else { 22 | m.reply(`Kamu kalah!\nkamu: ${text}\nBot: ${astro}`) 23 | } 24 | } else if (text == 'gunting') { 25 | if (astro == 'kertas') { 26 | global.db.data.users[m.sender].money += 1000 27 | m.reply(`Kamu menang! +Rp1000\nKamu: ${text}\nBot: ${astro}`) 28 | } else { 29 | m.reply(`Kamu kalah!\nkamu: ${text}\nBot: ${astro}`) 30 | } 31 | } else if (text == 'kertas') { 32 | if (astro == 'batu') { 33 | global.db.data.users[m.sender].money += 1000 34 | m.reply(`Kamu menang! +Rp1000\nKamu: ${text}\nBot: ${astro}`) 35 | } else { 36 | m.reply(`Kamu kalah!\nkamu: ${text}\nBot: ${astro}`) 37 | } 38 | } else { 39 | throw salah 40 | } 41 | } 42 | handler.help = ['suit'] 43 | handler.tags = ['game'] 44 | handler.command = /^(suit)$/i 45 | 46 | module.exports = handler 47 | -------------------------------------------------------------------------------- /plugins/game-tebakanime.js: -------------------------------------------------------------------------------- 1 | let timeout = 100000 2 | let poin = 10000 3 | 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | conn.tebakanime = conn.tebakanime ? conn.tebakanime : {} 6 | let id = m.chat 7 | if (id in conn.tebakanime) { 8 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakanime[id][0]) 9 | throw false 10 | } 11 | 12 | let json 13 | try { 14 | json = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakanime?apikey=${lann}`)).json() 15 | } catch (e) { 16 | console.error(e) 17 | throw "Gagal mengambil data dari API, coba lagi nanti." 18 | } 19 | 20 | // Pastikan API memberikan hasil yang valid 21 | if (!json || !json.img || !json.jawaban) throw "Terjadi kesalahan, API tidak memberikan data yang valid!" 22 | 23 | let caption = ` 24 | ≡ _GAME TEBAK ANIME 25 | 26 | ┌─⊷ *SOAL* 27 | ▢ Deskripsi Anime: *${json.deskripsi}* 28 | ▢ Tahun rilis: *${json['tahun rilis'] || 'Tidak diketahui'}* 29 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 30 | ▢ Bonus: ${poin} money 31 | ▢ Ketik ${usedPrefix}tbam untuk clue jawaban 32 | ▢ *REPLAY* pesan ini untuk\nmenjawab 33 | └────────────── 34 | 35 | `.trim() 36 | conn.tebakanime[id] = [ 37 | await conn.sendMessage(m.chat, { image: { url: json.img }, caption: caption}, { quoted: m }), 38 | json, poin, 39 | setTimeout(() => { 40 | if (conn.tebakanime[id]) conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakanime[id][0]) 41 | delete conn.tebakanime[id] 42 | }, timeout) 43 | ] 44 | } 45 | 46 | handler.help = ['tebakanime'] 47 | handler.tags = ['game'] 48 | handler.command = /^tebakanime/i 49 | handler.limit = false 50 | handler.group = true 51 | 52 | module.exports = handler -------------------------------------------------------------------------------- /plugins/game-tebak-islami.js: -------------------------------------------------------------------------------- 1 | let fs = require('fs') 2 | let path = require('path') 3 | 4 | let timeout = 100000 5 | let poin = 10000 6 | let handler = async (m, { conn, usedPrefix }) => { 7 | conn.tebakislami = conn.tebakislami ? conn.tebakislami : {} 8 | let id = m.chat 9 | if (id in conn.tebakislami) { 10 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakislami[id][0]) 11 | throw false 12 | } 13 | // di sini dia ngambil data dari file JSON 14 | let data = await (await fetch(`https://api.betabotz.eu.org/api/game/kuisislami?apikey=${lann}`)).json() 15 | let json = data[Math.floor(Math.random() * data.length)] 16 | // buat caption buat di tampilin di wa 17 | let options = json.pilihan.map((opt, i) => `${String.fromCharCode(65 + i)}. ${opt}`).join('\n') 18 | let caption = ` 19 | ${json.soal} 20 | 21 | ${options} 22 | 23 | ┌─⊷ *SOAL* 24 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 25 | ▢ Bonus: ${poin} money 26 | ▢ Ketik ${usedPrefix}tsa untuk clue jawaban 27 | ▢ *Balas/ replay soal ini untuk menjawab dengan a, b, c, atau d* 28 | └────────────── 29 | `.trim() 30 | conn.tebakislami[id] = [ 31 | await conn.reply(m.chat, caption, m), 32 | json, poin, 33 | setTimeout(() => { 34 | if (conn.tebakislami[id]) { 35 | conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakislami[id][0]) 36 | delete conn.tebakislami[id] // Automatically delete the question 37 | } 38 | }, timeout) 39 | ] 40 | } 41 | handler.help = ['tebakislami'] 42 | handler.tags = ['game'] 43 | handler.command = /^tebakislami/i 44 | handler.register = false 45 | handler.group = true 46 | 47 | module.exports = handler 48 | -------------------------------------------------------------------------------- /plugins/game-tebakkode.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebakkode = conn.tebakkode ? conn.tebakkode : {} 7 | let id = m.chat 8 | if (id in conn.tebakkode) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebakkode[id][0]) 10 | throw false 11 | } 12 | // di sini dia ngambil data dari api 13 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/tebakkode?apikey=${lann}`)).json() 14 | let json = src[Math.floor(Math.random() * src.length)] 15 | // buat caption buat di tampilin di wa 16 | let options = json.pilihan.map((opt, i) => `${String.fromCharCode(65 + i)}. ${opt}`).join('\n') 17 | let caption = ` 18 | ${json.soal} 19 | 20 | ${options} 21 | 22 | ┌─⊷ *SOAL* 23 | ▢ Bahasa: *${json.bahasa}* 24 | ▢ Timeout *${(timeout / 1000).toFixed(2)} detik* 25 | ▢ Bonus: ${poin} money 26 | ▢ Ketik ${usedPrefix}kdo untuk clue jawaban 27 | ▢ *Balas/ replay soal ini untuk menjawab dengan a, b, c, atau d* 28 | └────────────── 29 | `.trim() 30 | conn.tebakkode[id] = [ 31 | await conn.reply(m.chat, caption, m), 32 | json, poin, 33 | setTimeout(() => { 34 | if (conn.tebakkode[id]) { 35 | conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*`, conn.tebakkode[id][0]) 36 | delete conn.tebakkode[id] // Automatically delete the question 37 | } 38 | }, timeout) 39 | ] 40 | } 41 | handler.help = ['tebakkode'] 42 | handler.tags = ['game'] 43 | handler.command = /^tebakkode/i 44 | handler.register = false 45 | handler.group = true 46 | 47 | module.exports = handler 48 | 49 | // tested di bileys versi 6.5.0 dan sharp versi 0.30.5 50 | // danaputra133 -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | global.token = "" 2 | global.ownername = "betabotz" // sesuai username telegram 3 | global.ownerid = ["1344383547"] // jika lebih dari 1 owner maka isi disni 4 | global.premid = "1344383547" 5 | global.botname = "XiaoLann" 6 | global.owner = ["628954231835277", "628954231835287", "62895423183527"] // untuk contact owner sesuaikan dengan ownerid 7 | global.prefix = ["/", ".", "#", "!"] 8 | global.wib = 7 9 | global.wait = "Tunggu Sebentar..." 10 | global.wm = "© Betabotz" 11 | // Message 12 | // Jangan diubah bagian ini 13 | global.MAX_CAPTION_LENGTH = 3900; 14 | // Ini boleh diubah sesuai kebutuhan 15 | global.message = { 16 | rowner: "Perintah ini hanya dapat digunakan oleh _*OWNER!*_", 17 | owner: "Perintah ini hanya dapat digunakan oleh _*Owner Bot*_!", 18 | premium: "Perintah ini hanya untuk member _*Premium*_!", 19 | group: "Perintah ini hanya dapat digunakan di grup!", 20 | private: "Perintah ini hanya dapat digunakan di Chat Pribadi!", 21 | admin: "Perintah ini hanya dapat digunakan oleh admin grup!", 22 | error: "Terjadi kesalahan, coba lagi nanti.", 23 | }; 24 | 25 | // Port configuration 26 | global.ports = [4000, 3000, 5000, 8000]; 27 | 28 | // Database configuration 29 | global.limit = 100; 30 | 31 | // Apikey 32 | //INI WAJIB DI ISI!// 33 | global.lann = '' 34 | global.aksesKey = '' 35 | //Daftar terlebih dahulu https://api.betabotz.eu.org 36 | 37 | global.APIs = { 38 | lann: 'https://api.betabotz.eu.org', 39 | } 40 | global.APIKeys = { 41 | 'https://api.betabotz.eu.org': global.lann, 42 | } 43 | 44 | let fs = require('fs'); 45 | let chalk = require('chalk'); 46 | 47 | const file = require.resolve(__filename); 48 | 49 | fs.watchFile(file, () => { 50 | fs.unwatchFile(file); 51 | console.log(chalk.redBright(`Update 'config.js'`)); 52 | delete require.cache[file]; 53 | require(file); 54 | }); 55 | -------------------------------------------------------------------------------- /plugins/list-afk.js: -------------------------------------------------------------------------------- 1 | function listAfkHandler(m, { conn }) { 2 | let users = Object.entries(global.db.data.users) 3 | .filter(([_, user]) => user.afk > -1) 4 | .map(([jid, user]) => { 5 | let name = user.registered ? user.name : conn.getName(jid) 6 | let reason = user.afkReason ? '• *ALASAN* : ' + user.afkReason : '• *TANPA ALASAN*' 7 | let duration = new Date() - user.afk 8 | return `${name} (Jangka waktu: ${formatTime(duration)})\n${reason}` 9 | }) 10 | 11 | if (users.length > 0) { 12 | conn.sendMessage(m.chat, { 13 | text: `*LIST AFK* :\n\n ${users.join('\n\n')}`, 14 | contextInfo: { 15 | externalAdReply: { 16 | title: 'list afk user', 17 | thumbnailUrl: 'https://api.betabotz.eu.org/api/tools/get-upload?id=f/mzx1qcg.jpg', 18 | mediaType: 1, 19 | renderLargerThumbnail: true 20 | } 21 | } 22 | }) 23 | } else { 24 | conn.reply(m.chat, 'Tidak ada pengguna yang sedang AFK saat ini.', m) 25 | } 26 | } 27 | 28 | listAfkHandler.help = ['listafk'] 29 | listAfkHandler.tags = ['group'] 30 | listAfkHandler.command = /^listafk$/i 31 | 32 | module.exports = listAfkHandler; 33 | 34 | function formatTime(ms) { 35 | let days = Math.floor(ms / (1000 * 60 * 60 * 24)) 36 | let hours = Math.floor((ms % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) 37 | let minutes = Math.floor((ms % (1000 * 60 * 60)) / (1000 * 60)) 38 | let seconds = Math.floor((ms % (1000 * 60)) / 1000) 39 | 40 | let timeString = '' 41 | if (days > 0) timeString += `${days} hari ` 42 | if (hours > 0) timeString += `${hours} jam ` 43 | if (minutes > 0) timeString += `${minutes} menit ` 44 | if (seconds > 0) timeString += `${seconds} detik` 45 | 46 | return timeString 47 | } -------------------------------------------------------------------------------- /plugins/game-tebaktempat.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let timeout = 100000 4 | let poin = 10000 5 | let handler = async (m, { conn, usedPrefix }) => { 6 | conn.tebaktempat = conn.tebaktempat ? conn.tebaktempat : {} 7 | let id = m.chat 8 | if (id in conn.tebaktempat) { 9 | conn.reply(m.chat, 'Masih ada soal belum terjawab di chat ini', conn.tebaktempat[id][0]) 10 | throw false 11 | } 12 | 13 | let json 14 | try { 15 | let res = await fetch(`https://api.betabotz.eu.org/api/game/tebaktempat?apikey=${lann}`) 16 | if (!res.ok) throw new Error('Gagal mengambil data dari API') 17 | let result = await res.json() 18 | json = result[Math.floor(Math.random() * result.length)] // Pilih soal secara acak 19 | } catch (e) { 20 | return conn.reply(m.chat, '❌ Gagal mengambil data soal. Coba lagi nanti.', m) 21 | } 22 | 23 | let options = json.pilihan.map((opt, i) => `${String.fromCharCode(65 + i)}. ${opt}`).join('\n') 24 | let caption = ` 25 | ${json.soal} 26 | 27 | ${options} 28 | 29 | ┌─⊷ *SOAL* 30 | ▢ Timeout: *${(timeout / 1000).toFixed(2)} detik* 31 | ▢ Bonus: ${poin} money 32 | ▢ Ketik ${usedPrefix}tpc untuk clue jawaban 33 | ▢ *Balas/reply soal ini untuk menjawab dengan A, B, C, atau D* 34 | └────────────── 35 | `.trim() 36 | 37 | conn.tebaktempat[id] = [ 38 | await conn.reply(m.chat, caption, m), 39 | json, poin, 40 | setTimeout(() => { 41 | if (conn.tebaktempat[id]) { 42 | conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${json.jawaban}*\n\nDeskripsi: ${json.deskripsi}`, conn.tebaktempat[id][0]) 43 | delete conn.tebaktempat[id] 44 | } 45 | }, timeout) 46 | ] 47 | } 48 | handler.help = ['tebaktempat'] 49 | handler.tags = ['game'] 50 | handler.command = /^tebaktempat/i 51 | handler.register = false 52 | handler.group = true 53 | 54 | module.exports = handler 55 | -------------------------------------------------------------------------------- /plugins/downloader-play.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const yts = require("yt-search"); 3 | const axios = require("axios"); 4 | 5 | let handler = async (m, { conn, text, usedPrefix, command }) => { 6 | if (!text) throw `Masukkan judul/link YouTube!\n\nContoh:\n${usedPrefix + command} taylor swift love story`; 7 | await conn.reply(m.chat, "Tunggu sebentar...", m); 8 | 9 | try { 10 | const look = await yts(text); 11 | const vid = look.videos?.[0]; 12 | if (!vid) throw new Error("Video/Audio tidak ditemukan"); 13 | if (vid.seconds >= 3600) { 14 | return conn.reply(m.chat, "Video lebih dari 1 jam!", m,); 15 | } 16 | const { data } = await axios.get( 17 | `https://api.betabotz.eu.org/api/download/yt?url=${encodeURIComponent(vid.url)}&apikey=${lann}` 18 | ); 19 | if (!data || !data.result || !data.result.mp3) { 20 | throw new Error("Gagal mendapatkan link audio"); 21 | } 22 | const audioUrl = data.result.mp3; 23 | const caption = 24 | `∘ Title : ${vid.title}\n` + 25 | `∘ ID : ${vid.videoId}\n` + 26 | `∘ Duration : ${vid.timestamp}\n` + 27 | `∘ Viewers : ${vid.views}\n` + 28 | `∘ Upload At : ${vid.ago}\n` + 29 | `∘ Author : ${vid.author?.name}\n` + 30 | `∘ Channel : ${vid.author?.url}\n` + 31 | `∘ Url : ${vid.url}`; 32 | 33 | await conn.sendMessage( 34 | m.chat, 35 | { image: { url: vid.image }, caption }, 36 | { 37 | quoted: { message_id: m.id }, 38 | } 39 | ); 40 | await conn.sendMessage(m.chat, { audio: { url: audioUrl }, mimetype: 'audio/mpeg' }, { quoted: m }); 41 | 42 | } catch (e) { 43 | console.error(e); 44 | return conn.reply(m.chat, `*Error:* ${e.message || e}`, m, { parse_mode: false }); 45 | } 46 | }; 47 | 48 | handler.command = handler.help = ["play", "ds", "song"]; 49 | handler.tags = ["downloader"]; 50 | handler.limit = true; 51 | handler.premium = false; 52 | 53 | module.exports = handler; 54 | -------------------------------------------------------------------------------- /plugins/maker-jadianime.js: -------------------------------------------------------------------------------- 1 | const uploadImage = require('../lib/uploadImage'); 2 | const fetch = require('node-fetch'); 3 | 4 | let handler = async (m, { conn, usedPrefix, command }) => { 5 | var q = m.quoted ? m.quoted : m; 6 | var mime = (q.msg || q).mimetype || q.mediaType || ''; 7 | 8 | if (/image/g.test(mime) && !/webp/g.test(mime)) { 9 | await conn.reply(m.chat, wait, m); 10 | try { 11 | const img = await q.download?.(); 12 | let out = await uploadImage(img); 13 | let old = new Date(); 14 | 15 | let res = await fetch(`https://api.betabotz.eu.org/api/maker/jadianime?url=${out}&apikey=${lann}`); 16 | let convert = await res.json(); 17 | 18 | if (!convert.result || !convert.result.img_1 || !convert.result.img_2) { 19 | return m.reply("[ ! ] Gagal mendapatkan hasil."); 20 | } 21 | 22 | let img1 = await fetch(convert.result.img_1).then(res => res.buffer()); 23 | let img2 = await fetch(convert.result.img_2).then(res => res.buffer()); 24 | 25 | await conn.sendMessage(m.chat, { 26 | image: img1, 27 | caption: `🍟 *Fetching:* ${((new Date() - old) * 1)} ms\n*Style:* Anime 2D` 28 | }, { quoted: m }); 29 | 30 | await conn.sendMessage(m.chat, { 31 | image: img2, 32 | caption: `🍟 *Fetching:* ${((new Date() - old) * 1)} ms\n*Style:* Anime 3D` 33 | }, { quoted: m }); 34 | 35 | } catch (e) { 36 | console.error(e); 37 | m.reply("[ ! ] Terjadi kesalahan saat memproses gambar."); 38 | } 39 | } else { 40 | m.reply(`Kirim gambar dengan caption *${usedPrefix + command}* atau tag gambar yang sudah dikirim.`); 41 | } 42 | }; 43 | 44 | handler.help = ['jadianime']; 45 | handler.command = ['toanime', 'jadianime']; 46 | handler.tags = ['maker']; 47 | handler.premium = false; 48 | handler.limit = true; 49 | 50 | module.exports = handler; 51 | -------------------------------------------------------------------------------- /plugins/downloader-douyin-tiktok.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | let capt, urlApi; 5 | 6 | if (!text) { 7 | throw `Masukan URL!\n\ncontoh:\n${usedPrefix + command} https://vt.tiktok.com/ZSY8XguF2/`; 8 | } 9 | 10 | if (!text.match(/tiktok|douyin/gi)) { 11 | throw `URL Tidak Ditemukan!`; 12 | } 13 | 14 | if (command === 'tiktok' || command === 'tt' || command === 'ttdl' || command === 'ttnowm' || command === 'tiktokdl' || command === 'tiktoknowm') { 15 | capt = `乂 *T I K T O K*`; 16 | urlApi = `https://api.betabotz.eu.org/api/download/tiktok?url=${text}&apikey=${lann}`; 17 | } else if (command === 'douyin' || command === 'douyindl') { 18 | capt = `乂 *D O U Y I N*`; 19 | urlApi = `https://api.betabotz.eu.org/api/download/douyin?url=${text}&apikey=${lann}`; 20 | } 21 | 22 | try { 23 | m.reply(wait); 24 | const response = await axios.get(urlApi); 25 | const res = response.data.result; 26 | var { video, title, title_audio, audio } = res; 27 | 28 | capt += `\n\n◦ *Title* : ${title}\n◦ *Audio Title* : ${title_audio}\n`; 29 | 30 | if (Array.isArray(video)) { 31 | for (let v of video) { 32 | await conn.sendFile(m.chat, v, null, capt, m); 33 | } 34 | } else { 35 | await conn.sendFile(m.chat, video, null, capt, m); 36 | } 37 | 38 | await conn.sendMessage(m.chat, { audio: { url: audio[0] }, mimetype: 'audio/mpeg' }, { quoted: m }); 39 | 40 | } catch (e) { 41 | console.error(e); 42 | throw `🚩 Terjadi kesalahan, coba lagi nanti.`; 43 | } 44 | }; 45 | handler.help = handler.command = ['tiktok', 'tt', 'ttdl', 'ttnowm', 'tiktokdl', 'tiktoknowm', 'douyin', 'douyindl']; 46 | handler.tags = ['downloader']; 47 | handler.limit = true; 48 | handler.group = false; 49 | handler.premium = false; 50 | handler.owner = false; 51 | handler.admin = false; 52 | handler.botAdmin = false; 53 | handler.fail = null; 54 | handler.private = false; 55 | 56 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/info-server.js: -------------------------------------------------------------------------------- 1 | const os = require('os'); 2 | const fetch = require('node-fetch'); 3 | 4 | let handler = async (m, { conn }) => { 5 | try { 6 | let response = await fetch('https://freeipapi.com/api/json'); 7 | let json = await response.json(); 8 | let caption = `乂 *S E R V E R*\n\n`; 9 | caption += `┌ ◦ OS: ${os.type()} (${os.arch()} / ${os.release()})\n`; 10 | caption += `│ ◦ RAM: ${formatSize(os.totalmem() - os.freemem())} / ${formatSize(os.totalmem())}\n`; 11 | json.timeZones = [json.timeZones[0]]; 12 | let currencies = json.currencies || ['N/A']; 13 | let currency = currencies[0] || 'N/A'; 14 | 15 | for (let key in json) { 16 | if (key === 'currencies') { 17 | caption += `│ ◦ Currency: ${currency}\n`; 18 | } else { 19 | caption += `│ ◦ ${ucword(key)}: ${json[key]}\n`; 20 | } 21 | } 22 | caption += `│ ◦ Uptime: ${toTime(os.uptime() * 1000)}\n`; 23 | caption += `└ ◦ Processor: ${os.cpus()[0].model}\n\n`; 24 | conn.sendMessage(m.chat, { photo: 'https://telegra.ph/file/cf4f28ed3b9ebdfb30adc.png', caption: caption }, { quoted: m }) 25 | } catch (error) { 26 | console.log(error); 27 | } finally { 28 | deleteMessage(); 29 | } 30 | }; 31 | 32 | handler.command = handler.help = ['server']; 33 | handler.tags = ['info']; 34 | handler.owner = true; 35 | 36 | module.exports = handler; 37 | 38 | function deleteMessage() { 39 | //chaunima😁 40 | } 41 | 42 | function formatSize(bytes) { 43 | const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; 44 | if (bytes === 0) return '0 Bytes'; 45 | const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10); 46 | return (Math.round(bytes / Math.pow(1024, i) * 100) / 100) + ' ' + sizes[i]; 47 | } 48 | 49 | function ucword(str) { 50 | return str.replace(/\b\w/g, function(l) { 51 | return l.toUpperCase(); 52 | }); 53 | } 54 | 55 | function toTime(milliseconds) { 56 | const seconds = Math.floor(milliseconds / 1000); 57 | const minutes = Math.floor(seconds / 60); 58 | const hours = Math.floor(minutes / 60); 59 | const days = Math.floor(hours / 24); 60 | return `${days} days, ${hours % 24} hours, ${minutes % 60} minutes, ${seconds % 60} seconds`; 61 | } 62 | -------------------------------------------------------------------------------- /plugins/owner-sfp-df.js: -------------------------------------------------------------------------------- 1 | let fs = require('fs') 2 | 3 | let handler = async (m, { text, usedPrefix, command }) => { 4 | if (!text) { 5 | return m.reply(`Nama plugin mana?\n\nContoh: ${usedPrefix + command} menu`) 6 | } 7 | 8 | if (command === 'sfp') { 9 | if (!m.quoted) { 10 | return m.reply(`Reply file dulu yang mau disimpan!`) 11 | } 12 | 13 | if (typeof m.quoted.download !== 'function') { 14 | return m.reply(`Itu bukan file! Reply file/dokumen yang udah diupload ya`) 15 | } 16 | 17 | try { 18 | let filePath = text.trim() 19 | 20 | let media = await m.quoted.download() 21 | if (!media || media.length === 0) { 22 | return m.reply(`File kosong atau ga bisa didownload!`) 23 | } 24 | 25 | let fullPath = `plugins/${filePath}.js` 26 | 27 | if (!fs.existsSync('plugins')) { 28 | fs.mkdirSync('plugins') 29 | } 30 | 31 | fs.writeFileSync(fullPath, media) 32 | 33 | try { 34 | let content = fs.readFileSync(fullPath, 'utf8') 35 | } catch (e) { 36 | // ignore 37 | } 38 | 39 | return m.reply(`Plugin tersimpan!`) 40 | 41 | } catch (error) { 42 | return m.reply(`Gagal simpan plugin!\n\n${error.message}`) 43 | } 44 | 45 | } else if (command === 'dfp' || command === 'df') { 46 | try { 47 | let filePath = `plugins/${text.trim()}.js` 48 | 49 | if (!fs.existsSync(filePath)) { 50 | return m.reply(`Plugin ${text}.js ga ada!`) 51 | } 52 | 53 | fs.unlinkSync(filePath) 54 | return m.reply(`Plugin ${text}.js udah dihapus!`) 55 | 56 | } catch (error) { 57 | return m.reply(`Gagal hapus plugin!\n\n${error.message}`) 58 | } 59 | } 60 | } 61 | 62 | handler.help = ['sfp', 'dfp', 'df'].map(v => v + ' ') 63 | handler.tags = ['owner'] 64 | handler.command = /^(sfp|dfp|df)$/i 65 | handler.rowner = true 66 | 67 | module.exports = handler 68 | -------------------------------------------------------------------------------- /plugins/game-family100.js: -------------------------------------------------------------------------------- 1 | let fs = require('fs') 2 | let fetch = require('node-fetch') 3 | let winScore = 500 4 | let rewardAmount = 100 5 | 6 | async function handler(m) { 7 | conn.family = conn.family ? conn.family : {} 8 | let id = m.chat 9 | if (id in conn.family) { 10 | if (conn.family[id].id !== undefined) return conn.reply(m.chat, 'Masih ada kuis yang belum terjawab di chat ini' + '\nTunggu 3 menit untuk mengakhiri', conn.family[id].msg) 11 | delete conn.family[id] 12 | throw false 13 | } 14 | conn.family[id] = {} 15 | let src = await (await fetch(`https://api.betabotz.eu.org/api/game/family100-2?apikey=${lann}`)).json() 16 | let json = src[Math.floor(Math.random() * src.length)] 17 | 18 | let caption = ` 19 | 20 | ┌─⊷ *SOAL* 21 | ▢ *Soal:* ${json.soal} 22 | ▢ Terdapat *${json.jawaban.length}* jawaban${json.jawaban.find(v => v.includes(' ')) ? ` 23 | ▢ (beberapa jawaban terdapat spasi) 24 | ▢ tunggu 3 menit untuk mengakhiri 25 | ▢ ketik *nyerah* untuk menyelesaikan permainan 26 | └────────────── 27 | `: ''} 28 | 29 | +${rewardAmount} kredit sosial! tiap jawaban benar 30 | `.trim() 31 | conn.family[id] = { 32 | id, 33 | msg: await m.reply(caption), 34 | ...json, 35 | terjawab: Array.from(json.jawaban, () => false), 36 | winScore, 37 | rewardAmount, 38 | timeout: setTimeout(() => { 39 | if (conn.family[id]) { 40 | let allAnswers = conn.family[id].jawaban.map((jawaban, index) => `(${index + 1}) ${jawaban}`).join('\n') 41 | conn.reply(m.chat, `Waktu habis! Game berakhir.\n\nJawaban yang benar:\n${allAnswers}`, conn.family[id].msg) 42 | delete conn.family[id] 43 | } 44 | }, 180000) // 3 minutes 45 | } 46 | } 47 | handler.help = ['family100'] 48 | handler.tags = ['game'] 49 | handler.group = true 50 | handler.command = /^family100$/i 51 | 52 | handler.nyerah = async function (m) { 53 | let id = m.chat 54 | if (id in conn.family) { 55 | conn.reply(m.chat, 'Permainan berakhir karena menyerah.', conn.family[id].msg) 56 | clearTimeout(conn.family[id].timeout) 57 | delete conn.family[id] 58 | } else { 59 | conn.reply(m.chat, 'Tidak ada permainan yang sedang berlangsung.', m) 60 | } 61 | } 62 | 63 | module.exports = handler 64 | 65 | //danaputra_133 -------------------------------------------------------------------------------- /plugins/game-family100_ans.js: -------------------------------------------------------------------------------- 1 | const similarity = require('similarity') 2 | const threshold = 0.72 // semakin tinggi nilai, semakin mirip 3 | module.exports = { 4 | async before(m) { 5 | this.game = this.game ? this.game : {} 6 | let id = 'family100_' + m.chat 7 | if (!(id in this.game)) return !0 8 | let room = this.game[id] 9 | let text = m.text.toLowerCase().replace(/[^\w\s\-]+/, '') 10 | if (!room) return !0 11 | 12 | if (text === 'nyerah') { 13 | let allAnswers = room.jawaban.map((jawaban, index) => `(${index + 1}) ${jawaban}`).join('\n') 14 | this.reply(m.chat, `Permainan berakhir karena menyerah.\n\nJawaban yang benar:\n${allAnswers}`, room.msg) 15 | clearTimeout(room.timeout) 16 | delete this.game[id] 17 | return !0 18 | } 19 | 20 | let index = room.jawaban.indexOf(text) 21 | if (index < 0) { 22 | if (Math.max(...room.jawaban.filter((_, index) => !room.terjawab[index]).map(jawaban => similarity(jawaban, text))) >= threshold) m.reply('Dikit lagi!') 23 | return !0 24 | } 25 | if (room.terjawab[index]) return !0 26 | let users = global.db.data.users[m.sender] 27 | room.terjawab[index] = m.sender 28 | users.money += room.rewardAmount 29 | 30 | let isWin = room.terjawab.length === room.terjawab.filter(v => v).length 31 | let caption = ` 32 | *Soal:* ${room.soal} 33 | 34 | Terdapat *${room.jawaban.length}* jawaban${room.jawaban.find(v => v.includes(' ')) ? ` 35 | (beberapa jawaban terdapat spasi) 36 | `: ''} 37 | ${isWin ? `*SEMUA JAWABAN TERJAWAB*\nSelamat, Anda telah menjawab semua jawaban dengan benar!` : ''} 38 | ${Array.from(room.jawaban, (jawaban, index) => { 39 | return room.terjawab[index] ? `(${index + 1}) ${jawaban} ${room.terjawab[index] ? '@' + room.terjawab[index].split('@')[0] : ''}`.trim() : false 40 | }).filter(v => v).join('\n')} 41 | 42 | +${room.rewardAmount} Money tiap jawaban benar 43 | `.trim() 44 | m.reply(caption, null, { 45 | contextInfo: { 46 | mentionedJid: this.parseMention(caption) 47 | } 48 | }).then(msg => { 49 | return this.game[id].msg = msg 50 | }).catch(_ => _) 51 | if (isWin) { 52 | clearTimeout(room.timeout) 53 | delete this.game[id] 54 | } 55 | return !0 56 | } 57 | } -------------------------------------------------------------------------------- /plugins/stalker-twstalk.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch'); 2 | 3 | function escapeMarkdown(text) { 4 | if (typeof text !== 'string') return text; 5 | return text.replace(/([_*[\]()~`>#+=|{}.!-])/g, '\\$1'); 6 | } 7 | 8 | let handler = async (m, { text, usedPrefix, command, conn }) => { 9 | if (!text) return m.reply(`Contoh:\n${usedPrefix + command} prabowo`.replace(/[\\_*[\]()~`>#+\-=|{}.!]/g, '\\$&')) 10 | 11 | try { 12 | let x = await fetch(`https://api.betabotz.eu.org/api/stalk/twitter?username=${text}&apikey=${lann}`); 13 | let stalkx = await x.json(); 14 | 15 | if (stalkx.status) { 16 | let { 17 | profileImage, 18 | id, 19 | bio, 20 | username, 21 | fullName, 22 | follower, 23 | following, 24 | totalPosts, 25 | favoritCount, 26 | location, 27 | createdAt 28 | } = stalkx.result; 29 | 30 | let captw = `*乂 X S T A L K E R*\n\n`; 31 | captw += `╭─❒ *User Info*\n`; 32 | captw += `│◦ *Username* : ${escapeMarkdown(username)}\n`; 33 | captw += `│◦ *Full Name* : ${escapeMarkdown(fullName)}\n`; 34 | captw += `│◦ *ID* : ${escapeMarkdown(id)}\n`; 35 | captw += `│◦ *Bio* : ${escapeMarkdown(bio)}\n`; 36 | captw += `│◦ *Location* : ${escapeMarkdown(location)}\n`; 37 | captw += `│◦ *Created At* : ${createdAt.toLocaleString()}\n`; 38 | captw += `╰──────\n\n`; 39 | captw += `╭─❒ *Statistics*\n`; 40 | captw += `│◦ *Followers* : ${follower.toLocaleString()}\n`; 41 | captw += `│◦ *Following* : ${following.toLocaleString()}\n`; 42 | captw += `│◦ *Total Posts* : ${totalPosts.toLocaleString()}\n`; 43 | captw += `│◦ *Favorit Count* : ${favoritCount.toLocaleString()}\n`; 44 | captw += `╰──────\n\n`; 45 | captw += `🔗 Profile: https://x.com/${username}`; 46 | 47 | await conn.sendMessage( 48 | m.chat, 49 | { 50 | image: { url: profileImage }, 51 | caption: captw, 52 | }, 53 | { quoted: { message_id: m.id } } 54 | ) 55 | 56 | } else { 57 | throw 'Gagal menemukan username atau sistem sedang bermasalah'; 58 | } 59 | } catch (e) { 60 | console.error(e); 61 | m.reply('Gagal menemukan username atau sistem sedang bermasalah'); 62 | } 63 | }; 64 | 65 | handler.help = ['twitterstalk ']; 66 | handler.tags = ['stalk']; 67 | handler.command = /^(twitterstalk|twstalk|xstalk)$/i; 68 | handler.limit = true; 69 | 70 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/owner-sf.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | 4 | let handler = async (m, { text, usedPrefix, command, conn }) => { 5 | if (!text) { 6 | return m.reply(`❌ Nama file tidak ditemukan!\n\n📝 Penggunaan:\n${usedPrefix + command} \n\n📋 Contoh:\n${usedPrefix + command} plugins/menu.js\n\n💡 Reply file/dokumen yang ingin disimpan!`) 7 | } 8 | 9 | if (!m.quoted) { 10 | return m.reply(`❌ Reply file atau dokumen yang ingin disimpan!\n\n📎 Format yang didukung:\n• .js, .json, .txt`) 11 | } 12 | 13 | if (typeof m.quoted.download !== 'function') { 14 | return m.reply(`❌ Pesan yang direply tidak mengandung file!\n\n💡 Tips:\n• Reply file/dokumen yang sudah diupload\n• Pastikan file memiliki ekstensi (.js, .txt, .json)\n• Jangan reply pesan teks biasa`) 15 | } 16 | 17 | try { 18 | let filePath = text.trim() 19 | 20 | if (path.isAbsolute(filePath)) { 21 | return m.reply(`✅ Contoh yang benar:\n• plugins/menu.js`) 22 | } 23 | 24 | let media = await m.quoted.download() 25 | if (!media || media.length === 0) { 26 | return m.reply(`❌ File kosong atau gagal didownload!`) 27 | } 28 | let dir = path.dirname(filePath) 29 | if (dir !== '.' && !fs.existsSync(dir)) { 30 | fs.mkdirSync(dir, { recursive: true }) 31 | } 32 | fs.writeFileSync(filePath, media) 33 | 34 | let fileStats = fs.statSync(filePath) 35 | let fileSize = fileStats.size 36 | 37 | let extension = path.extname(filePath) || '' 38 | 39 | const textExtensions = ['.js', '.json', '.txt'] 40 | 41 | if (textExtensions.includes(extension.toLowerCase())) { 42 | try { 43 | let content = fs.readFileSync(filePath, 'utf8') 44 | } catch (e) { 45 | console.log('Could not read file as text:', e.message) 46 | } 47 | } 48 | 49 | const successMessage = `✅ File berhasil disimpan!` 50 | 51 | return m.reply(successMessage) 52 | 53 | } catch (error) { 54 | console.error('Error saving file:', error) 55 | m.reply(`❌ Gagal menyimpan file!\n\nError: ${error.message}`) 56 | } 57 | } 58 | 59 | handler.help = ['sf', 'savefile'].map(v => v + ' ') 60 | handler.tags = ['owner'] 61 | handler.command = /^(sf|savefile)$/i 62 | handler.owner = true 63 | 64 | module.exports = handler 65 | -------------------------------------------------------------------------------- /lib/uploadFile.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch'); 2 | const axios = require('axios') 3 | const FormData = require('form-data'); 4 | const { fromBuffer } = require('file-type'); 5 | 6 | /** 7 | * Upload file to https://pomf.lain.la 8 | * @returns {string|null|(string|null)[]} 9 | */ 10 | 11 | const pomf = async (buffer) => { 12 | const { ext, mime } = (await fromBuffer(buffer)) || {}; 13 | const form = new FormData(); 14 | form.append("files[]", buffer, { filename: `tmp.${ext}`, contentType: mime }); 15 | try { 16 | const { data } = await axios.post("https://pomf.lain.la/upload.php", form, { 17 | headers: form.getHeaders(), 18 | }); 19 | console.log(data); 20 | return data.files[0].url 21 | } catch (error) { 22 | throw error; 23 | } 24 | }; 25 | 26 | /** 27 | * Upload epheremal file to file.io 28 | * `Expired in 1 day` 29 | * `100MB Max Filesize` 30 | * @param {Buffer} buffer File Buffer 31 | */ 32 | const fileIO = async (buffer) => { 33 | const { ext } = await fromBuffer(buffer) || {}; 34 | const form = new FormData(); 35 | form.append('file', buffer, `tmp.${ext}`); 36 | const res = await fetch('https://file.io/?expires=1d', { // 1 Day Expiry Date 37 | method: 'POST', 38 | body: form 39 | }); 40 | const json = await res.json(); 41 | if (!json.success) throw json; 42 | return json.link; 43 | }; 44 | 45 | /** 46 | * Upload image to api.betabotz.eu.org 47 | * Supported mimetype: 48 | `` 49 | * - `image/jpeg` 50 | * - `image/png` 51 | * - `image/webp` 52 | * - `video/mp4` 53 | * - `video/avi` 54 | * - `video/mkv` 55 | * - `audio/mpeg` 56 | * - `audio/wav` 57 | * - `audio/ogg` 58 | * @param {Buffer} buffer 59 | *@param {apikey} register on api.betabotz.eu.org 60 | *@param lann replace it with your apikey 61 | */ 62 | const api = async (buffer) => { 63 | const { ext, mime } = (await fromBuffer(buffer)) || {}; 64 | const form = new FormData(); 65 | form.append("file", buffer, { filename: `tmp.${ext}`, contentType: mime }); 66 | form.append("apikey", lann); 67 | try { 68 | const { data } = await axios.post("https://api.betabotz.eu.org/api/tools/upload", form, { 69 | headers: form.getHeaders(), 70 | }); 71 | console.log(data); 72 | return data.result; 73 | } catch (error) { 74 | throw error; 75 | } 76 | } 77 | 78 | module.exports = async function (inp) { 79 | let err = false; 80 | for (const upload of [api, pomf, fileIO]) { 81 | try { 82 | return await upload(inp); 83 | } catch (e) { 84 | err = e; 85 | } 86 | } 87 | if (err) throw err; 88 | }; -------------------------------------------------------------------------------- /plugins/openai-ai.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `*Example:* ${usedPrefix + command} hai`; 5 | conn.beta = conn.beta ? conn.beta : {}; 6 | if (!conn.beta[m.sender]) { 7 | conn.beta[m.sender] = { 8 | pesan: [] 9 | }; 10 | conn.beta[m.sender].timeout = setTimeout(() => { 11 | delete conn.beta[m.sender]; 12 | }, 300000); 13 | 14 | m.reply(`Halo \`${m.name}\`👋, Saya siap membantu anda!`); 15 | } else { 16 | clearTimeout(conn.beta[m.sender].timeout); 17 | conn.beta[m.sender].timeout = setTimeout(() => { 18 | delete conn.beta[m.sender]; 19 | }, 300000); 20 | } 21 | 22 | let name = conn.getName(m.sender); 23 | const previousMessages = conn.beta[m.sender].pesan; 24 | 25 | /** - Ubah prompt ini sesuaikan dengan keinginan mu 26 | - Usahakan berikan logic yang masuk akal dan mudah di pahami! 27 | **/ 28 | const messages = [ 29 | { role: "system", content: "Kamu adalah BetaBotz Ai Sebuah Ai Yang diciptakan oleh Lann,bantu setiap orang dengan ramah:),berikan emoticon di setiap jawaban" }, 30 | { role: "assistant", content: `Kamu adalah BetaBotz Ai,ai bot yang diciptakan oleh Lann untuk membantu semua permintaan dari user,jawab setiap pertanyaan dengan ramah dan sertai emoticon` }, 31 | ...previousMessages.map((msg, i) => ({ role: i % 2 === 0 ? 'user' : 'assistant', content: msg })), 32 | { role: "user", content: text } 33 | ]; 34 | try { 35 | const aiBeta = async function(message) { 36 | return new Promise(async (resolve, reject) => { 37 | try { 38 | const params = { 39 | message: message, 40 | apikey: lann 41 | }; 42 | const { data } = await axios.post('https://api.betabotz.eu.org/api/search/openai-custom', params); 43 | resolve(data); 44 | } catch (error) { 45 | reject(error); 46 | } 47 | }); 48 | }; 49 | 50 | let res = await aiBeta(messages); 51 | if (res && res.result) { 52 | await m.reply(res.result); 53 | conn.beta[m.sender].pesan = messages.map(msg => msg.content); 54 | } else { 55 | throw "Kesalahan dalam mengambil data"; 56 | } 57 | } catch (e) { 58 | throw eror 59 | } 60 | }; 61 | 62 | handler.command = handler.help = ['ai','openai','chatgpt']; 63 | handler.tags = ['tools']; 64 | handler.premium = false 65 | module.exports = handler; -------------------------------------------------------------------------------- /lib/tictactoe.js: -------------------------------------------------------------------------------- 1 | class TicTacToe { 2 | constructor(playerX = 'x', playerO = 'o') { 3 | this.playerX = playerX 4 | this.playerO = playerO 5 | this._currentTurn = false 6 | this._x = 0 7 | this._o = 0 8 | this.turns = 0 9 | } 10 | 11 | get board() { 12 | return this._x | this._o 13 | } 14 | 15 | get currentTurn() { 16 | return this._currentTurn ? this.playerO : this.playerX 17 | } 18 | 19 | get enemyTurn() { 20 | return this._currentTurn ? this.playerX : this.playerO 21 | } 22 | 23 | static check(state) { 24 | for (let combo of [7, 56, 73, 84, 146, 273, 292, 448]) 25 | if ((state & combo) === combo) 26 | return !0 27 | return !1 28 | } 29 | 30 | /** 31 | * ```js 32 | * TicTacToe.toBinary(1, 2) // 0b010000000 33 | * ``` 34 | */ 35 | static toBinary(x = 0, y = 0) { 36 | if (x < 0 || x > 2 || y < 0 || y > 2) throw new Error('invalid position') 37 | return 1 << x + (3 * y) 38 | } 39 | 40 | /** 41 | * @param player `0` is `X`, `1` is `O` 42 | * 43 | * - `-3` `Game Ended` 44 | * - `-2` `Invalid` 45 | * - `-1` `Invalid Position` 46 | * - ` 0` `Position Occupied` 47 | * - ` 1` `Sucess` 48 | * @returns {-3|-2|-1|0|1} 49 | */ 50 | turn(player = 0, x = 0, y) { 51 | if (this.board === 511) return -3 52 | let pos = 0 53 | if (y == null) { 54 | if (x < 0 || x > 8) return -1 55 | pos = 1 << x 56 | } else { 57 | if (x < 0 || x > 2 || y < 0 || y > 2) return -1 58 | pos = TicTacToe.toBinary(x, y) 59 | } 60 | if (this._currentTurn ^ player) return -2 61 | if (this.board & pos) return 0 62 | this[this._currentTurn ? '_o' : '_x'] |= pos 63 | this._currentTurn = !this._currentTurn 64 | this.turns++ 65 | return 1 66 | } 67 | 68 | /** 69 | * @returns {('X'|'O'|1|2|3|4|5|6|7|8|9)[]} 70 | */ 71 | static render(boardX = 0, boardO = 0) { 72 | let x = parseInt(boardX.toString(2), 4) 73 | let y = parseInt(boardO.toString(2), 4) * 2 74 | return [...(x + y).toString(4).padStart(9, '0')].reverse().map((value, index) => value == 1 ? 'X' : value == 2 ? 'O' : ++index) 75 | } 76 | 77 | /** 78 | * @returns {('X'|'O'|1|2|3|4|5|6|7|8|9)[]} 79 | */ 80 | render() { 81 | return TicTacToe.render(this._x, this._o) 82 | } 83 | 84 | get winner() { 85 | let x = TicTacToe.check(this._x) 86 | let o = TicTacToe.check(this._o) 87 | return x ? this.playerX : o ? this.playerO : false 88 | } 89 | } 90 | 91 | new TicTacToe().turn 92 | 93 | module.exports = TicTacToe -------------------------------------------------------------------------------- /plugins/stalker-ghstalk.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch') 2 | 3 | let handler = async (m, { text, usedPrefix, command, conn }) => { 4 | if (!text) return m.reply(`Contoh:\n${usedPrefix + command} ERLANRAHMAT`.replace(/[\\_*[\]()~`>#+\-=|{}.!]/g, '\\$&')) 5 | 6 | try { 7 | let res = await fetch(`https://api.betabotz.eu.org/api/stalk/github?username=${text}&apikey=${lann}`) 8 | let json = await res.json() 9 | let user = json.result.user 10 | let ava = user.avatarUrl 11 | 12 | const cleanText = (str) => { 13 | if (!str) return "-" 14 | return str.toString() 15 | .replace(/[_*`[\]]/g, '') // Hapus karakter Markdown yang bermasalah 16 | .replace(/\n/g, ' ') // Ganti newline dengan spasi 17 | .trim() 18 | } 19 | 20 | // Fungsi untuk format angka dengan fallback 21 | const formatNumber = (num) => { 22 | if (num === null || num === undefined) return "-" 23 | return num.toString() 24 | } 25 | 26 | // Fungsi untuk format tanggal yang lebih readable 27 | const formatDate = (dateString) => { 28 | if (!dateString) return "-" 29 | try { 30 | const date = new Date(dateString) 31 | const options = { 32 | year: 'numeric', 33 | month: 'long', 34 | day: 'numeric' 35 | } 36 | return date.toLocaleDateString('id-ID', options) 37 | } catch (error) { 38 | return dateString.split("T")[0] 39 | } 40 | } 41 | 42 | // Format teks yang bersih 43 | let capgh = 44 | `GitHub Stalker 45 | ───────────────────────────── 46 | 👤 Name : ${cleanText(user.name) || cleanText(user.username)} 47 | 🆔 ID : ${formatNumber(user.idUser)} 48 | 🆔 NodeId : ${cleanText(user.nodeId)} 49 | 👥 Followers : ${formatNumber(user.followers)} 50 | 👣 Following : ${formatNumber(user.following)} 51 | 📝 Bio : ${cleanText(user.bio)} 52 | 📌 Type : ${cleanText(user.type)} 53 | 🏢 Company : ${cleanText(user.company)} 54 | 🌐 Blog : ${user.blog || "-"} 55 | 📂 Repo : ${formatNumber(user.publicRepos)} 56 | 📊 Gists : ${formatNumber(user.publicGists)} 57 | 📅 Created : ${formatDate(user.createdAt)} 58 | ♻️ Updated : ${formatDate(user.updatedAt)} 59 | ───────────────────────────── 60 | 61 | 🔗 Profile: https://github.com/${user.username}` 62 | 63 | await conn.sendMessage( 64 | m.chat, 65 | { 66 | image: { url: ava }, 67 | caption: capgh, 68 | }, 69 | { quoted: { message_id: m.id } } 70 | ) 71 | 72 | } catch (e) { 73 | console.log(e) 74 | m.reply('Sistem Sedang Bermasalah!') 75 | } 76 | } 77 | 78 | handler.help = ['ghstalk '] 79 | handler.tags = ['stalk'] 80 | handler.command = /^(ghstalk)$/i 81 | handler.limit = true 82 | handler.group = false 83 | 84 | module.exports = handler -------------------------------------------------------------------------------- /plugins/maker-aiMusic.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | 3 | let handler = async (m, { conn, text, args, usedPrefix, command }) => { 4 | let [title, style, ...lyricsArr] = text.split('|').map(s => s.trim()); 5 | let lyrics = lyricsArr.join('|'); 6 | 7 | if (!title || !style || !lyrics) 8 | return m.reply(`Contoh penggunaan:\n${usedPrefix + command} Judul Lagu | Style Musik | Lirik\n\nContoh:\n${usedPrefix + command} Sahabat | Chinese song, donghua sound, female singing | kembalilah untuk bersama...`); 9 | 10 | await m.reply('⏳ Membuat lagu, mohon tunggu...\n*Pembuatan lagu bisa lebih dari 2-5 menit*'); 11 | 12 | try { 13 | const result = await generateMusic( 14 | title, 15 | style, 16 | lyrics, 17 | ); 18 | 19 | if (!result?.data || !result.data.length) { 20 | throw '❌ Gagal mendapatkan audio.'; 21 | } 22 | 23 | let listInfo = result.data.map((item, i) => { 24 | return `🎵 *Audio ${i + 1}*\n*Judul:* ${item.title}\n*Style:* ${item.tags}\n*Audio URL:* ${item.audio_url}`; 25 | }).join('\n\n'); 26 | 27 | await m.reply(`✅ Berikut semua hasil yang tersedia:\n\n${listInfo}`); 28 | 29 | for (let i = 0; i < result.data.length; i++) { 30 | const audioItem = result.data[i]; 31 | const audioBuffer = await axios.get(audioItem.audio_url, { 32 | responseType: 'arraybuffer' 33 | }).then(res => res.data); 34 | 35 | await conn.sendMessage(m.chat, { 36 | audio: audioBuffer, 37 | mimetype: 'audio/mpeg', 38 | fileName: `${audioItem.title}_${i + 1}.mp3`, 39 | ptt: false 40 | }, { quoted: m }); 41 | } 42 | 43 | } catch (e) { 44 | console.error(e); 45 | m.reply('❌ Gagal membuat lagu'); 46 | } 47 | }; 48 | 49 | handler.command = handler.help = ['aimusic', 'musicgen', 'sunoai']; 50 | handler.tags = ['ai']; 51 | handler.limit = true; 52 | 53 | module.exports = handler; 54 | 55 | async function generateMusic(title, style, lyrics) { 56 | const payload = { 57 | title, 58 | style, 59 | lyrics, 60 | aksesKey: aksesKey 61 | }; 62 | 63 | const { data } = await axios.post('https://api.betabotz.eu.org/api/maker/aimusic', payload); 64 | 65 | let status = 'pending'; 66 | let result = null; 67 | while (status === 'pending') { 68 | await new Promise(r => setTimeout(r, 10000)); 69 | const { data: statusData } = await axios.get('https://api.betabotz.eu.org/api/maker/aimusic/status', { 70 | params: { jobId: data.jobId } 71 | }); 72 | status = statusData.status; 73 | result = statusData.result; 74 | if (status === 'error') { 75 | return { error: statusData.error }; 76 | } 77 | if (status === 'done') { 78 | return result; 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /plugins/game-math.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch'); 2 | 3 | const modes = { 4 | noob: { bonus: 10, time: 20000, money: 500 }, 5 | easy: { bonus: 20, time: 30000, money: 1000 }, 6 | medium: { bonus: 40, time: 40000, money: 2500 }, 7 | hard: { bonus: 100, time: 60000, money: 5000 }, 8 | master: { bonus: 250, time: 70000, money: 10000 }, 9 | grandmaster: { bonus: 500, time: 90000, money: 25000 }, 10 | legendary: { bonus: 1000, time: 120000, money: 50000 }, 11 | mythic: { bonus: 3000, time: 150000, money: 75000 }, 12 | god: { bonus: 5000, time: 200000, money: 100000 }, 13 | }; 14 | 15 | let handler = async (m, { conn, args, usedPrefix }) => { 16 | 17 | conn.math = conn.math ? conn.math : {}; 18 | 19 | const modeList = Object.keys(modes); 20 | if (args.length < 1) { 21 | throw ` 22 | Silakan pilih tingkat kesulitan. 23 | Mode yang tersedia: ${modeList.join(' | ')} 24 | 25 | Contoh penggunaan: ${usedPrefix}math medium 26 | `.trim(); 27 | } 28 | 29 | let mode = args[0].toLowerCase(); 30 | if (!(mode in modes)) { 31 | throw ` 32 | Mode "${mode}" tidak ditemukan. 33 | Mode yang tersedia: ${modeList.join(' | ')} 34 | 35 | Contoh penggunaan: ${usedPrefix}math medium 36 | `.trim(); 37 | } 38 | 39 | let id = m.chat; 40 | if (id in conn.math) { 41 | return conn.reply(m.chat, 'Masih ada soal yang belum terjawab di chat ini.', conn.math[id][0]); 42 | } 43 | 44 | try { 45 | const url = `https://api.betabotz.eu.org/api/game/math?apikey=${lann}`; 46 | const res = await fetch(url); 47 | const json = await res.json(); 48 | const soalDitemukan = json.filter(q => q.level && q.level.toLowerCase() === mode); 49 | 50 | if (soalDitemukan.length < 1) { 51 | throw new Error(`Maaf, soal untuk level "${mode}" tidak tersedia di API.`); 52 | } 53 | const data = soalDitemukan[Math.floor(Math.random() * soalDitemukan.length)]; 54 | 55 | 56 | 57 | if (!data || !data.soal || !data.jawaban) { 58 | throw new Error('Format API tidak sesuai atau soal tidak ditemukan.'); 59 | } 60 | 61 | const { bonus, time, money } = modes[mode]; 62 | 63 | let math = { 64 | soal: data.soal, 65 | jawaban: data.jawaban, 66 | mode: mode, 67 | bonus: bonus, 68 | money: money, 69 | time: time, 70 | }; 71 | 72 | conn.math[id] = [ 73 | await conn.reply(m.chat, `Berapa jawaban dari *${math.soal}*?\n\nTimeout: ${(math.time / 1000).toFixed(2)} detik\nBonus: +${math.bonus} XP & +${math.money} Money`, m), 74 | math, 75 | 4, 76 | setTimeout(() => { 77 | if (conn.math[id]) { 78 | conn.reply(m.chat, `Waktu habis!\nJawabannya adalah *${math.jawaban}*`, conn.math[id][0]); 79 | delete conn.math[id]; 80 | } 81 | }, math.time) 82 | ]; 83 | } catch (e) { 84 | console.error(e); 85 | m.reply(e.message || 'Maaf, terjadi kesalahan saat mengambil soal dari API. Coba lagi nanti.'); 86 | } 87 | }; 88 | 89 | handler.help = ['math ']; 90 | handler.tags = ['game']; 91 | handler.command = /^math/i; 92 | 93 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/tools-tmpmail.js: -------------------------------------------------------------------------------- 1 | let axios = require('axios'); 2 | let cheerio = require('cheerio'); 3 | 4 | let handler = async (m, { conn, command, usedPrefix }) => { 5 | conn.sessionsMail = conn.sessionsMail || {}; 6 | 7 | for (let user in conn.sessionsMail) { 8 | let { lastCheckedAt } = conn.sessionsMail[user]; 9 | if (Date.now() - lastCheckedAt > 30 * 60 * 1000) { 10 | delete conn.sessionsMail[user]; 11 | } 12 | } 13 | 14 | if (command === "tempmail") { 15 | if (conn.sessionsMail[m.sender]) { 16 | return m.reply(`🚀 Anda sudah memiliki Temp Mail!\n📩 *Email:* ${conn.sessionsMail[m.sender].email}\n⏳ *Tunggu sekitar 5-10 menit sebelum cek.*`); 17 | } 18 | 19 | try { 20 | let res = await axios.get(`https://api.betabotz.eu.org/api/tools/create-temp-mail?apikey=${lann}`); 21 | if (!res.data.status) throw "❌ Gagal membuat email sementara!"; 22 | 23 | let email = res.data.result; 24 | conn.sessionsMail[m.sender] = { 25 | email, 26 | createdAt: Date.now(), 27 | lastCheckedAt: Date.now() 28 | }; 29 | 30 | m.reply(`✅ *Temp Mail Anda:*\n📩 *Email:* ${email}\n⏳ *Tunggu sekitar 5-10 menit sebelum cek.*`); 31 | } catch (e) { 32 | console.error(e); 33 | m.reply("❌ Terjadi kesalahan saat membuat email sementara!"); 34 | } 35 | } else if (command === "cekmail" || command === "checkmail") { 36 | if (!conn.sessionsMail[m.sender]) { 37 | return m.reply("⚠️ Anda belum memiliki Temp Mail!\nGunakan `${usedPrefix + command}` untuk membuatnya."); 38 | } 39 | 40 | let { email } = conn.sessionsMail[m.sender]; 41 | 42 | conn.sessionsMail[m.sender].lastCheckedAt = Date.now(); 43 | 44 | try { 45 | let res = await axios.get(`https://api.betabotz.eu.org/api/tools/cek-msg-tmp-mail?email=${email}&apikey=${lann}`); 46 | if (!res.data.status) throw "❌ Gagal mengambil pesan email!"; 47 | 48 | let messages = res.data.result; 49 | if (messages.length === 0) { 50 | return m.reply(`📭 *Belum ada pesan masuk di ${email}.*\n⏳ *Coba cek lagi nanti.*`); 51 | } 52 | 53 | let pesan = messages.map((msg) => { 54 | let cleanText = extractText(msg.html || msg.text); 55 | return `📬 *Pesan Baru!*\n💌 *Dari:* ${msg.sf}\n📢 *Subjek:* ${msg.s}\n🕒 *Waktu:* ${msg.rr}\n\n📝 *Isi Pesan:*\n${cleanText}`; 56 | }).join("\n\n"); 57 | 58 | m.reply(pesan); 59 | } catch (e) { 60 | console.error(e); 61 | m.reply("❌ Terjadi kesalahan saat mengecek email!"); 62 | } 63 | } 64 | }; 65 | 66 | handler.command = ['tempmail', 'cekmail', 'checkmail']; 67 | handler.tags = ['tools']; 68 | handler.help = ['tempmail', 'cekmail', 'checkmail']; 69 | handler.limit = true; 70 | 71 | module.exports = handler; 72 | 73 | function extractText(html) { 74 | let $ = cheerio.load(html); 75 | return $.text().trim(); 76 | } -------------------------------------------------------------------------------- /plugins/owner-exec.js: -------------------------------------------------------------------------------- 1 | let syntaxerror = require('syntax-error') 2 | let util = require('util') 3 | 4 | function escapeMarkdown(text) { 5 | return text.toString() 6 | .replace(/[_*[\]()~`>#+=|{}.!-]/g, '\\$&') 7 | } 8 | 9 | function safeCodeBlock(content) { 10 | if (!content) return '' 11 | const escaped = content.toString().replace(/```/g, '`‌`‌`') 12 | return '```\n' + escaped + '\n```' 13 | } 14 | 15 | const handler = async (m, extra) => { 16 | const { conn, usedPrefix, noPrefix, args, groupMetadata } = extra 17 | let _return 18 | let _syntax = '' 19 | let _text = (/^=/.test(usedPrefix) ? 'return ' : '') + noPrefix 20 | const old = m.exp * 1 21 | 22 | try { 23 | let i = 15 24 | const f = { 25 | exports: {} 26 | } 27 | 28 | const print = (...args) => { 29 | if (--i < 1) return 30 | console.log(...args) 31 | const formattedOutput = util.format(...args) 32 | return conn.reply(m.chat, escapeMarkdown(formattedOutput), m) 33 | } 34 | 35 | const context = { 36 | print, 37 | m, 38 | handler, 39 | require, 40 | conn, 41 | Array: CustomArray, 42 | process, 43 | args, 44 | groupMetadata, 45 | module: f, 46 | exports: f.exports, 47 | argument: [conn, extra], 48 | console, 49 | Buffer, 50 | JSON, 51 | Math, 52 | Date, 53 | RegExp, 54 | String, 55 | Number, 56 | Boolean, 57 | Object, 58 | Array: Array, 59 | Error, 60 | Promise, 61 | setTimeout, 62 | setInterval, 63 | clearTimeout, 64 | clearInterval 65 | } 66 | 67 | const contextKeys = Object.keys(context) 68 | const contextValues = Object.values(context) 69 | 70 | const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor 71 | const exec = new AsyncFunction(...contextKeys, _text) 72 | 73 | _return = await exec.apply(conn, contextValues) 74 | 75 | } catch (e) { 76 | const err = syntaxerror(_text, 'Execution Function', { 77 | allowReturnOutsideFunction: true, 78 | allowAwaitOutsideFunction: true 79 | }) 80 | if (err) _syntax = safeCodeBlock(err) + '\n\n' 81 | _return = e 82 | } finally { 83 | const finalOutput = _syntax + escapeMarkdown(util.format(_return)) 84 | if (finalOutput.length > 4096) { 85 | await m.reply( 'Output terlalu panjang, dipotong...', m) 86 | await m.reply( finalOutput.substring(0, 4000) + '...', m) 87 | } else { 88 | await m.reply( finalOutput, m) 89 | } 90 | m.exp = old 91 | } 92 | } 93 | 94 | handler.help = ['> ', '=> '] 95 | handler.tags = ['advanced'] 96 | handler.customPrefix = /^=?> / 97 | handler.command = /(?:)/i 98 | handler.owner = true 99 | 100 | module.exports = handler 101 | 102 | class CustomArray extends Array { 103 | constructor(...args) { 104 | if (typeof args[0] == 'number') return super(Math.min(args[0], 10000)) 105 | else return super(...args) 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /plugins/game-tictactoe.js: -------------------------------------------------------------------------------- 1 | const TicTacToe = require("../lib/tictactoe") 2 | 3 | function getCurrentPlayerId(game) { 4 | // 1) Kalau ada method currentTurn(): 'x' atau 'o' 5 | if (typeof game.currentTurn === 'function') { 6 | const t = String(game.currentTurn()).toLowerCase() 7 | return t === 'o' ? game.playerO : game.playerX 8 | } 9 | // 2) Kalau ada property currentTurn: 'x' / 'o' 10 | if (typeof game.currentTurn === 'string') { 11 | const t = game.currentTurn.toLowerCase() 12 | return t === 'o' ? game.playerO : game.playerX 13 | } 14 | // 3) Fallback boolean _currentTurn (berdasarkan dump kamu: false di awal) 15 | if (typeof game._currentTurn === 'boolean') { 16 | // asumsi: false = X jalan, true = O jalan 17 | return game._currentTurn ? game.playerO : game.playerX 18 | } 19 | // 4) Paritas turn 20 | if (typeof game.turns === 'number') { 21 | return game.turns % 2 === 0 ? game.playerX : game.playerO 22 | } 23 | // default 24 | return game.playerX 25 | } 26 | 27 | const cellEmoji = v => ({ 28 | X: '❌', O: '⭕', 29 | 1: '1️⃣', 2: '2️⃣', 3: '3️⃣', 30 | 4: '4️⃣', 5: '5️⃣', 6: '6️⃣', 31 | 7: '7️⃣', 8: '8️⃣', 9: '9️⃣', 32 | }[v] || v) 33 | 34 | let handler = async (m, { conn, usedPrefix, command, text }) => { 35 | conn.game = conn.game || {} 36 | 37 | // larang user join lebih dari 1 game 38 | if (Object.values(conn.game).find(room => room.id.startsWith('tictactoe') && [room.game.playerX, room.game.playerO].includes(m.sender))) { 39 | throw 'Kamu masih didalam game' 40 | } 41 | 42 | // cari room menunggu (opsional by name) 43 | let room = Object.values(conn.game).find(room => room.state === 'WAITING' && (text ? room.name === text : true)) 44 | 45 | if (room) { 46 | // join sebagai O 47 | await m.reply('Partner ditemukan!') 48 | room.o = m.chat 49 | room.game.playerO = m.sender 50 | room.state = 'PLAYING' 51 | 52 | const arr = room.game.render().map(cellEmoji) 53 | const turnId = getCurrentPlayerId(room.game) 54 | 55 | const str = [ 56 | `Room ID: ${room.id}`, 57 | `${arr.slice(0,3).join('')}`, 58 | `${arr.slice(3,6).join('')}`, 59 | `${arr.slice(6).join('')}`, 60 | ``, 61 | `Menunggu: giliran`, 62 | `Ketik "nyerah" untuk menyerah`, 63 | ].join('\n') 64 | 65 | // NOTE: urutan argumen reply(conn.reply) di projekmu biasanya (chatId, text, quoted?, options?) 66 | if (room.x !== room.o) await conn.sendMessage(room.x, { text: str }, { quoted: m, parse_mode: 'HTML' }) 67 | await conn.sendMessage(room.o, { text: str }, { quoted: m, parse_mode: 'HTML' }) 68 | 69 | } else { 70 | // buat room baru: X = pembuat 71 | room = { 72 | id: 'tictactoe-' + (+new Date()), 73 | x: m.chat, 74 | o: '', 75 | game: new TicTacToe(m.sender, 'o'), // lib kamu tampaknya menerima (playerX, 'o') dsb. 76 | state: 'WAITING', 77 | } 78 | if (text) room.name = text 79 | 80 | await m.reply('Menunggu partner' + (text ? `\nKetik:\n${usedPrefix}${command} ${text}` : '')) 81 | conn.game[room.id] = room 82 | } 83 | } 84 | 85 | handler.help = ['tictactoe', 'ttt'].map(v => v + ' [custom room name]') 86 | handler.tags = ['game'] 87 | handler.command = /^(tictactoe|t{3})$/ 88 | 89 | module.exports = handler 90 | -------------------------------------------------------------------------------- /plugins/game-bomb_ans.js: -------------------------------------------------------------------------------- 1 | // Thanks To Kasan 2 | 3 | const util = require('util'); 4 | 5 | let handler = m => m 6 | handler.before = async function (m) { 7 | try { 8 | let id = m.sender; 9 | let timeout = 180000; 10 | let reward = randomInt(100, 800); 11 | let users = global.db.data.users[m.sender]; 12 | let body = (typeof m.text == 'string' ? m.text : ''); 13 | conn.bomb = conn.bomb ? conn.bomb : {}; 14 | 15 | let isSurrender = /^(suren)$/i.test(body); 16 | if (isSurrender) { 17 | await conn.reply(m.chat, `🚩 Menyerah`, m); 18 | clearTimeout(conn.bomb[id][2]); 19 | delete conn.bomb[id]; 20 | } 21 | 22 | if ((id in conn.bomb) && !isNaN(body)) { 23 | let json = conn.bomb[id][1].find(v => v.position == body); 24 | if (!json) return conn.reply(m.chat, `🚩 Untuk membuka kotak kirim angka 1 - 9`, m); 25 | 26 | if (json.emot == '💥') { 27 | json.state = true; 28 | let bomb = conn.bomb[id][1]; 29 | let teks = `乂 *B O M B*\n\n`; 30 | teks += bomb.slice(0, 3).map(v => v.state ? v.emot : v.number).join('') + '\n'; 31 | teks += bomb.slice(3, 6).map(v => v.state ? v.emot : v.number).join('') + '\n'; 32 | teks += bomb.slice(6).map(v => v.state ? v.emot : v.number).join('') + '\n\n'; 33 | teks += `Timeout : [ *${((timeout / 1000) / 60)} menit* ]\n`; 34 | teks += `*Permainan selesai!*, kotak berisi bom terbuka : (- *${formatNumber(reward)}*)`; 35 | 36 | conn.reply(m.chat, teks, m).then(() => { 37 | users.exp < reward ? users.exp = 0 : users.exp -= reward; 38 | clearTimeout(conn.bomb[id][2]); 39 | delete conn.bomb[id]; 40 | }); 41 | } else if (json.state) { 42 | return conn.reply(m.chat, `🚩 Kotak ${json.number} sudah di buka silahkan pilih kotak yang lain.`, m); 43 | } else { 44 | json.state = true; 45 | let changes = conn.bomb[id][1]; 46 | let open = changes.filter(v => v.state && v.emot != '💥').length; 47 | 48 | if (open >= 8) { 49 | let teks = `乂 *B O M B*\n\n`; 50 | teks += `Kirim angka *1* - *9* untuk membuka *9* kotak nomor di bawah ini :\n\n`; 51 | teks += changes.slice(0, 3).map(v => v.state ? v.emot : v.number).join('') + '\n'; 52 | teks += changes.slice(3, 6).map(v => v.state ? v.emot : v.number).join('') + '\n'; 53 | teks += changes.slice(6).map(v => v.state ? v.emot : v.number).join('') + '\n\n'; 54 | teks += `Timeout : [ *${((timeout / 1000) / 60)} menit* ]\n`; 55 | teks += `*Permainan selesai!* kotak berisi bom tidak terbuka : (+ *${formatNumber(reward)}*)`; 56 | 57 | conn.reply(m.chat, teks, m).then(() => { 58 | users.exp += reward; 59 | clearTimeout(conn.bomb[id][2]); 60 | delete conn.bomb[id]; 61 | }); 62 | } else { 63 | let teks = `乂 *B O M B*\n\n`; 64 | teks += `Kirim angka *1* - *9* untuk membuka *9* kotak nomor di bawah ini :\n\n`; 65 | teks += changes.slice(0, 3).map(v => v.state ? v.emot : v.number).join('') + '\n'; 66 | teks += changes.slice(3, 6).map(v => v.state ? v.emot : v.number).join('') + '\n'; 67 | teks += changes.slice(6).map(v => v.state ? v.emot : v.number).join('') + '\n\n'; 68 | teks += `Timeout : [ *${((timeout / 1000) / 60)} menit* ]\n`; 69 | teks += `Kotak berisi bom tidak terbuka : (+ *${formatNumber(reward)}*)`; 70 | conn.reply(m.chat, teks, m).then(() => { 71 | users.exp += reward; 72 | }); 73 | } 74 | } 75 | } 76 | } catch (e) { 77 | return conn.reply(m.chat, util.format(e), m); 78 | } 79 | return !0; 80 | } 81 | 82 | handler.exp = 0 83 | 84 | function randomInt(min, max) { 85 | return Math.floor(Math.random() * (max - min + 1)) + min; 86 | } 87 | 88 | function formatNumber(number) { 89 | return number.toLocaleString(); 90 | } 91 | 92 | module.exports = handler 93 | -------------------------------------------------------------------------------- /plugins/internet-growgarden.js: -------------------------------------------------------------------------------- 1 | let fetch = require('node-fetch'); 2 | 3 | let handler = async (m, { usedPrefix, command, text }) => { 4 | try { 5 | if (command === 'growgarden' && !text) { 6 | m.reply(`Please specify a subcommand: \`stock\` or \`weather\`\nExample: \`${usedPrefix + command} stock\` or \`${usedPrefix + command} weather\``); 7 | return; 8 | } 9 | m.reply(wait); 10 | if (text.toLowerCase() === 'stock') { 11 | let res = await (await fetch(`https://api.betabotz.eu.org/api/webzone/grow-and-garden-stock?apikey=${global.lann}`)).json(); 12 | let content = `*🌱 G R O W & G A R D E N S T O C K S 🌱*\n\n`; 13 | 14 | if (res.status && res.result) { 15 | content += `*🌾 Seeds Stocks:*\n`; 16 | res.result.seeds.items.forEach(item => { 17 | content += ` ◦ ${item}\n`; 18 | }); 19 | content += ` *Last Update*: ${res.result.seeds.lastUpdate}\n`; 20 | 21 | content += `\n*🛠️ Gear Stocks:*\n`; 22 | res.result.gears.items.forEach(item => { 23 | content += ` ◦ ${item}\n`; 24 | }); 25 | content += ` *Last Update*: ${res.result.gears.lastUpdate}\n`; 26 | 27 | content += `\n*🥚 Egg Stocks:*\n`; 28 | res.result.eggs.items.forEach(item => { 29 | content += ` ◦ ${item}\n`; 30 | }); 31 | content += ` *Last Update*: ${res.result.eggs.lastUpdate}\n`; 32 | 33 | content += `\n*🎨 Cosmetic Stocks:*\n`; 34 | res.result.cosmetic.items.forEach(item => { 35 | content += ` ◦ ${item}\n`; 36 | }); 37 | content += ` *Last Update*: ${res.result.cosmetic.lastUpdate}\n`; 38 | 39 | content += `\n*☀️ Summer Stocks:*\n`; 40 | res.result.summer.items.forEach(item => { 41 | content += ` ◦ ${item}\n`; 42 | }); 43 | content += ` *Last Update*: ${res.result.summer.lastUpdate}\n`; 44 | 45 | content += `\n*🛒 Merchant Stocks:*\n`; 46 | res.result.merchant.items.forEach(item => { 47 | content += ` ◦ ${item}\n`; 48 | }); 49 | content += ` *Last Update*: ${res.result.merchant.lastUpdate}\n`; 50 | } else { 51 | content += 'Data stok tidak ditemukan.'; 52 | // content += 'Data stok tidak ditemukan.'; 53 | } 54 | console.log(res); 55 | await m.reply(content); 56 | } else if (text.toLowerCase() === 'weather') { 57 | let res = await (await fetch(`https://api.betabotz.eu.org/api/webzone/grow-and-garden-weather?apikey=${global.lann}`)).json(); 58 | let content = `*🌦️ G R O W & G A R D E N W E A T H E R 🌦️*\n\n`; 59 | 60 | if (res.status && res.result) { 61 | content += `📌 *Current Weather*:\n${res.result.result}\n`; 62 | content += `⏰ *Ends*: ${res.result.endsStatus}\n`; 63 | content += `📅 *Last Update*: ${res.result.lastUpdate}\n\n`; 64 | 65 | content += `*📜 Weather History (Last 5):*\n`; 66 | res.result.history.slice(0, 5).forEach(item => { 67 | content += ` ◦ ${item.description}\n`; 68 | content += ` *Ends*: ${item.endsStatus}\n`; 69 | content += ` *Time*: ${item.time}\n\n`; 70 | }); 71 | } else { 72 | content += 'Data cuaca tidak ditemukan.'; 73 | } 74 | await m.reply(content); 75 | } 76 | else { 77 | m.reply(`Please specify a subcommand: \`stock\` or \`weather\`\nExample: \`${usedPrefix + command} stock\` or \`${usedPrefix + command} weather\``); 78 | return; 79 | } 80 | } catch (error) { 81 | throw eror 82 | } 83 | }; 84 | 85 | handler.command = ['growgarden']; 86 | handler.tags = ['internet']; 87 | handler.limit = 1; 88 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/info-ping.js: -------------------------------------------------------------------------------- 1 | const { totalmem, freemem } = require('os'); 2 | const os = require('os'); 3 | const util = require('util'); 4 | const osu = require('node-os-utils'); 5 | const { performance } = require('perf_hooks'); 6 | const { sizeFormatter } = require('human-readable'); 7 | 8 | const format = sizeFormatter({ 9 | std: 'JEDEC', 10 | decimalPlaces: 2, 11 | keepTrailingZeroes: false, 12 | render: (literal, symbol) => `${literal} ${symbol}B`, 13 | }); 14 | 15 | const handler = async (m, { conn }) => { 16 | const used = process.memoryUsage(); 17 | const cpus = os.cpus().map(cpu => { 18 | cpu.total = Object.values(cpu.times).reduce((acc, t) => acc + t, 0); 19 | return cpu; 20 | }); 21 | 22 | const cpu = cpus.reduce( 23 | (acc, cpu, _, { length }) => { 24 | acc.total += cpu.total; 25 | acc.speed += cpu.speed / length; 26 | Object.keys(cpu.times).forEach(type => acc.times[type] += cpu.times[type]); 27 | return acc; 28 | }, 29 | { 30 | speed: 0, 31 | total: 0, 32 | times: { 33 | user: 0, 34 | nice: 0, 35 | sys: 0, 36 | idle: 0, 37 | irq: 0, 38 | }, 39 | } 40 | ); 41 | 42 | let _muptime; 43 | if (process.send) { 44 | process.send('uptime'); 45 | _muptime = await new Promise(resolve => { 46 | process.once('message', resolve); 47 | setTimeout(() => resolve(null), 1000); 48 | }); 49 | } 50 | const muptime = clockString(_muptime); 51 | 52 | const old = performance.now(); 53 | const neww = performance.now(); 54 | const speed = neww - old; 55 | 56 | const cpux = osu.cpu; 57 | const cpuCore = cpux.count(); 58 | const drive = osu.drive; 59 | const mem = osu.mem; 60 | const netstat = osu.netstat; 61 | const HostN = osu.os.hostname(); 62 | const OS = osu.os.platform(); 63 | const cpuModel = cpux.model(); 64 | 65 | const d = new Date(Date.now() + 3600000); // +1 jam 66 | const locale = 'id'; 67 | const weeks = d.toLocaleDateString(locale, { weekday: 'long' }); 68 | const dates = d.toLocaleDateString(locale, { day: 'numeric', month: 'long', year: 'numeric' }); 69 | const times = d.toLocaleTimeString(locale, { hour: 'numeric', minute: 'numeric', second: 'numeric' }); 70 | 71 | await m.reply('_Testing speed..._'); 72 | 73 | const txt = ` 74 | ᴘ ɪ ɴ ɢ 75 | ${Math.round(neww - old)} ms 76 | ${speed.toFixed(2)} ms 77 | 78 | ʀ ᴜ ɴ ᴛ ɪ ᴍ ᴇ 79 | ${muptime} 80 | 81 | s ᴇ ʀ ᴠ ᴇ ʀ 82 | 🛑 ʀᴀᴍ: ${format(totalmem() - freemem())} / ${format(totalmem())} 83 | 🔵 ғʀᴇᴇRAM: ${format(freemem())} 84 | 🔴 ᴍᴇᴍᴏʀy: ${(used.heapUsed / 1024 / 1024).toFixed(2)} MB / ${Math.round(totalmem() / 1024 / 1024)} MB 85 | 🔭 ᴘʟᴀᴛғᴏʀᴍ: ${os.platform()} 86 | 🧿 sᴇʀᴠᴇʀ: ${os.hostname()} 87 | 💻 ᴏs: ${OS} 88 | ⏰ ᴛɪᴍᴇ sᴇʀᴠᴇʀ: ${times} 89 | 90 | _NodeJS Memory Usage_ 91 | \`\`\` 92 | ${Object.keys(used) 93 | .map(key => `${key.padEnd(15)}: ${format(used[key])}`) 94 | .join('\n')} 95 | \`\`\` 96 | 97 | ${cpus[0] ? `_Total CPU Usage_ 98 | ${cpus[0].model.trim()} (${cpu.speed.toFixed(2)} MHz) 99 | ${Object.keys(cpu.times) 100 | .map(type => `- ${type.padEnd(6)}: ${(100 * cpu.times[type] / cpu.total).toFixed(2)}%`) 101 | .join('\n')} 102 | 103 | _CPU Core(s) Usage (${cpus.length} Core CPU)_ 104 | ${cpus.map((cpu, i) => 105 | `${i + 1}. ${cpu.model.trim()} (${cpu.speed} MHz) 106 | ${Object.keys(cpu.times) 107 | .map(type => `- ${type.padEnd(6)}: ${(100 * cpu.times[type] / cpu.total).toFixed(2)}%`) 108 | .join('\n')}`).join('\n\n')} 109 | ` : ""} 110 | `.trim(); 111 | 112 | m.reply(txt); 113 | }; 114 | 115 | handler.help = ['ping', 'speed']; 116 | handler.tags = ['info']; 117 | handler.command = /^(ping|speed|pong|ingfo)$/i; 118 | module.exports = handler; 119 | 120 | function clockString(ms) { 121 | const d = isNaN(ms) ? '--' : Math.floor(ms / 86400000); 122 | const h = isNaN(ms) ? '--' : Math.floor(ms / 3600000) % 24; 123 | const m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60; 124 | const s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60; 125 | return [d, 'D ', h, 'H ', m, 'M ', s, 'S '] 126 | .map(v => v.toString().padStart(2, 0)).join(''); 127 | } -------------------------------------------------------------------------------- /plugins/game-family100_hint.js: -------------------------------------------------------------------------------- 1 | const similarity = require('similarity') 2 | const threshold = 0.72 3 | const rewardAmount = 1000 4 | 5 | const normalize = (s) => String(s || '') 6 | .toLowerCase() 7 | .normalize('NFKC') 8 | .replace(/[^\p{L}\p{N}\s-]+/gu, ' ') 9 | .trim() 10 | .replace(/\s+/g, ' ') 11 | 12 | const mentionText = (who) => { 13 | if (!who) return '' 14 | if (typeof who === 'string') return '@' + who.replace(/^@/, '') 15 | if (typeof who === 'number') return `(id:${who})` 16 | if (who.username) return '@' + who.username 17 | if (who.id) return `(id:${who.id})` 18 | return '' 19 | } 20 | 21 | module.exports = { 22 | async before(m) { 23 | // gunakan store di this (conn) 24 | const store = this.family = this.family || {} 25 | const id = m.chat 26 | if (!store[id]) return !0 27 | 28 | const room = store[id] 29 | if (!room || !Array.isArray(room.jawaban)) { 30 | delete store[id] 31 | return !0 32 | } 33 | 34 | // normalisasi input 35 | const input = normalize(m.text || '') 36 | if (!input) return !0 37 | 38 | // menyerah 39 | if (input === 'nyerah') { 40 | const allAnswers = room.jawaban 41 | .filter(Boolean) 42 | .map((ans, i) => `(${i + 1}) ${ans}`) 43 | .join('\n') 44 | await this.reply(m.chat, `Permainan berakhir karena menyerah.\n\nJawaban yang benar:\n${allAnswers}`, room.msg, { parse_mode: false }) 45 | clearTimeout(room.timeout) 46 | delete store[id] 47 | return !0 48 | } 49 | 50 | // siapkan terjawab 51 | room.terjawab = Array.isArray(room.terjawab) ? room.terjawab : new Array(room.jawaban.length).fill(false) 52 | 53 | // daftar kandidat (belum terjawab & tidak kosong) 54 | const indexed = room.jawaban.map((j, i) => ({ j: String(j || '').trim(), n: normalize(j), i })) 55 | const candidates = indexed.filter(({ j, n, i }) => j && n && !room.terjawab[i]) 56 | 57 | // exact match 58 | let hitIndex = -1 59 | const exact = candidates.find(({ n }) => n === input) 60 | if (exact) { 61 | hitIndex = exact.i 62 | } else { 63 | // similarity check 64 | let best = 0; let bestIdx = -1 65 | for (const { n, i } of candidates) { 66 | const score = similarity(n, input) 67 | if (score > best) { best = score; bestIdx = i } 68 | } 69 | if (best >= threshold) { 70 | await m.reply('Dikit lagi!') 71 | } else { 72 | await m.reply('*Salah!*') 73 | } 74 | return !0 75 | } 76 | 77 | if (hitIndex < 0 || room.terjawab[hitIndex]) return !0 78 | 79 | // simpan penjawab sebagai objek (aman dirender) 80 | room.terjawab[hitIndex] = { 81 | id: m.sender, 82 | username: m.usertag || m.username || null, 83 | name: m.pushName || m.name || null, 84 | } 85 | 86 | // hadiah 87 | const users = global?.db?.data?.users?.[m.sender] 88 | if (users) users.money = (users.money || 0) + rewardAmount 89 | 90 | // status menang? 91 | const isWin = room.terjawab.filter(Boolean).length === room.jawaban.length 92 | 93 | // render board 94 | const body = room.jawaban 95 | .map((jawaban, i) => room.terjawab[i] 96 | ? `(${i + 1}) ${jawaban} ${mentionText(room.terjawab[i])}`.trim() 97 | : null) 98 | .filter(Boolean) 99 | .join('\n') 100 | 101 | const hasSpaced = room.jawaban.some(v => (v || '').includes(' ')) 102 | const caption = ` 103 | Soal: ${room.soal} 104 | 105 | Terdapat ${room.jawaban.length} jawaban${hasSpaced ? '\n(beberapa jawaban terdapat spasi)' : ''} 106 | ${isWin ? 'SEMUA JAWABAN TERJAWAB\nSelamat, Anda telah menjawab semua jawaban dengan benar!' : ''} 107 | ${body} 108 | 109 | +${rewardAmount} kredit sosial tiap jawaban benar 110 | `.trim() 111 | 112 | // update pesan (tanpa parse_mode biar aman) 113 | try { 114 | if (store[id].msg_old?.key) { 115 | await this.sendMessage(m.chat, { delete: store[id].msg_old.key }).catch(() => {}) 116 | } 117 | const msg_old = await this.reply(m.chat, caption, m, { parse_mode: false }) 118 | .then(msg => (store[id].msg = msg)) 119 | .catch(() => null) 120 | store[id].msg_old = msg_old 121 | } catch {} 122 | 123 | if (isWin) { 124 | clearTimeout(room.timeout) 125 | setTimeout(() => { 126 | try { this.sendMessage(m.chat, { delete: store[id].msg.key }).catch(() => {}) } catch {} 127 | delete store[id] 128 | }, 10_000) 129 | } 130 | return !0 131 | } 132 | } 133 | --------------------------------------------------------------------------------