diff --git a/silvaXlab/Bingwa.js b/silvaXlab/Bingwa.js new file mode 100644 index 0000000..edefcff --- /dev/null +++ b/silvaXlab/Bingwa.js @@ -0,0 +1,21 @@ +export async function all(m) { + if ( + (m.mtype === 'bingwasokoni' || + m.text.startsWith('Bingwa') || + m.text.startsWith('safaricom') || + m.text.startsWith('sokoni') || + m.text.startsWith('Sokoni') || + m.text.startsWith('bingwa') || + m.text.startsWith('Data')) && + !m.isBaileys && + !m.isGroup + ) { + this.sendButton(m.chat, `*WELCOME TO BINGWA SOKONI* + HELLO @${m.sender.split('@')[0]} + THIS IS BINGWA SOKONI 😇\n\n *select your offer*\n\n> POWERED BY SAFARICOM✅\n> SELECT YOU CHOICE FOR TODAY📞\n> THANK YOU FOR BEING PART OF US📚\n\n\n> click the buttons to see more + `.trim(), igfg, null, [['Data 💀', '.data'],['Sms 😍', '.sms'],['Minutes 📚', '.minutes'],['Data & Minutes 📞', '.datamin'],['Data & Sms📞', '.datasms'],['All in one ✅', '.all'],['Home 🏠', 'Bingwa']] , m, { mentions: [m.sender] }) + m.react('🤫') + } + + return !0 +} diff --git a/silvaXlab/Blackpink.js b/silvaXlab/Blackpink.js new file mode 100644 index 0000000..8423e70 --- /dev/null +++ b/silvaXlab/Blackpink.js @@ -0,0 +1,28 @@ +import fetch from 'node-fetch' + +let bpink = [] + +fetch('https://raw.githubusercontent.com/arivpn/dbase/master/kpop/blekping.txt') + .then(res => res.text()) + + .then(txt => (bpink = txt.split('\n'))) + +let handler = async (m, { conn }) => { + let img = bpink[Math.floor(Math.random() * bpink.length)] + + if (!img) throw img + + await conn.sendFile(m.chat, img, '', 'made by silva tech inc', m, 0, { + thumbnail: await (await fetch(img)).buffer(), + }) +} + +handler.help = ['blackpink'] + +handler.tags = ['image'] + +handler.limit = false + +handler.command = /^(bpink|bp|blackpink)$/i + +export default handler diff --git a/silvaXlab/Chatpin.js b/silvaXlab/Chatpin.js new file mode 100644 index 0000000..95759a9 --- /dev/null +++ b/silvaXlab/Chatpin.js @@ -0,0 +1,10 @@ +let handler = async (m, { conn, args }) => { +conn.reply(m.chat, 'Chat pinned 📌', m) +await conn.chatModify({ pin: true }, m.chat) +} + +handler.help = ['pin'] +handler.tags = ['owner'] +handler.command = ['pin'] +handler.owner = true +export default handler diff --git a/silvaXlab/Clearchat.js b/silvaXlab/Clearchat.js new file mode 100644 index 0000000..af3e104 --- /dev/null +++ b/silvaXlab/Clearchat.js @@ -0,0 +1,23 @@ +async function handler(m, { conn }) { + + + + conn.chatModify({ delete: true, lastMessages: [{ key: m.key, messageTimestamp: m.messageTimestamp }] }, m.chat) + + let a = await m.reply("silva md bot Successfully deleted this chat!") + + + +} + +handler.help = ['deletechat'], + +handler.tags = ['owner'], + +handler.command = /^(deletechat|delchat|dchat|clearchat|cleanchat)$/i + +handler.owner = true + +export default handler + + diff --git a/silvaXlab/audio-tomp3.js b/silvaXlab/audio-tomp3.js new file mode 100644 index 0000000..54324d6 --- /dev/null +++ b/silvaXlab/audio-tomp3.js @@ -0,0 +1,17 @@ +import { toAudio } from '../lib/converter.js' + +let handler = async (m, { conn, usedPrefix, command }) => { + let q = m.quoted ? m.quoted : m + /* let mime = (m.quoted ? m.quoted : m.msg).mimetype || '' + if (!/video|audio/.test(mime)) throw `✳️ Reply to the video or voice note you want to convert to mp3 with the command :\n\n*${usedPrefix + command}*`*/ + let media = await q.download?.() + if (!media) throw '❎ Failed to download media' + let audio = await toAudio(media, 'mp4') + if (!audio.data) throw '❎ Error converting' + conn.sendFile(m.chat, audio.data, 'audio.mp3', '', m, null, { mimetype: 'audio/mp4' }) +} +handler.help = ['tomp3'] +handler.tags = ['fun'] +handler.command = /^to(mp3|a(udio)?)$/i + +export default handler diff --git a/silvaXlab/audio-toptt.js b/silvaXlab/audio-toptt.js new file mode 100644 index 0000000..8df5ee4 --- /dev/null +++ b/silvaXlab/audio-toptt.js @@ -0,0 +1,19 @@ +import { toPTT } from '../lib/converter.js' + +let handler = async (m, { conn, usedPrefix, command }) => { + let q = m.quoted ? m.quoted : m + let mime = (m.quoted ? m.quoted : m.msg).mimetype || '' + if (!/video|audio/.test(mime)) + throw `✳️ Reply to the audio you want to convert to voice memo with :\n *${usedPrefix + command}*` + let media = await q.download?.() + if (!media) throw '❎ Failed to download media' + let audio = await toPTT(media, 'mp4') + if (!audio.data) throw '❎ Error converting' + conn.sendFile(m.chat, audio.data, 'audio.mp3', '', m, true, { mimetype: 'audio/mp4' }) +} +handler.help = ['toav'] +handler.tags = ['fun'] + +handler.command = ['toav', 'tovn'] + +export default handler diff --git a/silvaXlab/bible.js b/silvaXlab/bible.js new file mode 100644 index 0000000..f7d50fe --- /dev/null +++ b/silvaXlab/bible.js @@ -0,0 +1,55 @@ +import fetch from 'node-fetch' +import { translate } from '@vitalets/google-translate-api' + +const BASE_URL = 'https://bible-api.com' + +let bibleChapterHandler = async (m, { conn }) => { + try { + // Extract the chapter number or name from the command text. + let chapterInput = m.text.split(' ').slice(1).join('').trim() + + if (!chapterInput) { + throw new Error(`Please specify the chapter number or name. Example: -bible john 3:16`) + } + + // Encode the chapterInput to handle special characters + chapterInput = encodeURIComponent(chapterInput) + + // Make an API request to fetch the chapter information. + let chapterRes = await fetch(`${BASE_URL}/${chapterInput}`) + + if (!chapterRes.ok) { + throw new Error(`Please specify the chapter number or name. Example: -bible john 3:16`) + } + + let chapterData = await chapterRes.json() + + let translatedChapterHindi = await translate(chapterData.text, { to: 'hi', autoCorrect: true }) + + let translatedChapterEnglish = await translate(chapterData.text, { + to: 'en', + autoCorrect: true, + }) + + let bibleChapter = ` +📖 *The Holy Bible*\n +📜 *Chapter ${chapterData.reference}*\n +Type: ${chapterData.translation_name}\n +Number of verses: ${chapterData.verses.length}\n +🔮 *Chapter Content (English):*\n +${translatedChapterEnglish.text}\n +🔮 *Chapter Content (Hindi):*\n +${translatedChapterHindi.text}` + + m.reply(bibleChapter) + } catch (error) { + console.error(error) + m.reply(`Error: ${error.message}`) + } +} + +bibleChapterHandler.help = ['bible [chapter_number|chapter_name]'] +bibleChapterHandler.tags = ['religion'] +bibleChapterHandler.command = ['bible', 'chapter'] + +export default bibleChapterHandler diff --git a/silvaXlab/bingimg.js b/silvaXlab/bingimg.js new file mode 100644 index 0000000..0391d11 --- /dev/null +++ b/silvaXlab/bingimg.js @@ -0,0 +1,19 @@ +import fetch from 'node-fetch' + +let handler = async (m, { conn, text }) => { + if (!text) throw 'What do you want to create?' + m.react(rwait) + let msg = encodeURIComponent(text) + let res = await fetch(`https://aemt.me/bingimg?text=${msg}`) + let data = await res.json() + console.log(data) + let buffer = data.result + conn.sendFile(m.chat, buffer, 'image.png', `${text}`, m) + m.react(done) +} + +handler.help = ['bingimg '] +handler.tags = ['AI'] +handler.command = /^bingimg$/i + +export default handler diff --git a/silvaXlab/bitly.js b/silvaXlab/bitly.js new file mode 100644 index 0000000..77702a0 --- /dev/null +++ b/silvaXlab/bitly.js @@ -0,0 +1,24 @@ +import { bitly } from '@shizodevs/wabotmodule'; + +let handler = async (m, { conn, args }) => { + try { + const longURL = args[0]; + if (!longURL) { + return conn.reply(m.chat, 'Please provide a long URL.', m); + } + const { shortURL, qrCode } = await bitly(longURL); + await conn.sendFile(m.chat, qrCode, 'qrcode.png', `Successfuly Shorted Your Link ✅ +🏴‍☠️ *Original Link:* ${longURL} +🧟‍♂️ *Shorted Link:* ` + shortURL + ` +📢 *Powered by:* Bit.ly +👨‍🎓 *Developer:* ${author}`, m); + } catch (error) { + console.error(error); + conn.reply(m.chat, 'Failed to create short URL and QR code.\n' + error, m); + } +}; +handler.help = ['shortlink ', 'bitly ']; +handler.tags = ['tools']; +handler.command = /^(shortlink|bitly)$/i; + +export default handler; diff --git a/silvaXlab/cmd-del.js b/silvaXlab/cmd-del.js new file mode 100644 index 0000000..5ec9be3 --- /dev/null +++ b/silvaXlab/cmd-del.js @@ -0,0 +1,18 @@ +//import db from '../lib/database.js' + +let handler = async (m, { text }) => { + let hash = text + if (m.quoted && m.quoted.fileSha256) hash = m.quoted.fileSha256.toString('hex') + if (!hash) throw `✳️ Enter the command name` + let sticker = global.db.data.sticker + if (sticker[hash] && sticker[hash].locked) throw `✳️ You can not delete this command` + delete sticker[hash] + m.reply(`✅ Command eliminated`) +} + +handler.help = ['cmd'].map(v => 'del' + v + ' ') +handler.tags = ['cmd'] +handler.command = ['delcmd'] +handler.owner = true + +export default handler diff --git a/silvaXlab/cmd-list.js b/silvaXlab/cmd-list.js new file mode 100644 index 0000000..bf8db55 --- /dev/null +++ b/silvaXlab/cmd-list.js @@ -0,0 +1,33 @@ +//import db from '../lib/database.js' + +let handler = async (m, { conn }) => { + conn.reply( + m.chat, + ` +*LIST COMANDOS* + +▢ *Info:* If it is in *bold* it is blocked + +────────────────── +${Object.entries(global.db.data.sticker) + .map( + ([key, value], index) => + `${index + 1}. ${value.locked ? `(bloqueado) ${key}` : key} : ${value.text}` + ) + .join('\n')} + +`.trim(), + null, + { + mentions: Object.values(global.db.data.sticker) + .map(x => x.mentionedJid) + .reduce((a, b) => [...a, ...b], []), + } + ) +} + +handler.help = ['listcmd'] +handler.tags = ['cmd'] +handler.command = ['listcmd'] + +export default handler diff --git a/silvaXlab/devotional-ganpatti.js b/silvaXlab/devotional-ganpatti.js new file mode 100644 index 0000000..5982cbd --- /dev/null +++ b/silvaXlab/devotional-ganpatti.js @@ -0,0 +1,19 @@ +import fetch from 'node-fetch' + +let handler = async (m, { conn }) => { + +let msg = `Ganpati Bappa Morya !! 🙇` +let endpoint = `https://shizoapi.onrender.com/api/devotional/ganpati?apikey=${shizokeys}` +const response = await fetch(endpoint); +if (response.ok) { + const imageBuffer = await response.buffer(); + await conn.sendFile(m.chat, imageBuffer, 'shizo.techie.error.png', msg, m, null, rpig); + } else { + throw bug + } +} + +handler.tags = ['images'] +handler.help = handler.command = ['ganpati', 'ganesh'] + +export default handler diff --git a/silvaXlab/devotional-mahadev.js b/silvaXlab/devotional-mahadev.js new file mode 100644 index 0000000..c2c1421 --- /dev/null +++ b/silvaXlab/devotional-mahadev.js @@ -0,0 +1,19 @@ +import fetch from 'node-fetch' + +let handler = async (m, { conn }) => { + +let msg = `Har Har Mahadev !! 🙇` +let endpoint = `https://shizoapi.onrender.com/api/devotional/mahadev?apikey=${shizokeys}` +const response = await fetch(endpoint); +if (response.ok) { + const imageBuffer = await response.buffer(); + await conn.sendFile(m.chat, imageBuffer, 'shizo.techie.error.png', msg, m, null, rpig); + } else { + throw bug + } +} + +handler.tags = ['images'] +handler.help = handler.command = ['mahadev', 'shiva'] + +export default handler diff --git a/silvaXlab/devotional-shreeram.js b/silvaXlab/devotional-shreeram.js new file mode 100644 index 0000000..9d74660 --- /dev/null +++ b/silvaXlab/devotional-shreeram.js @@ -0,0 +1,19 @@ +import fetch from 'node-fetch' + +let handler = async (m, { conn }) => { + +let msg = `Jay Shree Ram !! 🚩🙇` +let endpoint = `https://shizoapi.onrender.com/api/devotional/ram?apikey=${shizokeys}` +const response = await fetch(endpoint); +if (response.ok) { + const imageBuffer = await response.buffer(); + await conn.sendFile(m.chat, imageBuffer, 'shizo.techie.error.png', msg, m, null, rpig); + } else { + throw bug + } +} + +handler.tags = ['images'] +handler.help = handler.command = ['ram', 'shreeram'] + +export default handler diff --git a/silvaXlab/dl-StoryWhatsApp.js b/silvaXlab/dl-StoryWhatsApp.js new file mode 100644 index 0000000..6d1692b --- /dev/null +++ b/silvaXlab/dl-StoryWhatsApp.js @@ -0,0 +1,13 @@ +const handler = async (m, { conn: conn }) => { + if ("status@broadcast" != m.quoted?.chat) throw "Quote Status message"; + try { + let buffer = await (m.quoted?.download()); + await conn.sendFile(m.chat, buffer, "", m.quoted?.text || "", null, !1, { + quoted: m + }); + } catch (e) { + console.log(e), await conn.reply(m.chat, m.quoted?.text, m); + } +}; +handler.help = ["downloadsw"], handler.tags = ["tools"], handler.command = /^((sw|status)(dl|download)|(dl|download)(sw|status))$/i; +export default handler; diff --git a/silvaXlab/dl-facebook.js b/silvaXlab/dl-facebook.js new file mode 100644 index 0000000..5ff4bdc --- /dev/null +++ b/silvaXlab/dl-facebook.js @@ -0,0 +1,40 @@ +import fg from 'api-dylux' + +const handler = async (m, { conn, args, usedPrefix, command }) => { + if (!args[0]) { + throw `✳️ Please send the link of a Facebook video\n\n📌 EXAMPLE :\n*${usedPrefix + command}* https://www.facebook.com/Ankursajiyaan/videos/981948876160874/?mibextid=rS40aB7S9Ucbxw6v` + } + + const urlRegex = + /^(?:https?:\/\/)?(?:www\.)?(?:facebook\.com|fb\.watch)\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/i + if (!urlRegex.test(args[0])) { + throw '⚠️ PLEASE GIVE A VALID URL.' + } + + m.react(rwait) + + try { + const result = await fg.fbdl(args[0]) + const tex = ` +⊱ HERE IS YOUR VIDEO ⊰\n\n +↳ *VIDEO TITLE:* ${result.title}\n\n +⊱ THANKS FOR CHOOSING SILVA MD` + + const response = await fetch(result.videoUrl) + const arrayBuffer = await response.arrayBuffer() + const videoBuffer = Buffer.from(arrayBuffer) + + conn.sendFile(m.chat, videoBuffer, 'fb.mp4', tex, m) + m.react(done) + } catch (error) { + console.log(error) + m.reply('⚠️ An error occurred while processing the request. Please try again later.') + } +} + +handler.help = ['facebook '] +handler.tags = ['downloader'] +handler.command = /^((facebook|fb)(downloder|dl)?)$/i +handler.diamond = true + +export default handler diff --git a/silvaXlab/dl-gdrive.js b/silvaXlab/dl-gdrive.js new file mode 100644 index 0000000..d6f7090 --- /dev/null +++ b/silvaXlab/dl-gdrive.js @@ -0,0 +1,30 @@ +import fg from 'api-dylux' +let handler = async (m, { conn, args, usedPrefix, command }) => { + if (!args[0]) throw `✳️ Enter a Google Drive link` + m.react(rwait) + try { + let res = await fg.GDriveDl(args[0]) + await m.reply(` +≡ *Google Drive DL* + +▢ *Number:* ${res.fileName} +▢ *Size:* ${res.fileSize} +▢ *type:* ${res.mimetype}`) + + conn.sendMessage( + m.chat, + { document: { url: res.downloadUrl }, fileName: res.fileName, mimetype: res.mimetype }, + { quoted: m } + ) + m.react(done) + } catch { + m.reply('Error: Check the link or try another link') + } +} +handler.help = ['gdrive'] +handler.tags = ['downloader', 'premium'] +handler.command = ['gdrive'] +handler.credit = true +handler.premium = true + +export default handler diff --git a/silvaXlab/dl-gitclone.js b/silvaXlab/dl-gitclone.js new file mode 100644 index 0000000..56cb62b --- /dev/null +++ b/silvaXlab/dl-gitclone.js @@ -0,0 +1,22 @@ +import fetch from 'node-fetch' +const regex = /(?:https|git)(?::\/\/|@)github\.com[\/:]([^\/:]+)\/(.+)/i +let handler = async (m, { conn, args, usedPrefix, command }) => { + if (!args[0]) + throw `where is the github link?\n\n📌 Example : ${usedPrefix + command} https://github.com/SilvaTechB/silva-md-bot` + if (!regex.test(args[0])) throw '⚠️ link incorrect' + let [_, user, repo] = args[0].match(regex) || [] + repo = repo.replace(/.git$/, '') + let url = `https://api.github.com/repos/${user}/${repo}/zipball` + let filename = (await fetch(url, { method: 'HEAD' })).headers + .get('content-disposition') + .match(/attachment; filename=(.*)/)[1] + + m.reply(`✳️ *Wait, sending repository..*`) + conn.sendFile(m.chat, url, filename, null, m) +} +handler.help = ['gitclone '] +handler.tags = ['downloader'] +handler.command = ['gitclone'] +handler.credit = false + +export default handler diff --git a/silvaXlab/dl-igstalk.js b/silvaXlab/dl-igstalk.js new file mode 100644 index 0000000..6ed8a72 --- /dev/null +++ b/silvaXlab/dl-igstalk.js @@ -0,0 +1,24 @@ +import fg from 'api-dylux' +let handler = async (m, { conn, args, text, usedPrefix, command }) => { + if (!args[0]) + throw `✳️ Enter the Instagram Username\n\n📌Example: ${usedPrefix + command} asli_guru69` + let res = await fg.igStalk(args[0]) + let te = ` +┌──「 *IG STALKING* +▢ *🔖Number:* ${res.name} +▢ *🔖Username:* ${res.username} +▢ *👥followers:* ${res.followersH} +▢ *🫂following:* ${res.followingH} +▢ *📌Bio:* ${res.description} +▢ *🏝️Posts:* ${res.postsH} + +▢ *🔗 Link* : https://instagram.com/${res.username.replace(/^@/, '')} +└────────────` + + await conn.sendFile(m.chat, res.profilePic, 'tt.png', te, m) +} +handler.help = ['igstalk'] +handler.tags = ['downloader'] +handler.command = ['igstalk'] + +export default handler diff --git a/silvaXlab/dl-instagram.js b/silvaXlab/dl-instagram.js new file mode 100644 index 0000000..41b3464 --- /dev/null +++ b/silvaXlab/dl-instagram.js @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; + +let handler = async (m, { conn, usedPrefix, args, command, text }) => { + if (!text) throw `You need to give the URL of Any Instagram video, post, reel, image`; + m.reply(wait); + + let res; + try { + res = await fetch(`https://www.guruapi.tech/api/igdlv1?url=${text}`); + } catch (error) { + throw `An error occurred: ${error.message}`; + } + + let api_response = await res.json(); + + if (!api_response || !api_response.data) { + throw `No video or image found or Invalid response from API.`; + } + + const mediaArray = api_response.data; + + for (const mediaData of mediaArray) { + const mediaType = mediaData.type; + const mediaURL = mediaData.url_download; + + let cap = `HERE YOU GO ${mediaType.toUpperCase()} >,<`; + + if (mediaType === 'video') { + + conn.sendFile(m.chat, mediaURL, 'instagram.mp4', cap, m, null); + } else if (mediaType === 'image') { + + conn.sendFile(m.chat, mediaURL, 'instagram.jpg', cap, m, null); + } + } +}; + +handler.help = ['instagram']; +handler.tags = ['downloader']; +handler.command = /^(instagram|igdl|ig|insta)$/i; + +export default handler; diff --git a/silvaXlab/dl-mediafire.js b/silvaXlab/dl-mediafire.js new file mode 100644 index 0000000..9c9645e --- /dev/null +++ b/silvaXlab/dl-mediafire.js @@ -0,0 +1,38 @@ +import fetch from 'node-fetch' +import { mediafiredl } from '@bochilteam/scraper' + +let handler = async (m, { conn, args, usedPrefix, command, isOwner, isPrems }) => { + var limit + if (isOwner || isPrems) limit = 1200 + else limit = 100 + if (!args[0]) throw `✳️ Enter the mediafire link next to the command` + if (!args[0].match(/mediafire/gi)) throw `❎ Link incorrect` + m.react(rwait) + let full = /f$/i.test(command) + let u = /https?:\/\//.test(args[0]) ? args[0] : 'https://' + args[0] + let ss = await (await fetch(`https://image.thum.io/get/fullpage/${u}`)).buffer() + let res = await mediafiredl(args[0]) + let { url, url2, filename, ext, aploud, filesize, filesizeH } = res + let isLimit = (isPrems || isOwner ? limit : limit) * 1012 < filesize + let caption = ` + ≡ *MEDIAFIRE* + +▢ *Number:* ${filename} +▢ *Size:* ${filesizeH} +▢ *Extension:* ${ext} +▢ *Uploaded:* ${aploud} +${isLimit ? `\n▢ The file exceeds the download limit *+${limit} MB*\nUpgrade to premium to be able to download files more than *900 MB*` : ''} +`.trim() + await conn.sendFile(m.chat, ss, 'ssweb.png', caption, m) + + if (!isLimit) + await conn.sendFile(m.chat, url, filename, '', m, null, { mimetype: ext, asDocument: true }) + m.react(done) +} +handler.help = ['mediafire '] +handler.tags = ['downloader', 'premium'] +handler.command = ['mediafire', 'mfire'] +handler.credit = true +handler.premium = false + +export default handler diff --git a/silvaXlab/dl-mega.js b/silvaXlab/dl-mega.js new file mode 100644 index 0000000..e154e0a --- /dev/null +++ b/silvaXlab/dl-mega.js @@ -0,0 +1,57 @@ +import { File } from 'megajs' +import path from 'path' + +let handler = async (m, { conn, args, usedPrefix, text, command }) => { + try { + if (!text) + return m.reply( + `${usedPrefix + command} https://mega.nz/file/ovJTHaQZ#yAbkrvQgykcH_NDKQ8eIc0zvsN7jonBbHZ_HTQL6lZ8` + ) + + const file = File.fromURL(text) + await file.loadAttributes() + + if (file.size >= 300000000) + return m.reply('Error: File size is too large (Maximum Size: 300MB)') + + const downloadingMessage = `🌩️ SILVA is Downloading the file... Please wait.` + m.reply(downloadingMessage) + + const caption = `*_Successfully downloaded..._*\nFile: ${file.name}\nSize: ${formatBytes(file.size)}` + + const data = await file.downloadBuffer() + + const fileExtension = path.extname(file.name).toLowerCase() + const mimeTypes = { + '.mp4': 'video/mp4', + '.pdf': 'application/pdf', + '.zip': 'application/zip', + '.rar': 'application/x-rar-compressed', + '.7z': 'application/x-7z-compressed', + '.jpg': 'image/jpeg', + '.jpeg': 'image/jpeg', + '.png': 'image/png', + } + + let mimetype = mimeTypes[fileExtension] || 'application/octet-stream' + + await conn.sendFile(m.chat, data, file.name, caption, m, null, { mimetype, asDocument: true }) + } catch (error) { + return m.reply(`Error: ${error.message}`) + } +} + +handler.help = ['mega'] +handler.tags = ['downloader'] +handler.command = /^(mega)$/i +export default handler + +function formatBytes(bytes) { + if (bytes === 0) return '0 Bytes' + + const k = 1024 + const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'] + const i = Math.floor(Math.log(bytes) / Math.log(k)) + + return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i] +} diff --git a/silvaXlab/dl-modapk.js b/silvaXlab/dl-modapk.js new file mode 100644 index 0000000..f6fc95f --- /dev/null +++ b/silvaXlab/dl-modapk.js @@ -0,0 +1,46 @@ +import { download } from 'aptoide-scraper' + +let handler = async (m, { oreo, usedPrefix: prefix, command, text }) => { + try { + if (command === 'modapk') { + if (!text) throw `*[❗] Please provide the APK Name you want to download.*` + + await oreo.reply(m.chat, global.wait, m) + let data = await download(text) + + if (data.size.replace(' MB', '') > 200) { + return await oreo.sendMessage( + m.chat, + { text: '*[⛔] The file is too large.*' }, + { quoted: m } + ) + } + + if (data.size.includes('GB')) { + return await oreo.sendMessage( + m.chat, + { text: '*[⛔] The file is too large.*' }, + { quoted: m } + ) + } + + await oreo.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 diff --git a/silvaXlab/dl-play.js b/silvaXlab/dl-play.js new file mode 100644 index 0000000..469ca07 --- /dev/null +++ b/silvaXlab/dl-play.js @@ -0,0 +1,62 @@ +import ytSearch from "yt-search"; + +const handler = async (message, { conn, command, text, usedPrefix }) => { + // Check if the search text is provided + if (!text) { + throw `🥳 *${usedPrefix + command}* 𝙰𝚢𝚊𝚊 𝚑𝚊𝚒 𝚋𝚞𝚕𝚊𝚠𝚊 𝙽𝚊𝚊𝚝...`; + } + + try { + // Perform search using ytSearch + const searchResults = await ytSearch(text); + const video = searchResults.videos[0]; + + // Check if a video is found + if (!video) { + throw "😭 Video/Audio not found"; + } + + const { title, description, thumbnail, videoId, timestamp, views, ago, url } = video; + + // Send reaction to indicate processing + await message.react("💦"); + await message.react("🥵"); + + // Construct the response message + const responseText = ` + *𝐒𝐈𝐋𝐕𝐀 𝐌𝐃 𝐁𝐎𝐓 PLAY* +🍑TITLE: ${title} +🍆UPLOAD: ${ago} +💦DURATION: ${timestamp} +🥵VIEWS: ${views.toLocaleString()} +𝐒𝐈𝐋𝐕𝐀 𝐌𝐃 𝐁𝐎𝐓 +YOUR PREMIUM USER BOT`; + + // Send response with buttons for MP3 and MP4 options + await conn.sendButton( + message.chat, + responseText, + "𝐒𝐈𝐋𝐕𝐀 𝐌𝐃 𝐁𝐎𝐓", + thumbnail, + [ + ["🎵 AUDIO", `${usedPrefix}song ${text}`], + ["📼 VIDEO", `${usedPrefix}video ${text}`], + ["💗 SCRIPT", `${usedPrefix}repo`], + ["💕 MENU", `${usedPrefix}menu`], + ["🍆 SPEED", `${usedPrefix}ping`] + ], + null, + message + ); + } catch (error) { + console.error(error); + throw "𝐒𝐈𝐋𝐕𝐀 𝐌𝐃 𝐁𝐎𝐓 An error occurred while processing the request."; + } +}; + +handler.help = ["play"]; +handler.tags = ["dl"]; +handler.command = ["play"]; +handler.disabled = false; + +export default handler; \ No newline at end of file diff --git a/silvaXlab/dl-play2.js b/silvaXlab/dl-play2.js new file mode 100644 index 0000000..93b415d --- /dev/null +++ b/silvaXlab/dl-play2.js @@ -0,0 +1,63 @@ +import axios from 'axios'; // < untuk esm +import fetch from 'node-fetch'; // < untuk esm + +let handler = async (m, { conn, text, usedPrefix, command }) => { + if (!text || !text.startsWith('https://')) { + throw `[❗] Masukkan URL YouTube yang valid!\n\ncontoh:\n${usedPrefix + command} https://youtu.be/4rDOsvzTicY?si=3Ps-SJyRGzMa83QT`; + } + + await global.loading(m, conn); + + try { + const response = await axios.get(`https://widipe.com/download/ytdl?url=${text}`); + let res = response.data.result; + + if (!res || !res.mp3 || !res.url || !res.title || !res.thumbnail) { + throw `[❗] Gagal mengambil data dari API. Cek kembali URL atau coba lagi nanti.`; + } + + var { mp3, url, title, thumbnail, timestamp } = res; + + let audio = { + audio: { + url: mp3 + }, + mimetype: 'audio/mp4', + fileName: `${title}.mp3`, + contextInfo: { + externalAdReply: { + showAdAttribution: true, + mediaType: 2, + title: '' + timestamp, + body: '', + sourceUrl: url, + thumbnail: null // Default thumbnail jika fetch gagal + } + } + }; + + // Validasi URL thumbnail dan fetch jika valid + if (thumbnail && thumbnail.startsWith('http')) { + try { + audio.contextInfo.externalAdReply.thumbnail = await (await fetch(thumbnail)).buffer(); + } catch (error) { + console.error('Gagal mengambil thumbnail:', error); + } + } else { + console.error('Thumbnail URL tidak valid:', thumbnail); + } + + await conn.sendMessage(m.chat, audio, { quoted: m }); + } catch (error) { + console.error('Error dalam proses:', error); + throw `[❗] Terjadi kesalahan dalam pengunduhan`; + } +}; + +handler.help = ['yta2']; +handler.command = /^(yt?(a2|audio2))$/i; +handler.tags = ['downloader']; +handler.limit = true; +handler.register = false; + +export default handler; // < untuk esm \ No newline at end of file diff --git a/silvaXlab/dl-playlist.js b/silvaXlab/dl-playlist.js new file mode 100644 index 0000000..41e7837 --- /dev/null +++ b/silvaXlab/dl-playlist.js @@ -0,0 +1,92 @@ +// playlist.js + +import yts from 'yt-search' +import ytdl from 'ytdl-core' +import fs from 'fs' +import { promisify } from 'util' +import { pipeline } from 'stream' +import os from 'os' + +const streamPipeline = promisify(pipeline) + +let handler = async (m, { conn, command, text, usedPrefix }) => { + if (!text) throw `*Enter a playlist URL or name!*\n\n*Example:*\n${usedPrefix + command} https://www.youtube.com/playlist?list=PL...` + try { + let playlist + if (text.includes('youtube.com/playlist')) { + playlist = await ytdl.getPlaylist(text) + } else { + let search = await yts(text) + let vid = search.videos[0] + if (!vid) throw 'Playlist not found!' + playlist = await ytdl.getPlaylist(vid.url) + } + + let songs = playlist.items + let total = songs.length + let downloaded = 0 + + // Send "Downloading playlist..." message + let m1 = await m.reply(`*Downloading playlist of ${total} songs...* 🎵`) + + for (let song of songs) { + let { title, url } = song + let filePath = `${os.tmpdir()}/${title}.mp3` + + // Download and save audio + let stream = ytdl(url, { + filter: 'audioonly', + quality: 'highestaudio', + }) + await streamPipeline(stream, fs.createWriteStream(filePath)) + + // Prepare message template + let doc = { + audio: { + url: filePath + }, + mimetype: 'audio/mpeg', + fileName: `${title}.mp3`, + contextInfo: { + externalAdReply: { + showAdAttribution: true, + mediaType: 2, + mediaUrl: url, + title: title, + body: 'SILVA MD MUSIC BOT', + sourceUrl: url, + thumbnail: await (await fetch(`https://i.ytimg.com/vi/${url.split('v=')[1]}/hqdefault.jpg`)).buffer() + } + } + } + + // Send audio file with metadata + await conn.sendMessage(m.chat, doc, { quoted: m }) + + // Delete temporary file + fs.unlink(filePath, (err) => { + if (err) console.error('Error deleting temp file:', err) + }) + + downloaded++ + await m1.reply(`*Downloaded ${downloaded} of ${total} songs...*`) + } + + // Delete "Downloading playlist..." message + await m1.delete() + + } catch (error) { + console.error('Error in playlist download:', error) + m.reply(`An error occurred: ${error.message}\nPlease try again later`) + } +} + +handler.help = ['playlist'].map(v => v + ' ') +handler.tags = ['downloader'] +handler.command = /^(playlist|pl)$/i + +handler.exp = 0 +handler.limit = false +handler.register = false + +export default handler diff --git a/silvaXlab/dl-spotify.js b/silvaXlab/dl-spotify.js new file mode 100644 index 0000000..a3a0ec9 --- /dev/null +++ b/silvaXlab/dl-spotify.js @@ -0,0 +1,70 @@ +const config = require('../config'); +const fetch = require('node-fetch'); +const { + getBuffer, + getGroupAdmins, + getRandom, + getsize, + h2k, + isUrl, + Json, + runtime, + sleep, + fetchJson +} = require('../lib/functions'); +const { + cmd, + commands +} = require('../command'); + +let foot = config.FOOTER; + +async function dlyta(url) { + try { + const maxat = 10; + + for (let attempt = 0; attempt < maxat; attempt++) { + const gala = await fetch(`https://api-pink-venom.vercel.app/api/ytdl?url=${url}`); + const mala = await gala.json(); + + if (mala.result && mala.result.download_url) { + return { + status: true, + dl_link: mala.result.download_url + }; + } + + await new Promise(resolve => setTimeout(resolve, 4000)); + } + + return { status: false, msg: 'Download URL not found' }; + + } catch (e) { + console.error(e); + return { status: false, msg: e.message }; + } +} + +cmd({ + pattern: "song", + react: "🇰🇪", + dontAddCommandList: true, + filename: __filename +}, +async (conn, mek, m, { from, q, reply }) => { + try { + if (!q) return await reply('*Need a YouTube URL!*'); + + const prog = await dlyta(q); + if (!prog.status) { + throw new Error(prog.msg); + } + + await conn.sendMessage(from, { audio: { url: prog.dl_link }, mimetype: 'audio/mpeg' }, { quoted: mek }); + + } catch (e) { + console.log('Attempt failed:', e); + + await reply('*Failed to process the request. Please try again later!*'); + } +}); diff --git a/silvaXlab/dl-tiktok.js b/silvaXlab/dl-tiktok.js new file mode 100644 index 0000000..19d8933 --- /dev/null +++ b/silvaXlab/dl-tiktok.js @@ -0,0 +1,51 @@ + + +import fg from 'api-dylux' +import fetch from 'node-fetch' +let handler = async (m, { conn, text, args, usedPrefix, command }) => { + + if (!args[0]) throw `✳️ ${mssg.noLink('TikTok')}\n\n 📌 ${mssg.example} : ${usedPrefix + command} https://vm.tiktok.com/ZMYG92bUh/` + if (!args[0].match(/tiktok/gi)) throw `❎ ${mssg.noLink('TikTok')}` + m.react(rwait) + + try { + let res = await fetch(global.API('fgmods', '/api/downloader/tiktok', { url: args[0] }, 'apikey')) + let data = await res.json() + + if (!data.result.images) { + let tex = ` +┌─⊷ *TIKTOK DL* +▢ *${mssg.name}:* ${data.result.author.nickname} +▢ *${mssg.username}:* ${data.result.author.unique_id} +▢ *${mssg.duration}:* ${data.result.duration} +▢ *Likes:* ${data.result.digg_count} +▢ *${mssg.views}:* ${data.result.play_count} +▢ *${mssg.desc}:* ${data.result.title} +└─────────── +` + conn.sendFile(m.chat, data.result.play, 'tiktok.mp4', tex, m); + m.react(done) + } else { + let cap = ` +▢ *Likes:* ${data.result.digg_count} +▢ *${mssg.desc}:* ${data.result.title} +` + for (let ttdl of data.result.images) { + conn.sendMessage(m.chat, { image: { url: ttdl }, caption: cap }, { quoted: m }) + } + conn.sendFile(m.chat, data.result.play, 'tiktok.mp3', '', m, null, { mimetype: 'audio/mp4' }) + m.react(done) + } + + } catch (error) { + m.reply(`❎ ${mssg.error}`) + } + +} + +handler.help = ['tiktok'] +handler.tags = ['dl'] +handler.command = ['tiktok', 'tt', 'tiktokimg', 'tiktokslide'] +handler.diamond = true + +export default handler diff --git a/silvaXlab/dl-tiktokstalk.js b/silvaXlab/dl-tiktokstalk.js new file mode 100644 index 0000000..d61a9e0 --- /dev/null +++ b/silvaXlab/dl-tiktokstalk.js @@ -0,0 +1,21 @@ +import fg from 'api-dylux' +let handler = async (m, { conn, text, args }) => { + if (!text) throw `✳️Enter the Username of a TikTok user ` + let res = await fg.ttStalk(args[0]) + let txt = ` +┌──「 *TIKTOK STALK* +▢ *🔖Number:* ${res.name} +▢ *🔖Username:* ${res.username} +▢ *👥followers:* ${res.followers} +▢ *🫂following:* ${res.following} +▢ *📌Desc:* ${res.desc} + +▢ *🔗 Link* : https://tiktok.com/${res.username} +└────────────` + await conn.sendFile(m.chat, res.profile, 'tt.png', txt, m) +} +handler.help = ['tiktokstalk'] +handler.tags = ['downloader'] +handler.command = /^t(tstalk|iktokstalk)$/i + +export default handler diff --git a/silvaXlab/dl-twitter.js b/silvaXlab/dl-twitter.js new file mode 100644 index 0000000..32938ae --- /dev/null +++ b/silvaXlab/dl-twitter.js @@ -0,0 +1,23 @@ +import fg from 'api-dylux' +let handler = async (m, { conn, args, usedPrefix, command }) => { + if (!args[0]) + throw `📌 Example : \n*${usedPrefix + command}* https://twitter.com/fernandavasro/status/1569741835555291139?t=ADxk8P3Z3prq8USIZUqXCg&s=19` + m.react(rwait) + try { + let { SD, HD, desc, thumb, audio } = await fg.twitter(args[0]) + let te = ` +┌─⊷ *TWITTER DL* +▢ Description: ${desc} +└───────────` + conn.sendFile(m.chat, HD, 'twitter.mp4', te, m) + m.react(done) + } catch (e) { + m.reply(`✳️ verify that the link is from Twitter`) + } +} +handler.help = ['twitter'].map(v => v + ' ') +handler.tags = ['downloader'] +handler.command = /^(twitter|tw)$/i +handler.diamond = true + +export default handler diff --git a/silvaXlab/dl-yta.js b/silvaXlab/dl-yta.js new file mode 100644 index 0000000..4cabb4f --- /dev/null +++ b/silvaXlab/dl-yta.js @@ -0,0 +1,59 @@ +//[ DL YTMP3 🐢 ] +//[ Package :"ruhend-scraper": "^*", ] + + +import { ytmp3, ytmp3v3 } from 'ruhend-scraper' + +let handler = async (m, { conn, args, text, usedPrefix, command }) => { +if (!args || !args[0]) return conn.reply(m.chat, 'Ingresa un enlace de Youtube', m) + +try{ +await m.react('🕑') +let data = await ytmp3(args[0]) +let { audio, title } = data +conn.sendFile(m.chat, audio, title + '.mp3', ${title}.trim(), m, false, { mimetype: 'audio/mpeg', asDocument: false }) +await m.react('✅') +} catch { +try { +await m.react('🕑') +let data = await ytmp3v3(args[0]) +let { audio, title } = data +conn.sendFile(m.chat, audio, title + '.mp3', ${title}.trim(), m, false, { mimetype: 'audio/mpeg', asDocument: false }) +await m.react('✅') +} catch { +await m.react('❌') +}}} + +handler.help = ['ytmp3 '] +handler.tags = ['dl'] +handler.command = ['ytmp3', 'yta', 'ytaudio'] +export default handler + +//[ DL YTMP3DOC 🐢 ] + +import { ytmp3, ytmp3v3 } from 'ruhend-scraper' + +let handler = async (m, { conn, args, text, usedPrefix, command }) => { +if (!args || !args[0]) return conn.reply(m.chat, 'Ingresa un enlace de Youtube', m) + +try{ +await m.react('🕑') +let data = await ytmp3(args[0]) +let { audio, title } = data +conn.sendFile(m.chat, audio, title + '.mp3', ${title}.trim(), m, false, { mimetype: 'audio/mpeg', asDocument: true }) +await m.react('✅') +} catch { +try { +await m.react('🕑') +let data = await ytmp3v3(args[0]) +let { audio, title } = data +conn.sendFile(m.chat, audio, title + '.mp3', ${title}.trim(), m, false, { mimetype: 'audio/mpeg', asDocument: true }) +await m.react('✅') +} catch { +await m.react('❌') +}}} + +handler.help = ['ytmp3doc '] +handler.tags = ['dl'] +handler.command = ['ytmp3', 'yta', 'ytaudiodoc'] +export default handler diff --git a/silvaXlab/dl-yts.js b/silvaXlab/dl-yts.js new file mode 100644 index 0000000..69568bc --- /dev/null +++ b/silvaXlab/dl-yts.js @@ -0,0 +1,37 @@ +import axios from 'axios' + +let handler = async (m, { conn, text }) => { + if (!text) throw '✳️ What do you want me to search for on YouTube?' + + try { + const query = encodeURIComponent(text) + const response = await axios.get(`https://weeb-api.vercel.app/ytsearch?query=${query}`) + const results = response.data + + if (results.length === 0) { + throw 'No results found for the given query.' + } + + const firstResult = results[0] + + const message = ` +乂 ${firstResult.title} +乂 *Link* : ${firstResult.url} +乂 *Duration* : ${firstResult.timestamp} +乂 *Published :* ${firstResult.ago} +乂 *Views:* ${firstResult.views} + + ` + + conn.sendFile(m.chat, firstResult.thumbnail, 'yts.jpeg', message, m) + } catch (error) { + console.error(error) + throw 'An error occurred while searching for YouTube videos.' + } +} + +handler.help = ['ytsearch'] +handler.tags = ['downloader'] +handler.command = ['ytsearch', 'yts'] + +export default handler diff --git a/silvaXlab/dl-ytv.js b/silvaXlab/dl-ytv.js new file mode 100644 index 0000000..1c29439 --- /dev/null +++ b/silvaXlab/dl-ytv.js @@ -0,0 +1,38 @@ +import fs from 'fs' +import os from 'os' +import fetch from 'node-fetch' + +let limit = 500 +let handler = async (m, { conn, args, isPrems, isOwner, usedPrefix, command }) => { + let chat = global.db.data.chats[m.chat] + if (!args || !args[0]) throw `✳️ Example:\n${usedPrefix + command} https://youtu.be/YzkTFFwxtXI` + if (!args[0].match(/youtu/gi)) throw `❎ Verify that the YouTube link` + + var ggapi = `https://vihangayt.me/download/ytmp4?url=${encodeURIComponent(args)}` + + const response = await fetch(ggapi) + if (!response.ok) { + console.log('Error searching for song:', response.statusText) + throw 'Error searching for song' + } + const data = await response.json() + + const caption = `✼ SILVA Y O U T U B E VIDEOS ✼ + + ❏ Title: ${data.data.title} + ❒ Link: ${args[0]} + ⊱─━⊱༻●༺⊰━─⊰` + let vres = data.data.vid_360p + + let vid = await fetch(vres) + const vidBuffer = await vid.buffer() + + conn.sendFile(m.chat, vidBuffer, `error.mp4`, caption, m, false, { asDocument: chat.useDocument }) +} + +handler.help = ['ytmp4 '] +handler.tags = ['downloader'] +handler.command = ['ytmp4', 'video', 'ytv'] +handler.diamond = false + +export default handler diff --git a/silvaXlab/enable.js b/silvaXlab/enable.js new file mode 100644 index 0000000..f77a552 --- /dev/null +++ b/silvaXlab/enable.js @@ -0,0 +1,263 @@ +//import db from '../lib/database.js' + +let handler = async (m, { conn, usedPrefix, command, args, isOwner, isAdmin, isROwner }) => { + let isEnable = /true|enable|(turn)?on|1/i.test(command) + let chat = global.db.data.chats[m.chat] + let user = global.db.data.users[m.sender] + let bot = global.db.data.settings[conn.user.jid] || {} + let type = (args[0] || '').toLowerCase() + let isAll = false, + isUser = false + switch (type) { + case 'welcome': + if (!m.isGroup) { + if (!isOwner) { + global.dfail('group', m, conn) + throw false + } + } else if (!isAdmin) { + global.dfail('admin', m, conn) + throw false + } + chat.welcome = isEnable + break + case 'jarvis': + case 'autotalk': + if (m.isGroup) { + if (!(isAdmin || isOwner)) { + global.dfail('admin', m, conn) + throw false + } + } + chat.jarvis = isEnable + break + case 'pmblocker': + isAll = true + if (!isROwner) { + global.dfail('rowner', m, conn) + throw false + } + bot.pmblocker = isEnable + break + case 'autobio': + isAll = true + if (!isROwner) { + global.dfail('rowner', m, conn) + throw false + } + bot.autoBio = isEnable + break + case 'detect': + case 'detector': + if (!m.isGroup) { + if (!isOwner) { + global.dfail('group', m, conn) + throw false + } + } else if (!isAdmin) { + global.dfail('admin', m, conn) + throw false + } + chat.detect = isEnable + break + case 'autosticker': + if (m.isGroup) { + if (!(isAdmin || isOwner)) { + global.dfail('admin', m, conn) + throw false + } + } + chat.autosticker = isEnable + break + case 'antispam': + if (m.isGroup) { + if (!(isAdmin || isOwner)) { + global.dfail('admin', m, conn) + throw false + } + } + chat.antiSpam = isEnable + break + case 'antidelete': + case 'delete': + if (m.isGroup) { + if (!(isAdmin || isOwner)) { + global.dfail('admin', m, conn) + throw false + } + } + chat.delete = !isEnable + break + case 'antitoxic': + case 'antibadword': + if (m.isGroup) { + if (!(isAdmin || isOwner)) { + global.dfail('admin', m, conn) + throw false + } + } + chat.antiToxic = isEnable + break + + case 'document': + case 'documento': + if (m.isGroup) { + if (!(isAdmin || isOwner)) return dfail('admin', m, conn) + } + chat.useDocument = isEnable + break + case 'autostatus': + isAll = true + if (!isROwner) { + global.dfail('rowner', m, conn) + throw false + } + chat.viewStory = isEnable + break + + case 'antilink': + case 'antilinkwa': + case 'antilinkwha': + if (m.isGroup) { + if (!(isAdmin || isOwner)) { + global.dfail('admin', m, conn) + throw false + } + } + chat.antiLink = isEnable + break + + case 'nsfw': + case '+18': + if (m.isGroup) { + if (!(isAdmin || isOwner)) { + global.dfail('admin', m, conn) + throw false + } + } + chat.nsfw = isEnable + break + + case 'autolevelup': + isUser = true + user.autolevelup = isEnable + break + + case 'chatbot': + if (m.isGroup) { + if (!(isAdmin || isOwner)) { + global.dfail('admin', m, conn) + throw false + } + } + chat.chatbot = isEnable + break + + case 'restrict': + case 'restringir': + isAll = true + if (!isOwner) { + global.dfail('owner', m, conn) + throw false + } + bot.restrict = isEnable + break + case 'autotype': + case 'alwaysonline': + isAll = true + if (!isOwner) { + global.dfail('owner', m, conn) + throw false + } + chat.autotype = isEnable + break + + case 'anticall': + case 'nocall': + isAll = true + if (!isOwner) { + global.dfail('owner', m, conn) + throw false + } + bot.antiCall = isEnable + break + case 'onlypv': + case 'onlydm': + case 'onlymd': + case 'solopv': + isAll = true + if (!isROwner) { + global.dfail('rowner', m, conn) + throw false + } + global.opts['pconly'] = isEnable + break + + case 'gponly': + case 'onlygp': + case 'grouponly': + case 'sologp': + case 'sologrupo': + isAll = true + if (!isROwner) { + global.dfail('rowner', m, conn) + throw false + } + global.opts['gconly'] = isEnable + break + + case 'self': + isAll = true + if (!isROwner) { + global.dfail('rowner', m, conn) + throw false + } + global.opts['self'] = isEnable + break + + + default: + if (!/[01]/.test(command)) + return m.reply(` +≡ List of options +𝐒𝐈𝐋𝐕𝐀 𝐌𝐃 𝐁𝐎𝐓 +◈──『 *ADMIN*』───⳹ +⛊ welcome +⛊ antilink +⛊ nsfw +⛊ autosticker +⛊ detect +⛊ jarvis +⛊ antispam +⛊ antitoxic +╰──────────⳹ +𝐒𝐈𝐋𝐕𝐀 𝐌𝐃 𝐁𝐎𝐓 +◈──『 *USERS*』───⳹ +⛊ autolevelup +⛊ chatbot +╰──────────⳹ +◈──『 *OWNER*』───⳹ +⛊ onlydm +⛊ grouponly +⛊ autotype +⛊ autobio +╰──────────⳹ +𝐒𝐈𝐋𝐕𝐀 𝐌𝐃 𝐁𝐎𝐓 +*📌 Example :* +*${usedPrefix}on* welcome +*${usedPrefix}off* welcome +`) + throw false + } + + m.reply( + ` +✅ *${type}* Now *${isEnable ? 'Active' : 'Deactive'}* ${isAll ? 'for this bot' : isUser ? '' : 'for this bot'} +`.trim() + ) +} +handler.help = ['en', 'dis'].map(v => v + 'able