Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
safrotbot authored Jul 15, 2024
1 parent 69d6342 commit fcbb741
Show file tree
Hide file tree
Showing 100 changed files with 5,403 additions and 0 deletions.
447 changes: 447 additions & 0 deletions plugins/Control.js

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions plugins/JOHAN-profile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import PhoneNumber from 'awesome-phonenumber'
import fetch from 'node-fetch'
let handler = async (m, { conn }) => {
let user = db.data.users[m.sender]
let who = m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender
let pp = await conn.profilePictureUrl(who, 'image').catch(_ => './src/avatar_contact.png')
let { premium, level, limit, exp, lastclaim, registered, regTime, age, pasangan } = global.db.data.users[m.sender]
let username = conn.getName(who)
let name = conn.getName(who)
let fkon = { key: { fromMe: false, participant: `${m.sender.split`@`[0]}@s.whatsapp.net`, ...(m.chat ? { remoteJid: '16504228206@s.whatsapp.net' } : {}) }, message: { contactMessage: { displayName: `${name}`, vcard: `BEGIN:VCARD\nVERSION:3.0\nN:;a,;;;\nFN:${name}\nitem1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD`}}}
let str = `
*ุงู„ุงุณู…:* ${username}
*ุงุณู…:* ${registered ? name : ''}
*ู…ู†ุดู†:* @${who.replace(/@.+/, '')}
*ุฑู‚ู…:* ${PhoneNumber('+' + who.replace('@s.whatsapp.net', '')).getNumber('international')}
*ุฑุงุจุท:* https://wa.me/${who.split`@`[0]}
*ุนู…ุฑ:* ${registered ? age : ''} Tahun
*ุดุฑูŠูƒ:* ${pasangan ? `@${pasangan.split("@")[0]}` : `Tidak Punya`}
${readMore}
*ุทู„ุจ:* ${registered ? 'Terdaftar': 'Tidak'}
*ู…ู…ูŠุฒ:* ${premium ? "Aktif" :"Tidak"}
*ูˆู‚ุช ู…ู…ูŠุฒ:*
${clockString(user.premiumTime)}
`.trim()
await conn.sendFile(m.chat, pp, '', str, m)
}
handler.help = ['profile']
handler.tags = ['main']
handler.command = /^ุจุฑูˆูุงูŠู„ูŠ$/i
export default handler

const more = String.fromCharCode(8206)
const readMore = more.repeat(4001)

function clockString(ms) {
let d = isNaN(ms) ? '--' : Math.floor(ms / 86400000)
let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000) % 24
let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60
let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60
return [d, '*Hari*\n ', h, ' *Jam*\n ', m, ' *Menit*\n ', s, ' *Detik* '].map(v => v.toString().padStart(2, 0)).join('')
}
18 changes: 18 additions & 0 deletions plugins/JOHAN-role.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
let axios = require('axios')

let handler = async (m, { conn }) => {
if (!m.text.includes('ุตุจุงุญ ุงู„ุฎูŠุฑ')) return // ูŠุชุฃูƒุฏ ู…ู† ูˆุฌูˆุฏ ูƒู„ู…ุฉ "ุตุจุงุญ ุงู„ุฎูŠุฑ" ููŠ ุงู„ุฑุณุงู„ุฉ

// ูŠู‚ูˆู… ุจุงู„ุฑุฏ ุจุฑุณุงู„ุฉ "ุตุจุงุญ ุงู„ู†ูˆุฑ!"
await conn.reply(m.chat, 'ุตุจุงุญ ุงู„ู†ูˆุฑ!', m)

// ูŠู‚ูˆู… ุจุฌู„ุจ ุตูˆุฑุฉ ุตุจุงุญูŠุฉ
let res = await axios.get('https://source.unsplash.com/featured/?morning', { responseType: 'arraybuffer' })
if (!res.data) throw 'Failed to fetch data'

// ูŠู‚ูˆู… ุจุฅุฑุณุงู„ ุงู„ุตูˆุฑุฉ ูƒุฌูˆุงุจ
await conn.sendFile(m.chat, res.data, 'morning.jpg', 'ุตุจุงุญ ุงู„ุฎูŠุฑ ๐ŸŒž', m, false, { quoted: m })
}

handler.customPrefix = /^(ุตุจุงุญ ุงู„ุฎูŠุฑ)$/i // ูŠุญุฏุฏ ุงู„ูƒูˆุฏ ูƒูŠููŠุฉ ุงุณุชุฌุงุจุฉ ุงู„ุฑูˆุจูˆุช ุนู„ู‰ ุงู„ุฑุณุงุฆู„ ุงู„ุชูŠ ุชุญุชูˆูŠ ุนู„ู‰ "ุตุจุงุญ ุงู„ุฎูŠุฑ"
module.exports = handler
96 changes: 96 additions & 0 deletions plugins/JOHAN-ุฎู„ููŠุฉ.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
const dir = [
'https://telegra.ph/file/6f129ef1bead61c3fd13a.jpg',
'https://telegra.ph/file/07dbbed3e1cd700f8133f.jpg',
'https://telegra.ph/file/5b8ac02db652fdce19d40.jpg',
'https://telegra.ph/file/948f12541e2753ed9c934.jpg',
'https://telegra.ph/file/b8a6a1f522ab8d6db3db1.jpg',
'https://telegra.ph/file/75eb22137d1683b85efad.jpg',
'https://telegra.ph/file/f0cb8c04f0c55ee581e17.jpg',
'https://telegra.ph/file/36e167b9121abcf4c7272.jpg',
'https://telegra.ph/file/0e7b904220ba3e5a84a27.jpg',
'https://telegra.ph/file/25d05d40b7c461642e0da.jpg',
'https://telegra.ph/file/3ab65d4cea65eaacc032e.jpg',
'https://telegra.ph/file/8deb6af72ce089d06ba7f.jpg',
'https://telegra.ph/file/9a91430eafd03230cc6ed.jpg',
'https://telegra.ph/file/ea29ed8256c85c8087501.jpg',
'https://telegra.ph/file/15e8e6df535cd570bb3fd.jpg',
'https://telegra.ph/file/d9d60531aa546ec9b2612.jpg',
'https://telegra.ph/file/35cb25a4907ff89552682.jpg',
'https://telegra.ph/file/3dba87e4a064ac6178718.jpg',
'https://telegra.ph/file/360dab85b3d1db499f892.jpg',
'https://telegra.ph/file/2aa6503637f096f3f0e16.jpg',
'https://telegra.ph/file/61485c70458b9144be6d2.jpg',
'https://telegra.ph/file/a4952bf7b12090ec374db.jpg',
'https://telegra.ph/file/ccc7b944f708696dc3b6b.jpg',
'https://telegra.ph/file/dd0983560847d77df9759.jpg',
'https://telegra.ph/file/c32161a800e2b307bc91c.jpg',
'https://telegra.ph/file/d2f83ba19daf298857cf9.jpg',
'https://telegra.ph/file/d4d07b778cef376b6150e.jpg',
'https://telegra.ph/file/03bbe6e3379af6e677932.jpg',
'https://telegra.ph/file/e877b3afe549356d46498.jpg',
'https://telegra.ph/file/3f3e529c89bca4aa23d7b.jpg',
'https://telegra.ph/file/89f639f13c817a904a9be.jpg',
'https://telegra.ph/file/3c376806046176025b016.jpg',
'https://telegra.ph/file/8497a1dd830ed6d491185.jpg',
'https://telegra.ph/file/c2fea82fe78d93a7a552b.jpg',
'https://telegra.ph/file/e5da68ba89581d2806466.jpg',
'https://telegra.ph/file/d1bad269eb736096a9b38.jpg',
'https://telegra.ph/file/62e3a0fcd2d58fbe17825.jpg',
'https://telegra.ph/file/6ea52ed9f04ab71b96d49.jpg',
'https://telegra.ph/file/020d349fd1e58bba93e4f.jpg',
'https://telegra.ph/file/b77b64efc8ffc80b09784.jpg',
'https://telegra.ph/file/fd865fbf7903fd4704615.jpg',
'https://telegra.ph/file/70b5abef35024f9a8da18.jpg',
'https://telegra.ph/file/cc7709dcee4dbc93aeb42.jpg',
'https://telegra.ph/file/cc7709dcee4dbc93aeb42.jpg',
'https://telegra.ph/file/d4ecc65d71751ac771b6b.jpg',
'https://telegra.ph/file/cc52f0e21605499336082.jpg',
'https://telegra.ph/file/9b829f47b7845cf0e7bfd.jpg',
'https://telegra.ph/file/bba516b0ead1e9e22d870.jpg',
'https://telegra.ph/file/fa19fcfd2c88d163547ac.jpg',
'https://telegra.ph/file/7d4e6287dcf07a3287b95.jpg',
'https://telegra.ph/file/aefb175abaa1c846096fd.jpg',
'https://telegra.ph/file/cd39c14fe0f780fdd267d.jpg',
'https://telegra.ph/file/b73bac2b0115b2e4b7989.jpg',
'https://telegra.ph/file/5b9e09e1daf45fa4c003a.jpg',
'https://telegra.ph/file/73f431e9fe4b364b782fc.jpg',
'https://telegra.ph/file/1d6ecd36f85c7ebc21653.jpg',
'https://telegra.ph/file/1c646add60f4f5f9eada8.jpg',
'https://telegra.ph/file/5b29b91428f1a96bea220.jpg',
'https://telegra.ph/file/530b870ebd93a719fa949.jpg',
'https://telegra.ph/file/622141f51389f0c3f0854.jpg',
'https://telegra.ph/file/a81af837dce7d0e83125e.jpg',
'https://telegra.ph/file/2e6b80666ff9919780d1f.jpg',
'https://telegra.ph/file/2fb2b4f0458873ff62fdf.jpg',
'https://telegra.ph/file/7d22cdb4cb4e04028291b.jpg',
'https://telegra.ph/file/4eb8995da07fd3a469e4e.jpg',
'https://telegra.ph/file/2f435607abcf411838dc0.jpg',
'https://telegra.ph/file/94d8535050d6f13500e9a.jpg',
'https://telegra.ph/file/f55cbfa484aca8596ae17.jpg',
'https://telegra.ph/file/28a3f987d703dbd979066.jpg',
'https://telegra.ph/file/0e281e8146475cb757168.jpg',
'https://telegra.ph/file/915c761d25b0798e504c1.jpg',
'https://telegra.ph/file/8a652f0af102947be72ed.jpg',
'https://telegra.ph/file/4e85b685daa95346898c5.jpg',
'https://telegra.ph/file/2ca69ebc7831fac4cc7f1.jpg',
'https://telegra.ph/file/fcf341df95e1f0af0ffff.jpg',
'https://telegra.ph/file/bdc17aea743246f671756.jpg',
'https://telegra.ph/file/6c3b56be6fa67f78965f7.jpg',
'https://telegra.ph/file/3f20d9dbd90d9ef6e1f2c.jpg',
'https://telegra.ph/file/95e647f6a660d37db530b.jpg',
'https://telegra.ph/file/af1052a5d6af1ef1480a2.jpg',
'https://telegra.ph/file/378efa21d8108cd523ca7.jpg',
'https://telegra.ph/file/31c21708ba59a62957ea6.jpg',
'https://telegra.ph/file/64d6c71d418361e957d0a.jpg',
'https://telegra.ph/file/befe01a310c3a83731569.jpg',
'https://telegra.ph/file/27f646bd99f79ac21c288.jpg',

];
let handler = async (m, { conn }) => {
conn.sendFile(m.chat, dir[Math.floor(Math.random() * dir.length)], 'dado.webp', '', m)
}
handler.help = ['dado']
handler.tags = ['game']
handler.command = ['ุฎู„ููŠุงุช', 'ุฎู„ููŠู‡']

export default handler
13 changes: 13 additions & 0 deletions plugins/antiprivate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export async function before(m, {conn, isAdmin, isBotAdmin, isOwner, isROwner}) {
if (m.isBaileys && m.fromMe) return !0;
if (m.isGroup) return !1;
if (!m.message) return !0;
if (m.text.includes('PIEDRA') || m.text.includes('PAPEL') || m.text.includes('TIJERA') || m.text.includes('serbot') || m.text.includes('jadibot')) return !0;
const chat = global.db.data.chats[m.chat];
const bot = global.db.data.settings[this.user.jid] || {};
if (bot.antiPrivate && !isOwner && !isROwner) {
await m.reply(`*[โ—] สœแดสŸแด€ @${m.sender.split`@`[0]}, ูƒู„ู… ุงู„ู…ุทูˆุฑ ู„ุฑูุน ู„ุญุธุฑ ุนู†ูƒูƒ ุงูˆ ุงุฏุฎู„ ุฌุฑูˆุจ ุฏุนู… ุฑุณู…ูŠ ู„ู„ุจูˆุช ุงู„ู…ุทูˆุฑ: +201115618853 ูŠู…ู†ุน ุงู„ุชุญุฏุซ ุจุงู„ุฑุณุงุฆู„ ุงู„ุฎุงุตุฉ ู„ู„ุจูˆุช ูˆุจุงู„ุชุงู„ูŠ ุณูŠุชู… ุญุธุฑูƒ.*`, false, {mentions: [m.sender]});
await this.updateBlockStatus(m.chat, 'block');
}
return !1;
}
85 changes: 85 additions & 0 deletions plugins/attp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import fetch from 'node-fetch'
import { sticker, addExif } from '../lib/sticker.js'
import { Sticker } from 'wa-sticker-formatter'
let handler = async(m, { conn, text, args, usedPrefix, command }) => {
if (!text) throw `*ุชุญูˆูŠู„ ูƒู„ู…ุฉ ุงูˆ ู†ุต ู„ู…ู„ุตู‚*\n\n*โ€”โ—‰ ู…ุซุงู„:*\n*โ—‰ ${usedPrefix + command} ุณูุฑูˆุช๐Ÿคบ๐Ÿ”ฅ*`
let teks = encodeURI(text)

if (command == 'ุณุชูŠูƒ') {
let a1 = await (await fetch(`https://api.erdwpe.com/api/maker/attp?text=${teks}`)).buffer()
let a2 = await createSticker(a1, false, global.packname, global.author)
conn.sendFile(m.chat, a2, 'sticker.webp', '', m, { asSticker: true })}

if (command == 'attp2') {
conn.sendFile(m.chat, `https://api.lolhuman.xyz/api/attp?apikey=${lolkeysapi}&text=${teks}`, 'sticker.webp', '', m, { asSticker: true })}

if (command == 'attp3') {
conn.sendFile(m.chat, `https://api.lolhuman.xyz/api/attp2?apikey=${lolkeysapi}&text=${teks}`, 'sticker.webp', '', m, { asSticker: true })}

if (command == 'ttp5') {
conn.sendFile(m.chat, `https://api.lolhuman.xyz/api/ttp6?apikey=${lolkeysapi}&text=${teks}`, 'sticker.webp', '', m, { asSticker: true })}

if (command == 'ttp4') {
conn.sendFile(m.chat, `https://api.lolhuman.xyz/api/ttp5?apikey=${lolkeysapi}&text=${teks}`, 'sticker.webp', '', m, { asSticker: true })}

if (command == 'ttp3') {
conn.sendFile(m.chat, `https://api.lolhuman.xyz/api/ttp3?apikey=${lolkeysapi}&text=${teks}`, 'sticker.webp', '', m, { asSticker: true })}

if (command == 'ttp2') {
conn.sendFile(m.chat, `https://api.lolhuman.xyz/api/ttp2?apikey=${lolkeysapi}&text=${teks}`, 'sticker.webp', '', m, { asSticker: true })}

if (command == 'ttp') {
conn.sendFile(m.chat, `https://api.lolhuman.xyz/api/ttp?apikey=${lolkeysapi}&text=${teks}`, 'sticker.webp', '', m, { asSticker: true })}

}
handler.command = handler.help = ['ุณุชูŠูƒ']
handler.tags = ['sticker']
export default handler

async function createSticker(img, url, packName, authorName, quality) {
let stickerMetadata = { type: 'full', pack: packName, author: authorName, quality }
return (new Sticker(img ? img : url, stickerMetadata)).toBuffer()}
async function mp4ToWebp(file, stickerMetadata) {
if (stickerMetadata) {
if (!stickerMetadata.pack) stickerMetadata.pack = 'โ€Ž'
if (!stickerMetadata.author) stickerMetadata.author = 'โ€Ž'
if (!stickerMetadata.crop) stickerMetadata.crop = false
} else if (!stickerMetadata) { stickerMetadata = { pack: 'โ€Ž', author: 'โ€Ž', crop: false }}
let getBase64 = file.toString('base64')
const Format = { file: `data:video/mp4;base64,${getBase64}`, processOptions: { crop: stickerMetadata?.crop, startTime: '00:00:00.0', endTime: '00:00:7.0', loop: 0
}, stickerMetadata: { ...stickerMetadata },
sessionInfo: {
WA_VERSION: '2.2106.5',
PAGE_UA: 'WhatsApp/2.2037.6 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36',
WA_AUTOMATE_VERSION: '3.6.10 UPDATE AVAILABLE: 3.6.11',
BROWSER_VERSION: 'HeadlessChrome/88.0.4324.190',
OS: 'Windows Server 2016',
START_TS: 1614310326309,
NUM: '6247',
LAUNCH_TIME_MS: 7934,
PHONE_VERSION: '2.20.205.16'
},
config: {
sessionId: 'session',
headless: true,
qrTimeout: 20,
authTimeout: 0,
cacheEnabled: false,
useChrome: true,
killProcessOnBrowserClose: true,
throwErrorOnTosBlock: false,
chromiumArgs: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--aggressive-cache-discard',
'--disable-cache',
'--disable-application-cache',
'--disable-offline-load-stale-cache',
'--disk-cache-size=0'
],
executablePath: 'C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe',
skipBrokenMethodsCheck: true,
stickerServerEndpoint: true
}}
let res = await fetch('https://sticker-api.openwa.dev/convertMp4BufferToWebpDataUrl', { method: 'post', headers: { Accept: 'application/json, text/plain, /', 'Content-Type': 'application/json;charset=utf-8', }, body: JSON.stringify(Format)})
return Buffer.from((await res.text()).split(';base64,')[1], 'base64')}
38 changes: 38 additions & 0 deletions plugins/bank.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
let handler = async (m, {conn, usedPrefix}) => {

let who = m.quoted ? m.quoted.sender : m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender
let user = global.db.data.users[who]
let username = conn.getName(who)
//let { wealth } = global.db.data.users[who]
if (!(who in global.db.data.users)) throw `โœณ๏ธ ู„ู… ูŠุชู… ุงู„ุนุซูˆุฑ ุนู„ู‰ ุงู„ู…ุณุชุฎุฏู… ููŠ ู‚ุงุนุฏุฉ ุงู„ุจูŠุงู†ุงุช ุงู„ุฎุงุตุฉ ุจูŠ`

var wealth = 'ุญุทู…๐Ÿ˜ญ'
if (`${user.bank}` <= 3000){
wealth = 'ุญุทู…๐Ÿ˜ญ'
} else if (`${user.bank}` <= 6000){
wealth = 'ูู‚ูŠุฑ๐Ÿ˜ข'
} else if (`${user.bank}` <= 100000){
wealth = 'ู…ุชูˆุณุท๐Ÿ’ธ'
} else if (`${user.bank}` <= 1000000){
wealth = 'ุซุฑูŠ๐Ÿ’ธ๐Ÿ’ฐ'
} else if (`${user.bank}` <= 10000000){
wealth = 'ู…ู„ูŠูˆู†ูŠุฑ๐Ÿค‘'
} else if (`${user.bank}` <= 1000000000){
wealth = 'ุตุงุญุจ ุงู…ูˆุงู„ ุทุงุฆู„ุฉ๐Ÿค‘'
} else if (`${user.bank}` <= 10000000000){
wealth = 'ุงู„ู…ู„ูŠุงุฑุฏูŠุฑ๐Ÿค‘๐Ÿค‘'
}

conn.reply(m.chat, `๐Ÿฆ *Bank | ${username}*
*๐Ÿช™ Gold* : ${user.bank}
*Wealth :* ${wealth}
`, m, { mentions: [who] }) //${user.chicken}
}
handler.help = ['bank']
handler.tags = ['economy']
handler.command = ['ุจู†ูƒ', 'vault']

export default handler
23 changes: 23 additions & 0 deletions plugins/buyall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

const xppercredit = 350
let handler = async (m, { conn, command, args }) => {
let count = command.replace(/^buy/i, '')
count = count ? /all/i.test(count) ? Math.floor(global.db.data.users[m.sender].exp / xppercredit) : parseInt(count) : args[0] ? parseInt(args[0]) : 1
count = Math.max(1, count)
if (global.db.data.users[m.sender].exp >= xppercredit * count) {
global.db.data.users[m.sender].exp -= xppercredit * count
global.db.data.users[m.sender].credit += count
conn.reply(m.chat, `
โ”Œโ”€ใ€Œ *PAYMENT NOTE* ใ€
โ€ฃ *Nominal purchase* : + ${count}
โ€ฃ *Spent* : -${xppercredit * count} XP
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€`, m)
} else conn.reply(m.chat, `โŽ Sorry, you don't have enough *XP* to buy *${count}* Gold\n\n You can get *XP* using the commands from the *games and economy menu*`, m)
}
handler.help = ['buy', 'buyall']
handler.tags = ['economy']
handler.command = ['buy', 'buyall']

handler.disabled = false

export default handler
21 changes: 21 additions & 0 deletions plugins/buychicken.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
let handler = async (m, { conn, command, args, usedPrefix }) => {
let user = global.db.data.users[m.sender]




if (user.chicken > 0) return m.reply('You already have this')
if (user.credit < 500) return m.reply(`๐Ÿ’” *ู„ูŠุณ ู„ุฏูŠูƒ ูƒู…ูŠุฉ ูƒุงููŠุฉ ู…ู† ุงู„ุฐู‡ุจ ููŠ ู…ุญูุธุชูƒ ู„ุดุฑุงุก ุฏุฌุงุฌุฉ*`)

user.credit -= 1000
user.chicken += 1
m.reply(`๐ŸŽ‰ ู„ู‚ุฏ ุงุดุชุฑูŠุช ุจู†ุฌุงุญ ุฏุฌุงุฌุฉ ู„ู„ู‚ุชุงู„! ุงุณุชุฎุฏู… ุงู„ุฃู…ุฑ ${usedPrefix}ู…ุตุงุฑุนุฉ ุงู„ุฏูŠูˆูƒ <amount>`)
}

handler.help = ['buych']
handler.tags = ['economy']
handler.command = ['ุดุฑุงุก_ุงู„ุฏุฌุงุฌ', 'buych']

handler.group = true

export default handler
Loading

0 comments on commit fcbb741

Please sign in to comment.