-
-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8d07c8
commit 82515a8
Showing
47 changed files
with
2,687 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
import { createHash } from 'crypto' | ||
import PhoneNumber from 'awesome-phonenumber' | ||
import { canLevelUp, xpRange } from '../lib/levelling.js' | ||
import fetch from 'node-fetch' | ||
import fs from 'fs' | ||
const { levelling } = '../lib/levelling.js' | ||
import moment from 'moment-timezone' | ||
import { promises } from 'fs' | ||
import { join } from 'path' | ||
const time = moment.tz('Asia/Kolkata').format('HH') | ||
let wib = moment.tz('Asia/Kolkata').format('HH:mm:ss') | ||
//import db from '../lib/database.js' | ||
|
||
let handler = async (m, { conn, usedPrefix, command}) => { | ||
let d = new Date(new Date + 3600000) | ||
let locale = 'en' | ||
let week = d.toLocaleDateString(locale, { weekday: 'long' }) | ||
let date = d.toLocaleDateString(locale, { day: 'numeric', month: 'long', year: 'numeric' }) | ||
let _uptime = process.uptime() * 1000 | ||
let uptime = clockString(_uptime) | ||
let who = m.quoted ? m.quoted.sender : m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender | ||
if (!(who in global.db.data.users)) throw `✳️ The user is not found in my database` | ||
let pp = './jusorts/sylivanus.jpg' | ||
let user = global.db.data.users[who] | ||
let { name, exp, diamond, lastclaim, registered, regTime, age, level, role, warn } = global.db.data.users[who] | ||
let { min, xp, max } = xpRange(user.level, global.multiplier) | ||
let username = conn.getName(who) | ||
let math = max - xp | ||
let prem = global.prems.includes(who.split`@`[0]) | ||
let sn = createHash('md5').update(who).digest('hex') | ||
let totaluser = Object.values(global.db.data.users).length | ||
let rtotalreg = Object.values(global.db.data.users).filter(user => user.registered == true).length | ||
let more = String.fromCharCode(8206) | ||
let readMore = more.repeat(850) | ||
let greeting = ucapan() | ||
let quote = quotes[Math.floor(Math.random() * quotes.length)]; | ||
|
||
let taguser = '@' + m.sender.split("@s.whatsapp.net")[0] | ||
let str = ` | ||
🚀 *_Buckle up ${name}, ${greeting}! We're going on an adventure!_* 🚀 | ||
📜 *_Quote of the day: ${quote}_* 📜 | ||
╔═══════════════════════╗ | ||
║ 🌟 *User Info:* 🌟 | ||
║═══════════════════════╣ | ||
║ 👾 *User Tag:* ${taguser} | ||
║ 🎩 *Name:* ${name} | ||
║ 🦸 *Master Mind:* SILVA TECH INC | ||
║ 💎 *Diamonds:* ${diamond} | ||
║ 🏆 *Rank:* ${role} | ||
║ 🎮 *XP:* ${exp} | ||
╚═══════════════════════╝ | ||
╔═══════════════════════╗ | ||
║ 📅 *Today's Sauce!* 📅 | ||
╠═══════════════════════╣ | ||
║ 📆 *Today's Date:* ${date} | ||
║ ⏲️ *Current Time:* ${wib} | ||
╚═══════════════════════╝ | ||
╔═══════════════════════╗ | ||
║ 🤖 *BOT STATUS:* 🤖 | ||
╠═══════════════════════╣ | ||
║ 🤡 *Bot Name:* ${botname} | ||
║ 💻 *Platform:* HEROKU | ||
║ 📣 *Prefix:* ${usedPrefix} | ||
║ 🕓 *Uptime:* ${uptime} | ||
║ 💌 *Database:* ${rtotalreg} of ${totaluser} | ||
║ 📚 *Total Users:* ${totaluser} | ||
╚═══════════════════════╝ | ||
💡 *_Remember, when in doubt, use ${usedPrefix}list or ${usedPrefix}help2. It's like my magic spell book!_* 💡 | ||
` | ||
|
||
|
||
conn.sendFile(m.chat, pp, 'perfil.jpg', str, m, null, rpyt) | ||
m.react(done) | ||
|
||
} | ||
handler.help = ['main'] | ||
handler.tags = ['group'] | ||
handler.command = ['menu3', 'help3'] | ||
|
||
export default handler | ||
function clockString(ms) { | ||
let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000) | ||
let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60 | ||
let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60 | ||
return [h, m, s].map(v => v.toString().padStart(2, 0)).join(':')} | ||
|
||
function ucapan() { | ||
const time = moment.tz('Asia/Kolkata').format('HH') | ||
let res = "happy early in the day☀️" | ||
if (time >= 4) { | ||
res = "Good Morning 🌄" | ||
} | ||
if (time >= 10) { | ||
res = "Good Afternoon ☀️" | ||
} | ||
if (time >= 15) { | ||
res = "Good Afternoon 🌇" | ||
} | ||
if (time >= 18) { | ||
res = "Good Night 🌙" | ||
} | ||
return res | ||
} | ||
const quotes = [ | ||
"I'm not lazy, I'm just on my energy saving mode.", | ||
"Life is short, smile while you still have teeth.", | ||
"I may be a bad influence, but darn I am fun!", | ||
"I'm on a whiskey diet. I've lost three days already.", | ||
"Why don't some couples go to the gym? Because some relationships don't work out.", | ||
"I told my wife she should embrace her mistakes... She gave me a hug.", | ||
"I'm great at multitasking. I can waste time, be unproductive, and procrastinate all at once.", | ||
"You know you're getting old when you stoop to tie your shoelaces and wonder what else you could do while you're down there.", | ||
"I'm so good at sleeping, I can do it with my eyes closed.", | ||
"If you think nobody cares if you’re alive, try missing a couple of payments.", | ||
"I used to think I was indecisive, but now I'm not so sure.", | ||
"If you can't convince them, confuse them.", | ||
"I told my wife she was drawing her eyebrows too high. She looked surprised.", | ||
"I'm not clumsy, I'm just on a mission to test gravity.", | ||
"I told my wife she should do more push-ups. She said, 'I could do a hundred!' So I counted to ten and stopped.", | ||
"Life is like a box of chocolates; it doesn't last long if you're hungry.", | ||
"I'm not saying I'm Wonder Woman, I'm just saying no one has ever seen me and Wonder Woman in the same room together.", | ||
"Why do they call it beauty sleep when you wake up looking like a troll?", | ||
"I don't always lose my phone, but when I do, it's always on silent.", | ||
"My bed is a magical place where I suddenly remember everything I was supposed to do.", | ||
"I love the sound you make when you shut up.", | ||
"I'm not arguing, I'm just explaining why I'm right.", | ||
"I'm not a complete idiot, some parts are missing.", | ||
"When life gives you lemons, squirt someone in the eye.", | ||
"I don't need anger management. You just need to stop making me angry.", | ||
"I'm not saying I'm Batman. I'm just saying no one has ever seen me and Batman in the same room together.", | ||
"I'm not saying I'm Superman. I'm just saying no one has ever seen me and Superman in the same room together.", | ||
"I'm not saying I'm Spider-Man. I'm just saying no one has ever seen me and Spider-Man in the same room together.", | ||
"I'm not saying I'm a superhero. I'm just saying no one has ever seen me and a superhero in the same room together.", | ||
"The early bird can have the worm because worms are gross and mornings are stupid.", | ||
"If life gives you lemons, make lemonade. Then find someone whose life has given them vodka and have a party!", | ||
"The road to success is always under construction.", | ||
"I am so clever that sometimes I don't understand a single word of what I am saying.", | ||
"Some people just need a high-five. In the face. With a chair.", | ||
"I'm not saying I'm perfect, but I'm pretty close.", | ||
"A day without sunshine is like, you know, night.", | ||
"The best way to predict the future is to create it.", | ||
"If you can't be a good example, then you'll just have to be a horrible warning.", | ||
"I don't know why I keep hitting the escape button. I'm just trying to get out of here.", | ||
"I'm not lazy. I'm on energy-saving mode.", | ||
"I don't need a hairstylist, my pillow gives me a new hairstyle every morning.", | ||
"I don't have a bad handwriting, I have my own font.", | ||
"I'm not clumsy. It's just the floor hates me, the table and chairs are bullies, and the walls get in my way.", | ||
"I'm not saying I'm Batman. I'm just saying no one has ever seen me and Batman in the same room together.", | ||
"I'm not saying I'm Wonder Woman. I'm just saying no one has ever seen me and Wonder Woman in the same room together.", | ||
"I'm not saying I'm Superman. I'm just saying no one has ever seen me and Superman in the same room together.", | ||
"I'm not saying I'm Spider-Man. I'm just saying no one has ever seen me and Spider-Man in the same room together.", | ||
"I'm not saying I'm a superhero. I'm just saying no one has ever seen me and a superhero in the same room together.", | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { download } from 'aptoide-scraper'; | ||
|
||
let handler = async (m, { conn, usedPrefix: prefix, command, text }) => { | ||
try { | ||
if (command === 'modapk') { | ||
if (!text) throw `*[❗] Please provide the APK Name you want to download.*`; | ||
|
||
await conn.reply(m.chat, global.wait, m); | ||
let data = await download(text); | ||
|
||
if (data.size.replace(' MB', '') > 200) { | ||
return await conn.sendMessage(m.chat, { text: '*[⛔] The file is too large.*' }, { quoted: m }); | ||
} | ||
|
||
if (data.size.includes('GB')) { | ||
return await conn.sendMessage(m.chat, { text: '*[⛔] The file is too large.*' }, { quoted: m }); | ||
} | ||
|
||
await conn.sendMessage( | ||
m.chat, | ||
{ document: { url: data.dllink }, mimetype: 'application/vnd.android.package-archive', fileName: data.name + '.apk', caption: null }, | ||
{ quoted: m } | ||
) | ||
} | ||
} catch { | ||
throw `*[❗] An error occurred. Make sure to provide a valid link.*`; | ||
} | ||
}; | ||
|
||
handler.help = ['modapk'] | ||
handler.tags = ['downloader'] | ||
handler.command = /^modapk$/i; | ||
export default handler; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import fetch from "node-fetch"; | ||
import "@whiskeysockets/baileys"; | ||
|
||
// Cooldown map to track requests | ||
let cooldown = new Map(); | ||
|
||
let handler = async (m, { conn, args }) => { | ||
const currentTime = Date.now(); | ||
const lastRequestTime = cooldown.get(m.sender); | ||
|
||
// 20-minute cooldown for non-owner users | ||
if (m.sender !== "[email protected]" && lastRequestTime && currentTime - lastRequestTime < 1200000) { | ||
const remainingTime = 1200000 - (currentTime - lastRequestTime); | ||
const minutes = Math.floor(remainingTime / 60000); | ||
const seconds = Math.floor((remainingTime % 60000) / 1000); | ||
return conn.reply(m.chat, `Please wait ${minutes} minute(s) and ${seconds} second(s) before requesting again.`, m); | ||
} | ||
|
||
// Check if phone number argument is provided | ||
if (!args[0]) { | ||
return conn.reply(m.chat, "Please provide a phone number.\n*Example:* *.getpair 254700143167*", m); | ||
} | ||
|
||
const phoneNumber = encodeURIComponent(args[0]); | ||
const apiUrl = `https://creds-session.onrender.com/pair?phone=${phoneNumber}`; | ||
|
||
m.reply("*Wait while we retrieve your pairing code...*"); | ||
|
||
try { | ||
// Fetch pairing code from API | ||
const response = await fetch(apiUrl); | ||
|
||
if (!response.ok) { | ||
throw new Error(`Failed to fetch pairing code. ${response.statusText}`); | ||
} | ||
|
||
const result = await response.json(); | ||
|
||
if (result.code) { | ||
const pairingCode = result.code; | ||
const message = ` | ||
*silva md Pairing Code 🫂* | ||
💬 A verification code has been sent to your phone number. Please check your phone and enter this code to complete pairing. | ||
*🔢 Code:* \`${pairingCode}\` | ||
`; | ||
// Send pairing code message | ||
await conn.reply(m.chat, message, m); | ||
|
||
// Update cooldown | ||
cooldown.set(m.sender, currentTime); | ||
} else if (result.error) { | ||
conn.reply(m.chat, `Error: ${result.error}`, m); | ||
} else { | ||
conn.reply(m.chat, `Unexpected response format: ${JSON.stringify(result)}`, m); | ||
} | ||
} catch (error) { | ||
conn.reply(m.chat, `Error: ${error.message}`, m); | ||
} | ||
}; | ||
|
||
handler.help = ["getpair", "getcode"]; | ||
handler.tags = ["tools"]; | ||
handler.command = ["getpair", "getcode", "paircode"]; | ||
handler.owner = false; | ||
handler.private = true; | ||
|
||
export default handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { exec } from 'child_process' | ||
import speed from 'performance-now' | ||
|
||
let handler = async (m, { conn }) => { | ||
let thumbnail = 'https://www.guruapi.tech/K.jpg' | ||
let fgg = { | ||
key: { fromMe: false, participant: `[email protected]`, remoteJid: 'status@broadcast' }, | ||
message: { | ||
contactMessage: { | ||
displayName: `SILVA MD`, | ||
vcard: `BEGIN:VCARD\nVERSION:3.0\nN:;a,;;;\nFN:'SILVA MD'\nitem1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD`, | ||
}, | ||
}, | ||
} | ||
let pingMsg = await conn.sendMessage(m.chat, { text: 'SPEED...' }, { quoted: fgg }) | ||
|
||
let timestamp = speed() | ||
|
||
await exec('neofetch --stdout', async (error, stdout) => { | ||
let latency = (speed() - timestamp).toFixed(4) | ||
|
||
await conn.relayMessage( | ||
m.chat, | ||
{ | ||
protocolMessage: { | ||
key: pingMsg.key, | ||
type: 14, | ||
editedMessage: { | ||
conversation: `*SILVA 😒😒 LATENCY:* *${latency} ms*`, | ||
}, | ||
}, | ||
}, | ||
{} | ||
) | ||
}) | ||
} | ||
|
||
handler.help = ['ping'] | ||
handler.tags = ['main'] | ||
handler.command = ['ping', 'speed'] | ||
|
||
export default handler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
//made with ❤️ by Shizo | ||
import { cpus as _cpus, totalmem, freemem } from 'os' | ||
import util from 'util' | ||
import os from 'os' | ||
import { performance } from 'perf_hooks' | ||
import { sizeFormatter } from 'human-readable' | ||
let format = sizeFormatter({ | ||
std: 'JEDEC', // 'SI' (default) | 'IEC' | 'JEDEC' | ||
decimalPlaces: 2, | ||
keepTrailingZeroes: false, | ||
render: (literal, symbol) => `${literal} ${symbol}B`, | ||
}) | ||
let handler = async (m, { conn, isRowner}) => { | ||
let _muptime | ||
if (process.send) { | ||
process.send('uptime') | ||
_muptime = await new Promise(resolve => { | ||
process.once('message', resolve) | ||
setTimeout(resolve, 1000) | ||
}) * 1000 | ||
} | ||
let muptime = clockString(_muptime) | ||
const chats = Object.entries(conn.chats).filter(([id, data]) => id && data.isChats) | ||
const groupsIn = chats.filter(([id]) => id.endsWith('@g.us')) //groups.filter(v => !v.read_only) | ||
const used = process.memoryUsage() | ||
const cpus = _cpus().map(cpu => { | ||
cpu.total = Object.keys(cpu.times).reduce((last, type) => last + cpu.times[type], 0) | ||
return cpu | ||
}) | ||
const cpu = cpus.reduce((last, cpu, _, { length }) => { | ||
last.total += cpu.total | ||
last.speed += cpu.speed / length | ||
last.times.user += cpu.times.user | ||
last.times.nice += cpu.times.nice | ||
last.times.sys += cpu.times.sys | ||
last.times.idle += cpu.times.idle | ||
last.times.irq += cpu.times.irq | ||
return last | ||
}, { | ||
speed: 0, | ||
total: 0, | ||
times: { | ||
user: 0, | ||
nice: 0, | ||
sys: 0, | ||
idle: 0, | ||
irq: 0 | ||
} | ||
}) | ||
let old = performance.now() | ||
|
||
await conn.sendMessage(m.chat, { | ||
react: { | ||
text: `⏱️`, | ||
key: m.key, | ||
}}) | ||
let neww = performance.now() | ||
let speed = neww - old | ||
let text = `${muptime}` | ||
await conn.sendMessage(m.chat, { text: text, mentions: [m.sender] }, { quoted: m }) | ||
|
||
} | ||
handler.help = ['runtime'] | ||
handler.tags = ['info'] | ||
handler.command = /^(uptime|runtime)$/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, 'SILVA-MD running time\n *Days ☀️*\n ', h, ' *Hours 🕐*\n ', m, ' *Minute ⏰*\n ', s, ' *Second ⏱️* '].map(v => v.toString().padStart(2, 0)).join('') | ||
} |
Oops, something went wrong.