From 6d4bd37232b614ee0b62882a062067e3576b2ec8 Mon Sep 17 00:00:00 2001 From: AILAILGFFDS <118312236+AILAILGFFDS@users.noreply.github.com> Date: Sun, 11 Dec 2022 01:05:57 +0300 Subject: [PATCH] Update app.json --- app.json | 5403 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 5187 insertions(+), 216 deletions(-) diff --git a/app.json b/app.json index c258c029..354265de 100644 --- a/app.json +++ b/app.json @@ -1,220 +1,5191 @@ -{ - "name": "Aquabot - MD", - "description": "AQUABOT - Makes it easy and fun to use Whatsapp.", - "logo": "https://i.ibb.co/V9jYrQC/aqua-md.jpg", - "keywords": ["whatsapp", "userbot", "aqua", "bot", "ai" , "MD" ], - "repository": "https://github.com/sanuwaofficial/AQUABOT-MD", - "website": "https://aquabot.ga/", - "success_url": "https://aquabot.ga", - "stack": "container", - "env": { - "AQUA_SESSION": { - "description": "", - "required": true - }, - "NO_ONLINE": { - "description": "", - "required": true, - "value": "false" - }, - "ANTI_BOT": { - "description": "", - "value": "false" , - "required": true - }, - "ANTI_SPAM": { - "description": "", - "value": "true" , - "required": true - }, - "ONLY_GROUP": { - "description": "", - "value": "false" , - "required": true - }, - "REMOVE_BG_API_KEY": { - "description": "", - "required": true - }, - "OWN_NAME": { - "description": "", - "value": "your name" , - "required": true - }, - "OWN_NUMBER": { - "description": "", - "value": "94xxxxxxxxx" , - "required": true - }, - - "AUTO_REACT": { - "description": "", - "value": "false" , - "required": true - }, +process.on('uncaughtException', console.error) +require("./config") +const { BufferJSON, WA_DEFAULT_EPHEMERAL, generateWAMessageFromContent, proto, generateWAMessageContent, generateWAMessage, prepareWAMessageMedia, areJidsSameUser, getContentType, WAFlag } = require('@adiwajshing/baileys') +const zMiku = require("@adiwajshing/baileys") +const fs = require('fs') +const util = require('util') +const chalk = require('chalk') +const { exec, spawn, execSync } = require("child_process") +const axios = require('axios') +const { Sticker, createSticker, StickerTypes } = require('wa-sticker-formatter') +const path = require('path') +const os = require('os') +const { AnimeWallpaper } = require("anime-wallpaper") + const { TiktokDownloader } = require('./lib/tiktokdl') +const moment = require('moment-timezone') +const { JSDOM } = require('jsdom') +const speed = require('performance-now') +const hx = require("hxz-api") +const hxz = require('./lib/hxz-api') +const bdr = require('rumus-bdr') +const yogipw = require("tod-api") +const { color, bgcolor } = require('./lib/color') +const thiccysapi = require('textmaker-thiccy') +const toHur = require('@develoka/angka-terbilang-js') +const mathjs = require('mathjs') +const { performance } = require('perf_hooks') +const { Primbon } = require('scrape-primbon') +const { EmojiAPI } = require("emoji-api") +const imgbbUploader = require('imgbb-uploader') +const primbon = new Primbon() +const { isLimit, limitAdd, getLimit, giveLimit, addBalance, kurangBalance, getBalance, isGame, gameAdd, givegame, cekGLimit } = require('./lib/limit.js'); +const emoji = new EmojiAPI() +const { smsg, formatp, tanggal, GIFBufferToVideoBuffer, formatDate, getTime, isUrl, sleep, clockString, runtime, fetchJson, getBuffer, jsonformat, format, parseMention, getRandom } = require('./lib/myfunc') +const { aiovideodl } = require('./lib/scraper.js') +const cheerio = require ("cheerio"); +const textpro = require('./lib/textpro') +const { detikNews } = require('./lib/detik') +const { wikiSearch } = require('./lib/wiki.js'); +const { Gempa } = require("./lib/gempa.js"); +const ms = require('ms') + let { covid } = require('./lib/covid.js') +const { jadwaltv }= require('./lib/jadwaltv'); +const { MikuTiktok } = require('./lib/tiktokmikudl'); +const maker = require('mumaker') +const xfarrapi = require('xfarr-api') +const { hentai } = require('./lib/scraper2.js') +let { msgFilter } = require('./lib/antispam') +const { mediafireDl } = require('./lib/mediafire.js') + + +const _ = require('lodash') +const yargs = require('yargs/yargs') +var low +try { + low = require('lowdb') +} catch (e) { + low = require('./lib/lowdb') +} + +const { Low, JSONFile } = low +const mongoDB = require('./lib/mongoDB') +const { + yta, + ytv, + searchResult + } = require('./lib/ytdl') + +let banUser = JSON.parse(fs.readFileSync('./database/banUser.json')); +let banchat = JSON.parse(fs.readFileSync('./database/banChat.json')); +let xeonyaudio = JSON.parse(fs.readFileSync('./Media-Database/audio.json')); + let _limit = JSON.parse(fs.readFileSync('./storage/user/limit.json')); + let _buruan = JSON.parse(fs.readFileSync('./storage/user/bounty.json')); + let _darahOrg = JSON.parse(fs.readFileSync('./storage/user/blood.json')) + + +global.opts = new Object(yargs(process.argv.slice(2)).exitProcess(false).parse()) +global.db = new Low( + /https?:\/\//.test(opts['db'] || '') ? + new cloudDBAdapter(opts['db']) : /mongodb/.test(opts['db']) ? + new mongoDB(opts['db']) : + new JSONFile(`src/database.json`) +) +global.DATABASE = global.db // Backwards Compatibility +global.loadDatabase = async function loadDatabase() { + if (global.db.READ) return new Promise((resolve) => setInterval(function () { (!global.db.READ ? (clearInterval(this), resolve(global.db.data == null ? global.loadDatabase() : global.db.data)) : null) }, 1 * 1000)) + if (global.db.data !== null) return + global.db.READ = true + await global.db.read() + global.db.READ = false + global.db.data = { + users: {}, + chats: {}, + database: {}, + game: {}, + settings: {}, + others: {}, + sticker: {}, + ...(global.db.data || {}) + } + global.db.chain = _.chain(global.db.data) +} +loadDatabase() +global.db = JSON.parse(fs.readFileSync('./src/database.json')) +if (global.db) global.db = { + sticker: {}, + database: {}, + game: {}, + others: {}, + users: {}, + ...(global.db || {}) +} + +let lolkey = global.lolhuman +let tebaklagu = db.game.tebaklagu = [] +let _family100 = db.game.family100 = [] +let kuismath = db.game.math = [] +let tebakgambar = db.game.tebakgambar = [] +let tebakkata = db.game.tebakkata = [] +let caklontong = db.game.lontong = [] +let caklontong_desk = db.game.lontong_desk = [] +let tebakkalimat = db.game.kalimat = [] +let tebaklirik = db.game.lirik = [] +let tebaktebakan = db.game.tebakan = [] +let vote = db.others.vote = [] + +let pendaftar = JSON.parse(fs.readFileSync('./storage/user/user.json')) +let balance = JSON.parse(fs.readFileSync('./database/balance.json')) +let ssewa = JSON.parse(fs.readFileSync('./database/sewa.json')) +let ban = JSON.parse(fs.readFileSync('./database/ban.json')) +let autosticker = JSON.parse(fs.readFileSync('./database/autosticker.json')) +const _autostick = JSON.parse(fs.readFileSync('./database/autostickpc.json')) +let _leveling = JSON.parse(fs.readFileSync('./database/leveling.json')) +let _level = JSON.parse(fs.readFileSync('./database/level.json')) +let limit = JSON.parse(fs.readFileSync('./database/limit.json')) +let setik = JSON.parse(fs.readFileSync('./src/sticker.json')) +let vien = JSON.parse(fs.readFileSync('./src/audio.json')) +let imagi = JSON.parse(fs.readFileSync('./src/image.json')) +let videox = JSON.parse(fs.readFileSync('./src/video.json')) +global.db = JSON.parse(fs.readFileSync('./src/database.json')) +let _sewa = require("./lib/sewa"); +const sewa = JSON.parse(fs.readFileSync('./database/sewa.json')) + + +const time = moment.tz('Asia/Kolkata').format('DD/MM HH:mm:ss') +const ucap = moment(Date.now()).tz('Asia/Kolkata').locale('id').format('a') +var buln = ['/01/', '/02/', '/03/', '/04/', '/05/', '/06/', '/07/', '/08/', '/09/', '/10/', '/11/', '/12/']; +var myHari = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; +var tgel = new Date(); +var hri = tgel.getDate(); +var bulnh = tgel.getMonth(); +var thisHari = tgel.getDay(), + thisDaye = myHari[thisHari]; +var yye = tgel.getYear(); +var syear = (yye < 1000) ? yye + 1900 : yye; +const jangwak = (hri + '' + buln[bulnh] + '' + syear) +const janghar = (thisDaye) + +module.exports = Miku = async (Miku, m, chatUpdate, store) => { +try { +var body = (m.mtype === 'conversation') ? m.message.conversation : (m.mtype == 'imageMessage') ? m.message.imageMessage.caption : (m.mtype == 'videoMessage') ? m.message.videoMessage.caption : (m.mtype == 'extendedTextMessage') ? m.message.extendedTextMessage.text : (m.mtype == 'buttonsResponseMessage') ? m.message.buttonsResponseMessage.selectedButtonId : (m.mtype == 'listResponseMessage') ? m.message.listResponseMessage.singleSelectReply.selectedRowId : (m.mtype == 'templateButtonReplyMessage') ? m.message.templateButtonReplyMessage.selectedId : (m.mtype === 'messageContextInfo') ? (m.message.buttonsResponseMessage?.selectedButtonId || m.message.listResponseMessage?.singleSelectReply.selectedRowId || m.text) : '' +var budy = (typeof m.text == 'string' ? m.text : '') +const prefix = global.prefa +const isCmd = body.startsWith(prefix) +const notCmd = body.startsWith('') +const command = isCmd ? body.slice(1).trim().split(' ')[0].toLowerCase() : '' +const args = body.trim().split(/ +/).slice(1) +const pushname = m.pushName || "No Name" +const botNumber = await Miku.decodeJid(Miku.user.id) +const isCreator = [botNumber, ...global.Owner].map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender) +const itsMe = m.sender == botNumber ? true : false +const text = args.join(" ") +const from = m.chat +const quoted = m.quoted ? m.quoted : m +const mime = (quoted.msg || quoted).mimetype || '' +const isMedia = /image|video|sticker|audio/.test(mime) +const messagesD = body.slice(0).trim().split(/ +/).shift().toLowerCase() +const groupMetadata = m.isGroup ? await Miku.groupMetadata(m.chat).catch(e => {}) : '' +const groupName = m.isGroup ? groupMetadata.subject : '' +const participants = m.isGroup ? await groupMetadata.participants : '' +const groupAdmins = m.isGroup ? await participants.filter(v => v.admin !== null).map(v => v.id) : '' +const groupOwner = m.isGroup ? groupMetadata.owner : '' +const isBotAdmins = m.isGroup ? groupAdmins.includes(botNumber) : false +const isAdmins = m.isGroup ? groupAdmins.includes(m.sender) : false +const isUser = pendaftar.includes(m.sender) +const isBan = banUser.includes(m.sender) +const isBanChat = m.isGroup ? banchat.includes(from) : false +const isRakyat = isCreator || global.rkyt.map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender) || false +const AntiLink = m.isGroup ? ntilink.includes(from) : false +const AntiLinkYoutubeVid = m.isGroup ? ntilinkytvid.includes(from) : false +const AntiLinkYoutubeChannel = m.isGroup ? ntilinkytch.includes(from) : false +const AntiLinkInstagram = m.isGroup ? ntilinkig.includes(from) : false +const AntiLinkFacebook = m.isGroup ? ntilinkfb.includes(from) : false +const AntiLinkTiktok = m.isGroup ? ntilinktt.includes(from) : false +const AntiLinkTelegram = m.isGroup ? ntilinktg.includes(from) : false +const AntiLinkTwitter = m.isGroup ? ntilinktwt.includes(from) : false +const AntiLinkAll = m.isGroup ? ntilinkall.includes(from) : false +const antiWame = m.isGroup ? ntwame.includes(from) : false +const antiVirtex = m.isGroup ? ntvirtex.includes(from) : false +const AntiNsfw = m.isGroup ? ntnsfw.includes(from) : false +const isLeveling = m.isGroup ? _leveling.includes(from) : false +autoreadsw = true +const content = JSON.stringify(m.message) +const q = args.join(' ') + +const isQuotedVideo = m.mtype === 'extendedTextMessage' && content.includes('videoMessage') +const isQuotedAudio = m.mtype === 'extendedTextMessage' && content.includes('audioMessage') + + + + +const mongoose = require("mongoose"); + + + + +/////////// - DM chatbot (Delete this part to turn off DM Chat Bot) - ////////////////// +if (!isCmd && !m.isGroup){ + const botreply = await axios.get(`http://api.brainshop.ai/get?bid=167831&key=BFghpAKanUPXcLWQ&uid=[uid]&msg=[${budy}]`) + txt = `${botreply.data.cnt}` + m.reply(txt) + } +////////////////////////////////////////////////////////////////////////////////////// + + +_sewa.expiredCheck(Miku, sewa) + +const reply = (teks) => { + Miku.sendMessage(m.chat, { text: teks},{ quoted: m}) + } + + const replay = (teks) => { + Miku.sendMessage(m.chat, { text: teks}, { quoted: m}) + } + + +function randomNomor(angka){ + return Math.floor(Math.random() * angka) + 1 + } + + +if (m.message) { +addBalance(m.sender, randomNomor(574), balance) +console.log(chalk.black(chalk.bgWhite('[ MESSAGE ]')), chalk.black(chalk.bgGreen(new Date)), chalk.black(chalk.bgBlue(budy || m.mtype)) + '\n' + chalk.magenta('=> From'), chalk.green(pushname), chalk.yellow(m.sender) + '\n' + chalk.blueBright('=> In'), chalk.green(m.isGroup ? pushname : 'Private Chat', m.chat)) + } + + if (isCmd && !isUser){ + pendaftar.push(m.sender) + fs.writeFileSync('./storage/user/user.json', JSON.stringify(pendaftar)) + } + + const getLevelingXp = (userId) => { + let position = false + Object.keys(_level).forEach((i) => { + if (_level[i].jid === userId) { + position = i + } + }) + if (position !== false) { + return _level[position].xp + } + } + + const getLevelingLevel = (userId) => { + let position = false + Object.keys(_level).forEach((i) => { + if (_level[i].jid === userId) { + position = i + } + }) + if (position !== false) { + return _level[position].level + } + } + + const getLevelingId = (userId) => { + let position = false + Object.keys(_level).forEach((i) => { + if (_level[i].jid === userId) { + position = i + } + }) + if (position !== false) { + return _level[position].jid + } + } + + const addLevelingXp = (userId, amount) => { + let position = false + Object.keys(_level).forEach((i) => { + if (_level[i].jid === userId) { + position = i + } + }) + if (position !== false) { + _level[position].xp += amount + fs.writeFileSync('./database/level.json', JSON.stringify(_level)) + } + } + + const addLevelingLevel = (userId, amount) => { + let position = false + Object.keys(_level).forEach((i) => { + if (_level[i].jid === userId) { + position = i + } + }) + if (position !== false) { + _level[position].level += amount + fs.writeFileSync('./database/level.json', JSON.stringify(_level)) + } + } + + const addLevelingId = (userId) => { + const obj = {jid: userId, xp: 1, level: 1} + _level.push(obj) + fs.writeFileSync('./database/level.json', JSON.stringify(_level)) + } + + const getUserRank = (userId) => { + let position = null + let found = false + _level.sort((a, b) => (a.xp < b.xp) ? 1 : -1) + Object.keys(_level).forEach((i) => { + if (_level[i].id === userId) { + position = i + found = true + } + }) + if (found === false && position === null) { + const obj = { id: userId, xp: 0, level: 1 } + _level.push(obj) + fs.writeFileSync('./database/level.json', JSON.stringify(_level)) + return 99 + } else { + return position + 1 + } +} + +const xpGain = new Set() + +const isGained = (userId) => { + return !!xpGain.has(userId) +} + +const addCooldown = (userId) => { + xpGain.add(userId) + setTimeout(() => { + return xpGain.delete(userId) + }, 60000) +} + +var levelRole = getLevelingLevel(m.sender) + var role = 'Copper V' + if (levelRole <= 5) { + role = 'Copper IV' + } else if (levelRole <= 10) { + role = 'Copper III' + } else if (levelRole <= 15) { + role = 'Copper II' + } else if (levelRole <= 20) { + role = 'Copper I' + } else if (levelRole <= 25) { + role = 'Silver V' + } else if (levelRole <= 30) { + role = 'Silver IV' + } else if (levelRole <= 35) { + role = 'Silver III' + } else if (levelRole <= 40) { + role = 'Silver II' + } else if (levelRole <= 45) { + role = 'Silver I' + } else if (levelRole <= 50) { + role = 'Gold V' + } else if (levelRole <= 55) { + role = 'Gold IV' + } else if (levelRole <= 60) { + role = 'Gold III' + } else if (levelRole <= 65) { + role = 'Gold II' + } else if (levelRole <= 70) { + role = 'Gold I' + } else if (levelRole <= 75) { + role = 'Platinum V' + } else if (levelRole <= 80) { + role = 'Platinum IV' + } else if (levelRole <= 85) { + role = 'Platinum III' + } else if (levelRole <= 90) { + role = 'Platinum II' + } else if (levelRole <= 95) { + role = 'Platinum I' + } else if (levelRole < 100) { + role = 'Exterminator' + } + + var levelRoles = getLevelingLevel(m.sender) + var roles = 'Cop V' + if (levelRoles <= 5) { + roles = 'Cop IV' + } else if (levelRoles <= 10) { + roles = 'Cop III' + } else if (levelRoles <= 15) { + roles = 'Cop II' + } else if (levelRoles <= 20) { + roles = 'Cop I' + } else if (levelRoles <= 25) { + roles = 'Sil V' + } else if (levelRoles <= 30) { + roles = 'Sil IV' + } else if (levelRoles <= 35) { + roles = 'Sil III' + } else if (levelRoles <= 40) { + roles = 'Sil II' + } else if (levelRoles <= 45) { + roles = 'Sil I' + } else if (levelRoles <= 50) { + roles = 'Gol V' + } else if (levelRoles <= 55) { + roles = 'Gol IV' + } else if (levelRoles <= 60) { + roles = 'Gol III' + } else if (levelRoles <= 65) { + roles = 'Gol II' + } else if (levelRoles <= 70) { + roles = 'Gol I' + } else if (levelRoles <= 75) { + roles = 'Plat V' + } else if (levelRoles <= 80) { + roles = 'Plat IV' + } else if (levelRoles <= 85) { + roles = 'Plat III' + } else if (levelRoles <= 90) { + roles = 'Plat II' + } else if (levelRoles <= 95) { + roles = 'Plati I' + } else if (levelRoles < 100) { + roles = 'Exter' + } + + if (m.isGroup && isLeveling && isUser && Miku.public) { + const currentLevel = getLevelingLevel(m.sender) + const checkId = getLevelingId(m.sender) + try { + addCooldown(m.sender) + if (currentLevel === undefined && checkId === undefined) addLevelingId(m.sender) + const amountXp = Math.floor(Math.random() * 10) + 200 + const requiredXp = 200 * (Math.pow(2, currentLevel) - 1) + const getLevel = getLevelingLevel(m.sender) + addLevelingXp(m.sender, amountXp) + if (requiredXp <= getLevelingXp(m.sender)) { + addLevelingLevel(m.sender, 1) +teks = `「 *User Level UP* 」\n\n@${m.sender.split("@")[0]} got leveled up!!\n\n*User XP*: ${getLevelingXp(m.sender)}\n*Level*: ${getLevel} .> ${getLevelingLevel(m.sender)}\n*Role*: ${role} \n\n` +Miku.sendMessage(m.chat, {text: teks, mentions:[m.sender]}, {quoted:m}) +} + + } catch (err) { + console.error("❌ An error occured !") + } + } + if (prefix && command) { + const currentLevel = getLevelingLevel(m.sender) + const checkId = getLevelingId(m.sender) + try { + + if (currentLevel === undefined && checkId === undefined) addLevelingId(m.sender) + const amountXp = Math.floor(Math.random() * 10) + 30 + const requiredXp = 30 * (Math.pow(2, currentLevel) - 1) + const getLevel = getLevelingLevel(m.sender) + addLevelingXp(m.sender, amountXp) + if (requiredXp <= getLevelingXp(m.sender)) { + addLevelingLevel(m.sender, 1) + } + + } catch (err) { + console.error("❌ An error occured !") + } + } + +if (autoreadsw) { + if (from === 'status@broadcast') { + Miku.chatRead(from) + } + } + +if (global.autoreadpmngc) { +if (command) { +await Miku.sendPresenceUpdate('composing', m.chat) +Miku.sendReadReceipt(from, m.sender, [m.key.id])} +} +/* + if (global.autoReadGc) { + if (m.isGroup) { Miku.sendReadReceipt(m.chat, m.sender, [m.key.id]) } +} +*/ + + if (global.autoReadAll) { if (m.chat) { Miku.sendReadReceipt(m.chat, m.sender, [m.key.id]) } + } + + if (global.autoRecord) { if (m.chat) { Miku.sendPresenceUpdate('recording', m.chat) } +} + + if (global.autoTyping) { if (m.chat) { Miku.sendPresenceUpdate('composing', m.chat) } +} + + if (global.available) { if (m.chat) { Miku.sendPresenceUpdate('available', m.chat) } + } + +const hariRaya = new Date('6 1, 2022 00:00:00') + const sekarang = new Date().getTime(); + const Selisih = hariRaya - sekarang; + const jhari = Math.floor( Selisih / (1000 * 60 * 60 * 24)); + const jjam = Math.floor( Selisih % (1000 * 60 * 60 * 24) / (1000 * 60 * 60)) + const mmmenit = Math.floor( Selisih % (1000 * 60 * 60) / (1000 * 60)); + const ddetik = Math.floor( Selisih % (1000 * 60) / 1000); + const ultah = `${jhari}Day ${jjam}Hour ${mmmenit}Minute ${ddetik}Second` + +async function hitungmundur(bulan, tanggal) { + let from = new Date(`${bulan} ${tanggal}, 2022 00:00:00`).getTime(); + let now = Date.now(); + let distance = from - now; + let days = Math.floor(distance / (1000 * 60 * 60 * 24)); + let hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + let minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); + let seconds = Math.floor((distance % (1000 * 60)) / 1000); + return days + "Day " + hours + "Hour " + minutes + "Minute " + seconds + "Second" + } +try { +let isNumber = x => typeof x === 'number' && !isNaN(x) +let limitUser = isRakyat ? global.limitawal.rakyat : global.limitawal.free +let user = global.db.users[m.sender] +if (typeof user !== 'object') global.db.users[m.sender] = {} +if (user) { +if (!isNumber(user.afkTime)) user.afkTime = -1 +if (!('afkReason' in user)) user.afkReason = '' +if (!isNumber(user.limit)) user.limit = limitUser +} else global.db.users[m.sender] = { +afkTime: -1, +afkReason: '', +limit: limitUser, +} + let setting = global.db.data.settings[botNumber] + if (typeof setting !== 'object') global.db.data.settings[botNumber] = {} + if (setting) { + if (!isNumber(setting.status)) setting.status = 0 + if (!('autobio' in setting)) setting.autobio = false + if (!('templateImage' in setting)) setting.templateImage = false + if (!('templateGif' in setting)) setting.templateGif = false + if (!('templateMsg' in setting)) setting.templateMsg = false + if (!('templateDocument' in setting)) setting.templateDocument = true + } else global.db.data.settings[botNumber] = { + status: 0, + autobio: false, + templateImage: false, + templateGif: false, + templateMsg: false, + templateDocument: true, + } +} catch (err) { +console.error(err) +} + +const sendOrder = async(jid, text, orid, img, itcount, title, sellers, tokens, ammount) => { +const order = generateWAMessageFromContent(jid, proto.Message.fromObject({ + "orderMessage": { +"orderId": orid, +"thumbnail": img, +"itemCount": itcount, +"status": "INQUIRY", +"surface": "CATALOG", +"orderTitle": title, +"message": text, +"sellerJid": sellers, +"token": tokens, +"totalAmount1000": ammount, +"totalCurrencyCode": "IDR", +} +}), { userJid: jid }) +Miku.relayMessage(jid, order.message, { messageId: order.key.id}) +} + + +const { +addInventoriDarah, +cekDuluJoinAdaApaKagaDiJson, +addDarah, +kurangDarah, +getDarah +} = require('./storage/user/blood.js') +const { +cekInventoryAdaAtauGak, +addInventori, +addBesi, +addEmas, +addEmerald, +addUmpan, +addPotion, +kurangBesi, +kurangEmas, +kurangEmerald, +kurangUmpan, +kurangPotion, +getBesi, +getEmas, +getEmerald, +getUmpan, +getPotion +} = require('./storage/user/exchange.js') +const { +addInventoriMonay, +cekDuluJoinAdaApaKagaMonaynyaDiJson, +addMonay, +kurangMonay, +getMonay +} = require('./storage/user/money.js') +const { +addInventoriLimit, +cekDuluJoinAdaApaKagaLimitnyaDiJson, +addLimit, +kurangLimit, +getLimit +} = require('./storage/user/limit.js') +const { +cekDuluHasilBuruanNya, +addInventoriBuruan, +addIkan, +addAyam, +addKelinci, +addDomba, +addSapi, +addGajah, +kurangIkan, +kurangAyam, +kurangKelinci, +kurangDomba, +kurangSapi, +kurangGajah, +getIkan, +getAyam, +getKelinci, +getDomba, +getSapi, +getGajah +} = require('./storage/user/prey.js') +let DarahAwal = global.rpg.darahawal +const isDarah = cekDuluJoinAdaApaKagaDiJson(m.sender) +const isCekDarah = getDarah(m.sender) +const isUmpan = getUmpan(m.sender) +const isPotion = getPotion(m.sender) +const isIkan = getIkan(m.sender) +const isAyam = getAyam(m.sender) +const isKelinci = getKelinci(m.sender) +const isDomba = getDomba(m.sender) +const isSapi = getSapi(m.sender) +const isGajah = getGajah(m.sender) +const isMonay = getMonay(m.sender) +const isLimit = getLimit(m.sender) +const isBesi = getBesi(m.sender) +const isEmas = getEmas(m.sender) +const isEmerald = getEmerald(m.sender) +const isInventory = cekInventoryAdaAtauGak(m.sender) +const isInventoriBuruan = cekDuluHasilBuruanNya(m.sender) +const isInventoryLimit = cekDuluJoinAdaApaKagaLimitnyaDiJson(m.sender) +const isInventoryMonay = cekDuluJoinAdaApaKagaMonaynyaDiJson(m.sender) +const ikan = ['🐟','🐠','🐡'] + + + + let picaks = [flaming,fluming,flarun,flasmurf] + let picak = picaks[Math.floor(Math.random() * picaks.length)] + +if (!isRakyat) { +rkyt.push(m.sender.split("@")[0]) +} + +global.hit = {} +if (isCmd) { +data = await fetchJson('https://api.countapi.xyz/hit/CheemsBot/visits') +jumlahcmd = `${data.value}` +dataa = await fetchJson(`https://api.countapi.xyz/hit/CheemsBot${moment.tz('Asia/Kolkata').format('DDMMYYYY')}/visits`) +jumlahharian = `${dataa.value}` +} + + +let mentionUser = [...new Set([...(m.mentionedJid || []), ...(m.quoted ? [m.quoted.sender] : [])])] +for (let jid of mentionUser) { +let user = global.db.users[jid] +if (!user) continue +let afkTime = user.afkTime +if (!afkTime || afkTime < 0) continue +let reason = user.afkReason || '' +reply(` +متعملش ريب عليه لانه في وضع الاختفاء الان ${reason ? 'السبب ' + reason : 'بدون سبب'} +مده الغياب ${clockString(new Date - afkTime)} +`.trim()) +} + +if (db.users[m.sender].afkTime > -1) { +let user = global.db.users[m.sender] +reply(` +منور لقد عدت ${user.afkReason ? ' السبب ' + user.afkReason : ''} +مده الغياب ${clockString(new Date - user.afkTime)} +`.trim()) +user.afkTime = -1 +user.afkReason = '' +} + + +if (m.mtype === 'groupInviteMessage') { +teks = `I can't join the group untill my *Owner* ask me to join. Type *-owner* to get owner number and ask him.` +sendOrder(m.chat, teks, "5123658817728409", fs.readFileSync('./Assets/pic10.jpg'), `${watermark}`, `${BotName}`, "916909137213@s.whatsapp.net", "AR7zJt8MasFx2Uir/fdxhkhPGDbswfWrAr2gmoyqNZ/0Wg==", "99999999999999999999") +} + + +if (AntiLink) { + linkgce = await Miku.groupInviteCode(from) + if (budy.includes(`https://chat.whatsapp.com/${linkgce}`)) { + reply(`\`\`\`「 Antilink System 」\`\`\`\n\nNo action will be because you sent this group's link.`) + } else if (isUrl(m.text)) { + bvl = `\`\`\`「 *Antilink System* 」\`\`\`\n\nAdmin has sent a link so no action is taken.` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove').then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err))) + Miku.sendMessage(from, {text:`\`\`\`「 Antilink System 」\`\`\`\n\n@${kice.split("@")[0]} Baka Has been removed for sending link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + } + + if (antiWame) + if (budy.includes(`wa.me`)) { + if (!isBotAdmins) return + bvl = `\`\`\`「 _'wa.me' PM link Detected!_ 」\`\`\`\n\nLink sent by Admin so no action is taken!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 'wa.me' PM link Detected! 」\`\`\`\n\n@${kice.split("@")[0]} Baka Has been removed for sending link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + if (antiWame) + if (budy.includes(`http://wa.me`)) { +if (!isBotAdmins) return +bvl = `\`\`\`「 'wa.me' PM link Detected! 」\`\`\`\n\nLink sent by Admin so no action is taken!` +if (isAdmins) return reply(bvl) +if (m.key.fromMe) return reply(bvl) +if (isCreator) return reply(bvl) +kice = m.sender +await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') +Miku.sendMessage(from, {text:`\`\`\`「 'wa.me' PM link Detected! 」\`\`\`\n\n@${kice.split("@")[0]} Baka Has been removed for sending link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) +} else { +} + +if (antiVirtex) { + if (budy.length > 3500) { + reply(`*Caution!*\n\n`.repeat(300)) + reply(`\`\`\`Virus Detected !!\`\`\`\n\nRevoving sender...`) + if (!isBotAdmins) return reply(mess.botAdmin) + Miku.groupParticipantsUpdate(m.chat, [m.sender], 'remove') + } + } + + + if (AntiLink) { + if (!isBotAdmins) return + linkgce = await Miku.groupInviteCode(from) + if (budy.includes(`https://chat.whatsapp.com/${linkgce}`)) { + reply(`\`\`\`「 Antilink System 」\`\`\`\n\nNo action will be taken because you sent this group's link!`) + } else if (isUrl(m.text)) { + bvl = `\`\`\`「 Antilink System 」\`\`\`\n\nAdmin has sent a group link so no action will be taken!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 Antilink System 」\`\`\`\n\n@${kice.split("@")[0]} Baka has been removed for sending link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + } + + + if (AntiLinkYoutubeVid) + if (budy.includes("https://youtu.be/")){ + if (!isBotAdmins) return + bvl = `\`\`\`「 Antilink System 」」\`\`\`\n\nLink sent by Admin so no action will be taken!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 Antilink System 」\`\`\`\n\n@${kice.split("@")[0]} Baka has been removed for sending Yt video link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + + if (AntiLinkYoutubeChannel) + if (budy.includes("https://youtube.com/")){ + if (!isBotAdmins) return + bvl = `\`\`\`「 Antilink System 」\`\`\`\n\nLink sent by Admin so no action will be taken!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 Antilink System 」\`\`\`\n\n@${kice.split("@")[0]} Baka has been removed for sending Yt channel link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + + if (AntiLinkInstagram) + if (budy.includes("https://www.instagram.com/")){ + if (!isBotAdmins) return + bvl = `\`\`\`「 Antilink System 」\`\`\`\n\nLink sent by Admin so no action will be taken!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 Antilink System 」\`\`\`\n\n@${kice.split("@")[0]} Baka has been removed for sending Instagram link in this group! No promotion is allowed!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + + if (AntiLinkFacebook) + if (budy.includes("https://facebook.com/")){ + if (!isBotAdmins) return + bvl = `\`\`\`「 Antilink System 」\`\`\`\n\nLink sent by Admin so no action will be taken!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 Antilink System 」\`\`\`\n\n@${kice.split("@")[0]} Baka has been removed for sending Facebook link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + + if (AntiLinkTelegram) + if (budy.includes("https://t.me/")){ + if (AntiLinkTelegram) + if (!isBotAdmins) return + bvl = `\`\`\`「 Antilink System 」\`\`\`\n\nLink sent by Admin so no action will be taken!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 Antilink System 」\`\`\`\n\n@${kice.split("@")[0]} Baka has been removed for sending Telegram link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + + if (AntiLinkTiktok) + if (budy.includes("https://www.tiktok.com/")){ + if (!isBotAdmins) return + bvl = `\`\`\`「 Antilink System 」\`\`\`\n\nLink sent by Admin so no action will be taken!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 Antilink System 」\`\`\`\n\n@${kice.split("@")[0]} Baka has been removed for sending Tiktok link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + + if (AntiLinkTwitter) + if (budy.includes("https://twitter.com/")){ + if (!isBotAdmins) return + bvl = `\`\`\`「 Antilink System 」\`\`\`\n\nLink sent by Admin so no action will be taken!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 Antilink System 」\`\`\`\n\n@${kice.split("@")[0]} Baka has been removed for sending Twitter link in this group!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + + if (AntiLinkAll) + if (budy.includes("https://")){ + if (!isBotAdmins) return + bvl = `\`\`\`「 منع الروابط 」\`\`\`\n\nالادمن بعت رابط والادمن يبعت اللي هوا عايزو!` + if (isAdmins) return reply(bvl) + if (m.key.fromMe) return reply(bvl) + if (isCreator) return reply(bvl) + kice = m.sender + await Miku.groupParticipantsUpdate(m.chat, [kice], 'remove') + Miku.sendMessage(from, {text:`\`\`\`「 منع الروابط 」\`\`\`\n\n@${kice.split("@")[0]} تم ازالته لإرسال رابط في الجروب!`, contextInfo:{mentionedJid:[kice]}}, {quoted:m}) + } else { + } + + +if (m.mtype == 'viewOnceMessage') { + if (!db.data.chats[m.chat].antionce) return + teks = `「 *Anti ViewOnce Message* 」 +${themeemoji} Name : ${m.pushName} +${themeemoji} User : @${m.sender.split("@")[0]} +${themeemoji} Clock : ${moment.tz('Asia/Kolkata').format('HH:mm:ss')} +${themeemoji} Date : ${moment.tz('Asia/Kolkata').format('DD/MM/YYYY')} +${themeemoji} MessageType : ${m.mtype}` +Miku.sendTextWithMentions(m.chat, teks, m) +await sleep(500) +m.copyNForward(m.chat, true, { readViewOnce: true }).catch(_ => reply(`Maybe it's been opened by a bot`)) +} + + +if (!Miku.public) { +if (!m.key.fromMe) return +} + + +setInterval(() => { +fs.writeFileSync('./src/database.json', JSON.stringify(global.db, null, 2)) +}, 60 * 1000) + +// reset limit every 12 hours +let cron = require('node-cron') + cron.schedule('00 12 * * *', () => { + let user = Object.keys(global.db.users) + let limitUser = isRakyat ? global.limitawal.rakyat : global.limitawal.free + for (let jid of user) global.db.users[jid].limit = limitUser + console.log('Reseted Limit') + }, { + scheduled: true, + timezone: "Asia/Kolkata" + }) + + if (tebaklagu.hasOwnProperty(m.sender.split('@')[0]) && isCmd) { + kuis = true + jawaban = tebaklagu[m.sender.split('@')[0]] + if (budy.toLowerCase() == jawaban) { + await Miku.sendButtonText(m.chat, [{ buttonId: 'guess song', buttonText: { displayText: 'Guess The Song' }, type: 1 }], `🎮 Guess The Song 🎮\n\nCorrect answer 🎉\n\nWant to play again? press the button below`, `${global.BotName}`, m) + delete tebaklagu[m.sender.split('@')[0]] + } else reply('*Wrong answer!*') + } + + if (tebakgambar.hasOwnProperty(m.sender.split('@')[0]) && isCmd) { + kuis = true + jawaban = tebakgambar[m.sender.split('@')[0]] + if (budy.toLowerCase() == jawaban) { + await Miku.sendButtonText(m.chat, [{ buttonId: 'guess picture', buttonText: { displayText: 'Guess The Picture' }, type: 1 }], `🎮 Guess The Picture 🎮\n\nCorrect Answer 🎉\n\nWant to play again? press the button below`, `${global.BotName}`, m) + delete tebakgambar[m.sender.split('@')[0]] + } else reply('*Wrong answer!*') + } + + if (tebakkata.hasOwnProperty(m.sender.split('@')[0]) && isCmd) { + kuis = true + jawaban = tebakkata[m.sender.split('@')[0]] + if (budy.toLowerCase() == jawaban) { + await Miku.sendButtonText(m.chat, [{ buttonId: 'guess word', buttonText: { displayText: 'Guess The Word' }, type: 1 }], `🎮 Guess The Word 🎮\n\nCorrect Answer 🎉\n\nWant to play again? press the button below`, `${global.BotName}`, m) + delete tebakkata[m.sender.split('@')[0]] + } else reply('*Wrong answer!*') + } + + if (caklontong.hasOwnProperty(m.sender.split('@')[0]) && isCmd) { + kuis = true + jawaban = caklontong[m.sender.split('@')[0]] + deskripsi = caklontong_desk[m.sender.split('@')[0]] + if (budy.toLowerCase() == jawaban) { + await Miku.sendButtonText(m.chat, [{ buttonId: 'guess saying', buttonText: { displayText: 'Guess The Saying' }, type: 1 }], `🎮 Guess The Saying 🎮\n\nCorrect Answer 🎉\n*${deskripsi}*\n\nWant to play again? press the button below`, `${global.BotName}`, m) + delete caklontong[m.sender.split('@')[0]] + delete caklontong_desk[m.sender.split('@')[0]] + } else reply('*Wrong answer!*') + } + + if (tebakkalimat.hasOwnProperty(m.sender.split('@')[0]) && isCmd) { + kuis = true + jawaban = tebakkalimat[m.sender.split('@')[0]] + if (budy.toLowerCase() == jawaban) { + await Miku.sendButtonText(m.chat, [{ buttonId: 'guess sentence', buttonText: { displayText: 'Guess The Sentence' }, type: 1 }], `🎮 Guess The Sentence 🎮\n\nCorrect Answer 🎉\n\nWant to play again? press the button below`, `${global.BotName}`, m) + delete tebakkalimat[m.sender.split('@')[0]] + } else reply('*Wrong answer!*') + } + + if (tebaklirik.hasOwnProperty(m.sender.split('@')[0]) && isCmd) { + kuis = true + jawaban = tebaklirik[m.sender.split('@')[0]] + if (budy.toLowerCase() == jawaban) { + await Miku.sendButtonText(m.chat, [{ buttonId: 'guess lyrics', buttonText: { displayText: 'Guess The Lyrics' }, type: 1 }], `🎮 Guess The Lyrics 🎮\n\nCorrect Answer 🎉\n\nWant to play again? press the button below`, `${global.BotName}`, m) + delete tebaklirik[m.sender.split('@')[0]] + } else reply('*Wrong answer!*') + } + + if (tebaktebakan.hasOwnProperty(m.sender.split('@')[0]) && isCmd) { + kuis = true + jawaban = tebaktebakan[m.sender.split('@')[0]] + if (budy.toLowerCase() == jawaban) { + await Miku.sendButtonText(m.chat, [{ buttonId: 'riddles', buttonText: { displayText: 'Riddles' }, type: 1 }], `🎮 Riddles 🎮\n\nCorrect Answer 🎉\n\nWant to play again? press the button below`, `${global.BotName}`, m) + delete tebaktebakan[m.sender.split('@')[0]] + } else reply('*Wrong answer!*') + } + + if (('family100'+m.chat in _family100) && isCmd) { + kuis = true + let room = _family100['family100'+m.chat] + let teks = budy.toLowerCase().replace(/[^\w\s\-]+/, '') + let isSurender = /^((me)?give up|surr?ender|surrender)$/i.test(m.text) + if (!isSurender) { + let index = room.jawaban.findIndex(v => v.toLowerCase().replace(/[^\w\s\-]+/, '') === teks) + if (room.terjawab[index]) return !0 + room.terjawab[index] = m.sender + } + let isWin = room.terjawab.length === room.terjawab.filter(v => v).length + let caption = ` + Answer the following questions :\n${room.soal}\n\n\nThere is ${room.jawaban.length} Answer ${room.jawaban.find(v => v.includes(' ')) ? `(some answers have spaces)` : ''} + ${isWin ? `All Answers Answered` : isSurender ? 'Surrender!' : ''} + ${Array.from(room.jawaban, (jawaban, index) => { + return isSurender || room.terjawab[index] ? `(${index + 1}) ${jawaban} ${room.terjawab[index] ? '@' + room.terjawab[index].split('@')[0] : ''}`.trim() : false + }).filter(v => v).join('\n')} + ${isSurender ? '' : `Perfect Player`}`.trim() + Miku.sendText(m.chat, caption, m, { contextInfo: { mentionedJid: parseMention(caption) }}).then(mes => { return _family100['family100'+m.chat].pesan = mesg }).catch(_ => _) + if (isWin || isSurender) delete _family100['family100'+m.chat] + } + + + this.suit = this.suit ? this.suit : {} + let roof = Object.values(this.suit).find(roof => roof.id && roof.status && [roof.p, roof.p2].includes(m.sender)) + if (roof) { + let win = '' + let tie = false + if (m.sender == roof.p2 && /^(acc(ept)?|accept|yes|oke?|reject|dont want|later|no(pe)?can|y)/i.test(m.text) && m.isGroup && roof.status == 'wait') { + if (/^(reject|dont want|later|n|no(pe)?can)/i.test(m.text)) { + Miku.sendTextWithMentions(m.chat, `@${roof.p2.split`@`[0]} rejected the suit, the suit is canceled`, m) + delete this.suit[roof.id] + return !0 + } + roof.status = 'play' + roof.asal = m.chat + clearTimeout(roof.waktu) + + Miku.sendText(m.chat, `Suit has been sent to chat + @${roof.p.split`@`[0]} dan + @${roof.p2.split`@`[0]} + + Please choose a suit in the respective chat" + Click https://wa.me/${botNumber.split`@`[0]}`, m, { mentions: [roof.p, roof.p2] }) + if (!roof.pilih) Miku.sendText(roof.p, `Please select \n\nRock🗿\nPaper📄\nScissors✂️`, m) + if (!roof.pilih2) Miku.sendText(roof.p2, `Please select \n\nRock🗿\nPaper📄\nScissors✂️`, m) + roof.waktu_milih = setTimeout(() => { + if (!roof.pilih && !roof.pilih2) Miku.sendText(m.chat, `Both players don't want to play,\nSuit canceled`) + else if (!roof.pilih || !roof.pilih2) { + win = !roof.pilih ? roof.p2 : roof.p + Miku.sendTextWithMentions(m.chat, `@${(roof.pilih ? roof.p2 : roof.p).split`@`[0]} don't choose suit, game over`, m) + } + delete this.suit[roof.id] + return !0 + }, roof.timeout) + } + let jwb = m.sender == roof.p + let jwb2 = m.sender == roof.p2 + let g = /scissors/i + let b = /rock/i + let k = /paper/i + let reg = /^(scissors|rock|paper)/i + if (jwb && reg.test(m.text) && !roof.pilih && !m.isGroup) { + roof.pilih = reg.exec(m.text.toLowerCase())[0] + roof.text = m.text + reply(`You have chosen ${m.text} ${!roof.pilih2 ? `\n\nWaiting for the opponent to choose` : ''}`) + if (!roof.pilih2) Miku.sendText(roof.p2, '_The opponent has chosen_\nNow it is your turn', 0) + } + if (jwb2 && reg.test(m.text) && !roof.pilih2 && !m.isGroup) { + roof.pilih2 = reg.exec(m.text.toLowerCase())[0] + roof.text2 = m.text + reply(`You have chosen ${m.text} ${!roof.pilih ? `\n\nWaiting for the opponent to choose` : ''}`) + if (!roof.pilih) Miku.sendText(roof.p, '_The opponent has chosen_\nNow it is your turn', 0) + } + let stage = roof.pilih + let stage2 = roof.pilih2 + + if (roof.pilih && roof.pilih2) { + clearTimeout(roof.waktu_milih) + if (b.test(stage) && g.test(stage2)) win = roof.p + else if (b.test(stage) && k.test(stage2)) win = roof.p2 + else if (g.test(stage) && k.test(stage2)) win = roof.p + else if (g.test(stage) && b.test(stage2)) win = roof.p2 + else if (k.test(stage) && b.test(stage2)) win = roof.p + else if (k.test(stage) && g.test(stage2)) win = roof.p2 + else if (stage == stage2) tie = true + Miku.sendText(roof.asal, `_*Suit Results*_${tie ? '\nSERIES' : ''} + @${roof.p.split`@`[0]} (${roof.text}) ${tie ? '' : roof.p == win ? ` Win \n` : ` Lost \n`} + @${roof.p2.split`@`[0]} (${roof.text2}) ${tie ? '' : roof.p2 == win ? ` Win \n` : ` Lost \n`} + `.trim(), m, { mentions: [roof.p, roof.p2] }) + delete this.suit[roof.id] + } + } + + async function cerpen (category) { + return new Promise((resolve, reject) => { + let title = category.toLowerCase().replace(/[()*]/g, "") + let judul = title.replace(/\s/g, ".") + let page = Math.floor(Math.random() * 5) + axios.get('http://cerpenmu.com/category/cerpen-'+judul+'/page/'+page) + .then((get) => { + let $ = cheerio.load(get.data) + let link = [] + $('article.post').each(function (a, b) { + link.push($(b).find('a').attr('href')) + }) + let random = link[Math.floor(Math.random() * link.length)] + axios.get(random) + .then((res) => { + let $$ = cheerio.load(res.data) + let hasil = { + title: $$('#content > article > h1').text(), + author: $$('#content > article').text().split('Short Story: ')[1].split('Category: ')[0], + kategori: $$('#content > article').text().split('Category: ')[1].split('\n')[0], + lolos: $$('#content > article').text().split('Passed moderation on: ')[1].split('\n')[0], + cerita: $$('#content > article > p').text() + } + resolve(hasil) + }) + }) + }) + } + + if (kuismath.hasOwnProperty(m.sender.split('@')[0]) && isCmd) { + kuis = true + jawaban = kuismath[m.sender.split('@')[0]] + if (budy.toLowerCase() == jawaban) { + await reply(`「 *Math Quiz* 」\n\n 🎉 Correct Answer 🎉\n\nWant to play again? send ${prefix}math mode`) + delete kuismath[m.sender.split('@')[0]] + } else reply('*Wrong answer!*') + } + + if (isMedia && m.msg.fileSha256 && (m.msg.fileSha256.toString('base64') in global.db.sticker)) { + let hash = global.db.sticker[m.msg.fileSha256.toString('base64')] + let { text, mentionedJid } = hash + let messages = await generateWAMessage(m.chat, { text: text, mentions: mentionedJid }, { + userJid: Miku.user.id, + quoted: m.quoted && m.quoted.fakeObj + }) + messages.key.fromMe = areJidsSameUser(m.sender, Miku.user.id) + messages.key.id = m.key.id + messages.pushName = m.pushName + if (m.isGroup) messages.participant = m.sender + let msg = { + ...chatUpdate, + messages: [proto.WebMessageInfo.fromObject(messages)], + type: 'append' + } + Miku.ev.emit('messages.upsert', msg) + } + + + + const textImg = (teks) => { + Miku.sendMessage(m.chat, { text :teks, }, {quoted: m, thumbnail: fs.readFileSync('./Assets/pic4.jpg')}) + } + + + + const ftoko = { + key: { + fromMe: false, + participant: `0@s.whatsapp.net`, ...(from ? { remoteJid: "16505434800@s.whatsapp.net" } : {}) + }, + message: { + "productMessage": { + "product": { + "productImage":{ + "mimetype": "image/jpeg", + "jpegThumbnail": BotLogo + }, + "title": `${global.OwnerName}`, + "description": `${global.BotName}`, + "currencyCode": "USD", + "priceAmount1000": "2000", + "retailerId": `${global.WaterMark}`, + "productImageCount": 1 + }, + "businessOwnerJid": `0@s.whatsapp.net` + } + } + } + + const fgi = { + key: { + fromMe: false, + participant: `0@s.whatsapp.net`, ...(from ? + { remoteJid: "916909137213-1613049930@g.us" } : {}) + }, + message: { + "videoMessage": { + "title": `chiku`, + "h": `chiku`, + 'duration': '99999', + 'gifPlayback': 'true', + 'caption': `Ayush`, + 'jpegThumbnail': fs.readFileSync('./Assets/miku.mp4') + } + } + } + +//FAKEREPLY TROLI +const ftroli = { + key : { + participant : '0@s.whatsapp.net' + }, + message: { + orderMessage: { + itemCount : 1, + status: 1, + surface : 1, + message: `${global.OwnerName}`, + orderTitle: `${global.BotName}`, + thumbnail: BotLogo, //Pic + sellerJid: '0@s.whatsapp.net' + + } + } + } + //FAKEREPLY LOCATION + const flokasi = { + key : { + participant : '0@s.whatsapp.net' + }, + message: { + locationMessage: { + name: `${global.location}`, + jpegThumbnail: BotLogo + } + } + } + //FAKEREPLY DOCUMENT + const fdocs = { + key : { + participant : '0@s.whatsapp.net' + }, + message: { + documentMessage: { + title: `${global.BotName}`, + jpegThumbnail: BotLogo + } + } + } + //FAKEREPLY VIDEO + const fvideo = { + key: { + fromMe: false, + participant: `0@s.whatsapp.net`, ...(from ? + { remoteJid: "916909137213-1613049930@g.us" } : {}) + }, + message: { + "videoMessage": { + "title": `${global.BotName}`, + "h": `${global.OwnerName}`, + 'seconds': '30', + 'caption': `${global.WaterMark}`, + 'jpegThumbnail': BotLogo + } + } + } + //FAKEREPLY GROUPINVITE + const fgclink = { + "key": { + "fromMe": false, + "participant": "0@s.whatsapp.net", + "remoteJid": "0@s.whatsapp.net" + }, + "message": { + "groupInviteMessage": { + "groupJid": "916909137213-1616169743@g.us", + "inviteCode": `${global.OwnerName}`, + "groupName": `${global.BotName}`, + "caption":`${global.WaterMark}`, + 'jpegThumbnail': BotLogo + } + } + } + //FAKEREPLY GIF + const fgif = { + key: { + fromMe: false, + participant: `0@s.whatsapp.net`, ...(from ? + { remoteJid: "916909137213-1613049930@g.us" } : {}) + }, + message: { + "videoMessage": { + "title":`${global.BotName}`, + "h": `${global.OwnerName}`, + 'seconds': "30", + 'gifPlayback': 'true', + 'caption': `${global.WaterMark}`, + 'jpegThumbnail': BotLogo + } + } + } + //FAKEREPLY TEXT WITH THUMBNAIL + const ftextt = { + key: { + fromMe: false, + participant: `0@s.whatsapp.net`, ...(from ? + { remoteJid: "916909137213-1613049930@g.us" } : {}) + }, + message: { + "extendedTextMessage": { + "text":`${global.OwnerName}`, + "title": `${global.BotName}`, + 'jpegThumbnail': BotLogo + } + } + } + //FAKEREPLY VN + const fvn = { + key: { + fromMe: false, + participant: `0@s.whatsapp.net`, ...(from ? + { remoteJid: "916909137213-1613049930@g.us" } : {}) + }, + message: { + "audioMessage": { + "mimetype":"audio/ogg; codecs=opus", + "seconds": "9999999999999999", + "ptt": "true" + } + } + } + l = 1 + monospace = '```' + const timestampe = speed(); + const latensie = speed() - timestampe + const levelMenu = getLevelingLevel(m.sender) + const xpMenu = getLevelingXp(m.sender) + const uangku = getBalance(m.sender, balance) + const reqXp = 200 * (Math.pow(2, getLevelingLevel(m.sender)) - 1) + const jumlahUser = pendaftar.length + if (!isDarah){ addInventoriDarah(m.sender, DarahAwal) } + if (!isInventory){ addInventori(m.sender) } + if (!isInventoriBuruan){ addInventoriBuruan(m.sender) } + + + const menulist = ` + 70o0o0da BEH ${pushname} 👋.انا انوس ${global.BotName}, بوت تم تطويري بواسطة: انوس بيه للانتقال باستخدام واتساب إلى المستوى التالي. + + 「 System Info 」 + + Speed : ${latensie.toFixed(4)} miliseconds + Up Time : ${runtime(process.uptime())} + Bot Name : ${global.BotName} + Owner Name : ${global.OwnerName} + 𝗣𝗹𝗮𝘁𝗳𝗼𝗿𝗺 : Amazon AWS + 𝗧𝗼𝘁𝗮𝗹 𝗨𝘀𝗲𝗿 : ${Object.keys(global.db.users).length} + + + 「 User Info 」 + + User Level: ${levelMenu} + User XP : ${xpMenu} \ ${reqXp} + User Role : ${role} + + + 「 User Bank 」 + + User Balance : ${uangku} + Iron : ${getBesi(m.sender)} + Gold : ${getEmas(m.sender)} + Emarald : ${getEmerald(m.sender)} + Potion : ${getPotion(m.sender)} + + + Type *-menu* or press any button below to start using *${global.BotName}* + + ©️ *${global.BotName}* All Rights Reserved by: *Fantox* + ` + const qtod = m.quoted? "true":"false" + + + +function pickRandom(list) { +return list[Math.floor(list.length * Math.random())] +} + +//auto vn reply +for (let anju of xeonyaudio){ + if (budy === anju){ + result = fs.readFileSync(`./Assets/audio/${anju}.mp3`) + Miku.sendMessage(m.chat, { audio: result, mimetype: 'audio/mp4', ptt: true }, { quoted: m }) + } + } - "URL_1NAME": { - "description": "", - "value": "🎊INSTAGRAM🎊" , - "required": true - }, - "URL_1LINK": { - "description": "", - "value": "https://www.instagram.com/__.sanuwa.__/" , - "required": true - }, - "URL_2NAME": { - "description": "", - "value": "💻GITHUB💻" , - "required": true - }, - "URL_2LINK": { - "description": "", - "value": "https://github.com/sanuwaofficial" , - "required": true - }, - "FOOTER": { - "description": "", - "value": "𝙿𝙾𝚆𝙴𝚁𝙴𝙳 𝙱𝚈 𝙰𝚀𝚄𝙰𝙱𝙾𝚃 ²⁰²²" , - "required": true - }, - "ANTI_LINK": { - "description": "", - "value": "false" , - "required": true - }, - "CAPTION": { - "description": "", - "value": "© 𝙶𝙴𝙽𝙴𝚁𝙰𝚃𝙴𝙳 𝙱𝚈 𝙰𝚀𝚄𝙰 ²⁰²²" , - "required": true - }, - "INBOX_BLOCK": { - "description": "", - "value": "false" , - "required": true - }, - "INBOX_BLOCK_MSG": { - "description": "", - "value": "default" , - "required": true - }, - "ALIVE_MESSAGE": { - "description": "", - "value": "default", - "required": true - }, - "ALIVE_LOGO": { - "description": "", - "value": "https://telegra.ph/file/85fe740b2385a55178500.jpg" , - "required": true - }, + +switch(command) { + + case 'sc': case 'التبرع': case 'سكريبت': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + teks = `*${global.BotName}' سكريبت*\n\n*يوتيوب*: ${global.BotSourceCode}\n\nلا تنسي الاشتراك بقناه اليوتيوب⭐️. ` + let buttons = [ + {buttonId: `.menu`, buttonText: {displayText: 'قائمه الاوامر ✨'}, type: 1} + ] + let buttonMessage = { + image: Thumb, + jpegThumbnail: BotLogo , + caption: teks, + footer: `${BotName }`, + buttons: buttons, + headerType: 4, + /*contextInfo:{externalAdReply:{ + title:"Powered by Fantox", + body: " ", + thumbnail: fs.readFileSync("Assets/pic2.jpg"), + mediaType:1, + mediaUrl: 'https://telegra.ph/file/f1a719ad79f830231d984.jpg', + sourceUrl: "https://telegra.ph/file/f1a719ad79f830231d984.jpg" + }}*/ + + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + } + break + + +case 'بروفايل': case 'profile': case 'انا': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!isDarah){ addInventoriDarah(m.sender, DarahAwal) } + if (!isInventory){ addInventori(m.sender) } + if (!isInventoriBuruan){ addInventoriBuruan(m.sender) } + + + var flob = await getBuffer(picak+'User Profile') + var bio= await Miku.fetchStatus(m.sender) + var bioo = bio.status + const adn= isAdmins? "ادمن":"عضو" - "SONG_DOWN": { - "description": "", - "value": "*📥Downloading your song...*" , - "required": true - }, - "SONG_UP": { - "description": "", - "value": "*📤Uploading your song...*" , - "required": true - }, - "VIDEO_DOWN": { - "description": "", - "value": "*📥Downloading your video...*" , - "required": true - }, - "VIDEO_UP": { - "description": "", - "value": "*📤Uploading your video...*" , - "required": true - }, - "FILE_DOWN": { - "description": "", - "value": "*📥Downloading your file...*" , - "required": true - }, - "FILE_UP": { - "description": "", - "value": "*📤Uploading your file...*" , - "required": true - }, - "STIC_WM": { - "description": "", - "value": "⛲αqυα ⃨𝚋oƚ ࿐" , - "required": true - }, - "WORK_TYPE": { - "description": "", - "value": "public" , - "required": true - }, - "SUDO": { - "description": "", - "value": "" , - "required": false - }, - "LANGUAGE": { - "description": "", - "value": "EN" , - "required": true - }, - "HEROKU": { - "description": "", - "value": "true" , - "required": true - }, - "HEROKU_API_KEY": { - "description": "", - "value": "" , - "required": true - }, - "HEROKU_APP_NAME": { - "description": "", - "value": "" , - "required": true - }, - "BAN_MESSAGE": { - "description": "", - "value": "default" , - "required": true - }, - "ADD_MESSAGE": { - "description": "", - "value": "default" , - "required": true - }, - "PROMOTE_MESSAGE": { - "description": "", - "value": "default" , - "required": true - }, - "DEMOTE_MESSAGE": { - "description": "", - "value": "default" , - "required": true - }, - "MUTE_MESSAGE": { - "description": "", - "value": "default" , - "required": true - }, - "UNMUTE_MESSAGE": { - "description": "", - "value": "default" , - "required": true - }, - "KICKME_MESSAGE": { - "description": "", - "value": "default" , - "required": true - } + try { - }, - "addons": [{ - "plan": "heroku-postgresql" - }], - "buildpacks": [{ - "url": "heroku-community/apt" - }] + pfp=await Miku.profilePictureUrl(m.sender, 'image') + + } catch (e) { + + pfp ='https://telegra.ph/file/f1a719ad79f830231d984.jpg' + } + + const profilexx = `*『 صورتك قمر زيك يروحي🥺♥✨ 』*\n\n*المنشن*: ${pushname}\n*البايو*: ${bioo}\n*حالتك في الجروب?*: ${adn}\n*لفل* : ${levelMenu}\n*اكس بي* : ${xpMenu}*مستمر ل* ${reqXp}\n*مستوي* : ${role}` + + + +let buttonspro = [ + {buttonId: `.soulmate`, buttonText: {displayText: 'توأم روحك'}, type: 1} + ] + let buttonMessage = { + image: { url: pfp }, + caption: profilexx, + footer: `${BotName}`, + buttons: buttonspro, + headerType: 4 + } + Miku.sendMessage(m.chat,buttonMessage,{quoted:m}) + + break + + +case 'بان': case 'bangroup':{ +if (isBan) return reply(mess.banned) +if (!isCreator) return replay(mess.botowner) +if (args[0] === "on") { +if (isBanChat) return replay('هذه المجموعة ممنوعة بالفعل من استخدامي!') +banchat.push(from) +replay('تم منع هذه المجموعة من استخدامي!!') +var groupe = await Miku.groupMetadata(from) +var members = groupe['participants'] +var mems = [] +members.map(async adm => { +mems.push(adm.id.replace('c.us', 's.whatsapp.net')) +}) +Miku.sendMessage(from, {text: `\`\`\`「 ملاحظه 」\`\`\`\n\nهذه المجموعة ممنوعة من استخدام البوت. لذا ، هنا لا يمكن لأحد أن يستخدمني بعد الآن!!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) +} else if (args[0] === "off") { +if (!isBanChat) return replay('ثهذه المجموعة ممنوعة بالفعل من استخدامي!') +let off = banchat.indexOf(from) +banchat.splice(off, 1) +replay('تم * رفع الحظر * عن هذه المجموعة من استخدامي!') +} else { + let buttonsntnsfw = [ + { buttonId: `.bangroup on`, buttonText: { displayText: 'حظر' }, type: 1 }, + { buttonId: `.bangroup off`, buttonText: { displayText: 'الغاء' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntnsfw, `اختار من الزر حظر او الغاء*`, `${global.BotName }`, m) + } + } + break + + + + +case 'botgrups': +case 'botgroups': +case 'الجروب': +case 'التسجيل': +if (isBan) return reply(mess.ban) +if (isBanChat) return reply(mess.banChat) +reply(` لا تنسي الانضمام معنا❤️! + +*جروب 1* +https://chat.whatsapp.com/DHq2KYcAzWG95WTpzVQx3D + +*جروب 2* +https://chat.whatsapp.com/JUngwIYTMVzCxMuismJuOY + +*جروب 3* +https://chat.whatsapp.com/DHq2KYcAzWG95WTpzVQx3D`) +break +case 'getsxvdxcmd': { +if (isBan) return reply(mess.ban) +if (isBanChat) return reply(mess.banChat) +Miku.sendMessage(from, {sticker:{url:"https://ZackMiku.github.io/media/menu.webp"}}, {quoted:m}) +Miku.sendMessage(from, {sticker:{url:"https://ZackMiku.github.io/media/groupopen.webp"}}, {quoted:m}) +Miku.sendMessage(from, {sticker:{url:"https://ZackMiku.github.io/media/groupclose.webp"}}, {quoted:m}) +} +break + + +case 'support': case 'الدعم': + + reply(`*جروب الدعم:*https://chat.whatsapp.com/JUngwIYTMVzCxMuismJuOY `) + break + +case 'الشرح': case 'الوصف': + + reply(`**✶━━━✲─ • ❨🤖❩ • ─✲━━━✶ +*أهلاً وسهلا بك في صناعة البوتات* + +*احنا نقدم لكم بوتات مطوره* + +*بوتات عربية وبوتات اجنبيه بجميع انواعها* + +*✶━━━✲─ • ❨🤖❩ • ─✲━━━✶ + +↲┃مطور البوتات 〖🤖〗انوس ┃↱ +↲┃المقدم 〖🤖〗SAM┃↱ + +*✶━━━✲─ • ❨🤖❩ • ─✲━━━✶ + +*كيف صنع بوت وتس فيه أكثر من 300امر* + +https://youtu.be/Ligaee2E-Hc + +*✶━━━✲─ • ❨🤖❩ • ─✲━━━✶ +*كيف صنع بوت اجنبي* + +*↲┃ https://youtu.be/aLgWc ┃↱* + +ارجوكم ان تدعموني قناتي احتذفت +*↲┃ ┃↱* + +*سوي اشتراك ولايكي وتعليق حلو مثلك🙄💞* +*✶━━━✲─ • ❨🤖❩ • ─✲━━━✶⌬*`) + break + +case 'اضافي': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!AntiNsfw) return reply(mess.nonsfw) + reply(` *━━━〈 ❤️ قائمه اضافيه ❤️ 〉━━━*\n\nصلي علي النبي في قلبك اللي هيشفعلنا يوم القيامه❤️`) + break + +case 'reaction': case 'react': case 'reactions': case 'r': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + reply(` *━━━〈 📍 تفاعلات 📍 〉━━━*\n\nبونك, كيري, بولي, هاج, كيس, بات, سموج, بلوش, سميلي, هاندهولد, نوم, جلومب, بيتي, سلاب, كيل, هابي, بوكي, دانسي, كرينج`) + break + + +case 'limituser': case 'userlimit': case 'limit': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + { + let txt = `「 *All User Limit* 」\n\n` + for (let i of _limit){ + txt += ` *User ID :* @${i.id.split("@")[0]}\n➸ *Limit* : ${i.limit}\n` + } + reply(txt) + } + break + + + + +case 'ringtone': case 'نغمات': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!args.join(" ")) return reply(`Example: ${prefix}ringtone black over`) + let { ringtone } = require('./lib/scraper') + let anu = await ringtone(text) + let result = anu[Math.floor(Math.random() * anu.length)] + Miku.sendMessage(m.chat, { audio: { url: result.audio }, fileName: result.title+'.mp3', mimetype: 'audio/mpeg' }, { quoted: m }) + } + break + + +case 'film': case 'movie': case 'فيلم': +if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + reply(mess.waiting) +if (!q) return reply(`Please enter a Movie search term...\nExample: ${prefix}movie Spiderman`) +xfarrapi.Film(q) + .then(data => {console.log(data) + let krl = `*Search Term:* ${q}\n\n` + for (let i of data) { + krl += (`-----------------------------------------------------------------------------\n\n\n*Movie Name:* ${i.judul}\n *Quality :* ${i.quality}\n *Type : ${i.type}*\n *Uploaded on :* ${i.upload}\n *Source URL :* ${i.link}\n\n\n`) + } + Miku.sendMessage(from, { image: { url: data[0].thumb}, caption: krl }, { quoted: fdocs }) +}); +break + + +case 'wallpaper': case 'animewallpaper': case 'ويلبر': { +if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!args.join(" ")) return reply("اكتب اسم الانمي اللي تبحث عنو بالانجليزي!") +const { AnimeWallpaper } =require("anime-wallpaper") +const wall = new AnimeWallpaper(); +const pages = [1,2,3,4]; +const random=pages[Math.floor(Math.random() * pages.length)] + const wallpaper = await wall .getAnimeWall4({ title: q, type: "sfw", page: pages }).catch(() => null); + const i = Math.floor(Math.random() * wallpaper.length); + +let buttons = [ + {buttonId: `.wallpaper ${args.join(" ")}`, buttonText: {displayText: '>>'}, type: 1} + ] + let buttonMessage = { + image: {url:wallpaper[i].image}, + caption: `*موضوع البحث:* ${q}`, + footer: `${BotName}`, + buttons: buttons, + headerType: 4 + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + } + break + + +case 'wikimedia': case 'wikiimage': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + if (!args.join(" ")) return reply("What picture are you looking for??") + let { wikimedia } = require('./lib/scraper') + anu = await wikimedia(args) + hasil = anu[Math.floor(Math.random() * anu.length)] + let buttons = [ + {buttonId: `.wikimedia ${args.join(" ")}`, buttonText: {displayText: 'Next Image'}, type: 1} + ] + let buttonMessage = { + image: { url: hasil.image }, + caption: `Title : ${hasil.title}\nSource : ${hasil.source}\nMedia Url : ${hasil.image}`, + footer: `${BotName}`, + buttons: buttons, + headerType: 4 + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + } + break + +case 'quotesimagexxx': case 'qoutesimagexxx': case 'quoteimage': +if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + let cok = await fetchJson(`http://api.lolhuman.xyz/api/random/quotesimage?apikey=${lolkey}`) + reply(mess.waiting) + Miku.sendMessage(m.chat, { image: { url: cok }, caption: 'Here it is...' }, { quoted: m }) + break + +case 'quotesanime': case 'quoteanime': case 'animequote': case 'animequotes':{ + let { quotesAnime } = require('./lib/scraper') + let anu = await quotesAnime() + hasil = anu[Math.floor(Math.random() * anu.length)] + let buttons = [ + {buttonId: `.quotesanime`, buttonText: {displayText: '>>'}, type: 1} + ] + let buttonMessage = { + text: `_${hasil.quotes}_\n\nBy '${hasil.karakter}', ${hasil.anime}\n\n- ${hasil.up_at}`, + footer: 'Miku', + buttons: buttons, + headerType: 2 + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + } + break + + +case 'animestory': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +reply(mess.waiting) +await fetchJson(`https://api.jikan.moe/v4/anime?q=${q}`) +.then((res) =>{ +console.log(res) +let sections = [] + for (let i of res.data) { + const list = {title: `${i.title}`, + rows: [ + { + title: `${i.title}\n\n`, + rowId: `${prefix}animesearch ${i.mal_id}`, + description: `${i.synopsis}` + }, + ] + } + sections.push(list) + } + const sendm = Miku.sendMessage( + from, + { + text: "Anime Search", + footer: BotName, + title: OwnerName, + buttonText: "Search Results", + sections + }, { quoted : m } + ) +}) +} + break + + + case 'grupsetting': + case 'اعدادات':{ + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + let sections = [] + let com = [`group open`,`leveling on`,`antilinkgc on`,`antilinktg on`,`antilinktt on`,`antilinkytch on`,`antilinkytvid on`,`antilinkig on`,`antilinkfb on`,`antilinktwit on`,`antilinkall on`,`antiwame on`] + let comm = [`group close`,`leveling off`,`antilinkgc off`,`antilinktg off`,`antilinktt off`,`antilinkytch off`,`antilinkytvid off`,`antilinkig on`,`antilinkfb off`,`antilinktwit off`,`antilinkall off`,`antiwame off`] + let listnya = [`Group open/close`,`Leveling on/off`,`Antilink Group on/off`,`Antilink Telegram on/off`,`Antilink Tiktok on/off`,`Antilink Youtube Channel on/off`,`Antilink Youtube Video on/off`,`Antilink Instagram on/off`,`Antilink Facebook on/off`,`Antilink Twitter on/off`,`Antilink All on/off`,`Anti Wame on/off`] + let suruh = [`Enable`, `Disable`] + let fiturname = [`Group`,`Leveling`,`Auto Sticker`,`Antilink Group`,`Antilink Telegram`,`Antilink Tiktok`,`Antilink Youtube Channel`,`Antilink Youtube Video`,`Antilink Instagram`,`Antilink Facebook`,`Antilink Twitter`,`Antilink All`,`Anti Wame`,`Auto Revoke`] + let startnum = 0; let startnu = 0; let startn = 0;let start = 0 + let startnumm = 1 + for (let x of com) { + const yy = {title: `${listnya[startnum++]}`, + rows: [ + { + title: `${suruh[0]}`, + description: `Activate ${fiturname[startnu++]}`, + rowId: `${prefix}${x}` + },{ + title: `${suruh[1]}`, + description: `Deactivate ${fiturname[startn++]}`, + rowId: `${prefix}${comm[start++]}` + } + ] + } + sections.push(yy) + } + const sendm = Miku.sendMessage( +from, +{ +text: "اعدادات الجروب", +footer: BotName, +title: "Set your group settings here...", +buttonText: "Click Button/اضغط علي الزر", +sections +}, { quoted : m } +) +} +break + +/* +case 'animesearchxxx': case 'anime':{ + await fetchJson(`https://api.jikan.moe/v4/anime/${q}`) + .then((res) => { + let txt = ` _Anime Search Engine_ \n\n*Title:* *${res.data.title}*\n*English:* *${res.data.title_english}*\n*Japanese:* *${res.data.title_japanese}*\n*Anime Type:* *${res.data.type}*\n*Adaptation:* *${res.data.source}*\n*Total Episode:* *${res.data.episodes}*\n*Status:* *${res.data.status}*\n*Ongoing:* *${res.data.airing ? 'Yes' : 'No'}*\n*Aired:* *${res.data.aired.string}*\n*Duration:* *${res.data.duration}*\n*Rating:* *${res.data.rating}*\n*Score:* *${res.data.score}*\n*Rank:* *${res.data.rank}*\n*Main Producer:* *${res.data.producers.name}*\n*Studio:* *${res.data.studios[0].name}* ` + Miku.sendMessage(from, { image : { url : res.data.images.jpg.image_url}, caption : txt}, {quoted :m }) + }) + } + break +*/ + +case 'coffee': case 'قهوه': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + let buttons = [ + {buttonId: `.قهوه`, buttonText: {displayText: '>>'}, type: 1} + ] + let buttonMessage = { + image: { url: 'https://coffee.alexflipnote.dev/random' }, + caption: `ها هي قهوتك...`, + footer: `${BotName}`, + buttons: buttons, + headerType: 4 + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + } + break + + + +case 'emojimix': case 'دمج': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!q) reply(`*مثال :* ${prefix + command} 🦉+🤣`) +let [emoji1, emoji2] = q.split`+` +let kuntuh = await fetchJson(`https://tenor.googleapis.com/v2/featured?key=AIzaSyAyimkuYQYF_FXVALexPuGQctUWRURdCYQ&contentfilter=high&media_filter=png_transparent&component=proactive&collection=emoji_kitchen_v5&q=${encodeURIComponent(emoji1)}_${encodeURIComponent(emoji2)}`) +for (let res of kuntuh.results) { +let encmedia = await Miku.sendImageAsSticker(from, res.url, m, { packname: global.packname, author: global.author, categories: res.tags }) +await fs.unlinkSync(encmedia) +} +} +break + +case 'getcase': + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (m.isGroup) reply(mess.privateonly) +if (!isCreator) return reply(mess.botowner) +const getCase = (cases) => { +return "case"+`'${cases}'`+fs.readFileSync("Core.js").toString().split('case \''+cases+'\'')[1].split("break")[0]+"break" +} +replay(`${getCase(q)}`) +break + + + case 'ايموجي': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!args.join(" ")) return reply('أين هو الإيموجي؟') +emoji.get(args.join(" ")).then(async(emoji) => { +let mese = await Miku.sendMessage(m.chat, {image:{url:emoji.images[4].url}, caption: `اي خدمه يروحي🌚♥...`}, {quoted:m}) +await Miku.sendMessage(from, {text:"اعمل ريب علي الصوره واكتب .استيكر"}, {quoted:mese}) +}) +} +break + +/* +case 'delete': case 'del': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.quoted) return + let { chat, fromMe, id, isBaileys } = m.quoted + if (!isBaileys) return replay('How can i delete messages of other person? Baka!') + Miku.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: true, id: m.quoted.id, participant: m.quoted.sender } }) + } + break +*/ + + case 'حذف': case 'مسح': case 'احذف': case 'امسح': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (!m.quoted) return reply('من فضلك قم بالرد علي رساله لحذفها') + let { chat, fromMe, id} = m.quoted + +const key = { + remoteJid: m.chat, + fromMe: false, + id: m.quoted.id, + participant: m.quoted.sender +} + +await Miku.sendMessage(m.chat, { delete: key }) + } + break + + + + case 'listpc': case 'المستخدمين': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + let anu = await store.chats.all().filter(v => v.id.endsWith('.net')).map(v => v) + let teks = ` 「 قائمه المستخدمين 」\n\nالمجموع ${anu.length} يستخدم المستخدمون البوت في الخاص.` + for (let i of anu) { + teks += `\n\nبروفايل : @${i.id.split('@')[0]}\nشات : ${i.unreadCount}\nاخر محادثه : ${moment(i.conversationTimestamp * 1000).tz("Asia/Kolkata").format("DD/MM/YYYY HH:mm:ss")}` + } + Miku.sendTextWithMentions(m.chat, teks, m) + } + break + + case 'listgc': case 'الجروبات': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + let anu = await store.chats.all().filter(v => v.id.endsWith('@g.us')).map(v => v.id) + let teks = ` 「 قائمة مجموعات مستخدمي البوت 」\n\nالمجموع ${anu.length} المستخدمون يستخدمون الروبوت في المجموعات.` + for (let i of anu) { + let metadata = await Miku.groupMetadata(i) + if (metadata.owner === "undefined") { + loldd = false + } else { + loldd = metadata.owner } + teks += `\n\nالاسم : ${metadata.subject ? metadata.subject : "undefined"}\nالمالك : ${loldd ? '@' + loldd.split("@")[0] : "undefined"}\nايدي : ${metadata.id ? metadata.id : "undefined"}\nالحاله : ${metadata.creation ? moment(metadata.creation * 1000).tz('Asia/Kolkata').format('DD/MM/YYYY HH:mm:ss') : "undefined"}\nالرقم : ${metadata.participants.length ? metadata.participants.length : "undefined"}` + } + Miku.sendTextWithMentions(m.chat, teks, m) + } + break + + case 'اختفاء': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + let user = global.db.users[m.sender] + user.afkTime = + new Date + user.afkReason = args.join(" ") + replay(`${m.pushName} انه في وضع الاختفاء\nالسبب : ${args.join(" ") ? args.join(" ") : ''}`) + } + break + + + case 'عكس': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (args.length < 1) return replay(`مثال:\n${prefix}نص عريض ${OwnerName}`) + quere = args.join(" ") + flipe = quere.split('').reverse().join('') + replay(`\`\`\`「 اداه عكس النص 」\`\`\`\n*ادخل نص :*\n${quere}\n*نص مقلوب :*\n${flipe}`) + } + break + + case 'toletter': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!Number(args[0])) return replay(`Example:\n${prefix}toletter 956`) + try { + quere = args.join(" ") + convertes = await toHur(quere) + replay(`\`\`\`「 Word Maker Tool 」\`\`\`\n*Input Number :*\n${quere}\n*Converted Alphabet :*\n${convertes}`) + } catch { + replay(`Error!`) + } + } + + case 'المستوي': case 'leveling': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isAdmins && !isCreator) return reply(mess.useradmin) + if (args.length < 1) return reply('اكتب الامر و*فتح*\nاكتب الامر و*قفل*') + if (args[0] === 'فتح'){ + if (isLeveling) return reply(`نشط بالفعل`) + _leveling.push(from) + fs.writeFileSync('./database/leveling.json', JSON.stringify(_leveling)) + reply('تفعيل التسوية') + } else if (args[0] === 'قفل'){ + let anu = _leveling.indexOf(from) + _leveling.splice(anu, 1) + fs.writeFileSync('./database/leveling.json', JSON.stringify(_leveling)) + reply('تم الغلق بالفعل') + } + break + + case 'antilinkgc': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiLink) return replay('Already activated') + ntilink.push(from) + replay('Activated _Antilink_ in this group.') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 Warning 」\`\`\`\n\nAntilink System Activated!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiLink) return replay('Already deactivated!') + let off = ntilink.indexOf(from) + ntilink.splice(off, 1) + replay('Deactivated _Antilink_ in this group!') + } else { + let buttonsntilink = [ + { buttonId: `.antilinkgc on`, buttonText: { displayText: 'On' }, type: 1 }, + { buttonId: `.antilinkgc off`, buttonText: { displayText: 'Off' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntilink, `Please click the button below On / Off`, `${global.BotName}`, m) + } + } + break + + + case 'antilinkyoutubevideo': case 'antilinkyoutubevid': case 'antilinkytvid': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiLinkYoutubeVid) return replay('Already activated') + ntilinkytvid.push(from) + replay('Activated youtube video antilink !') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 Warning 」\`\`\`\n\nAntilink System Activated!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiLinkYoutubeVid) return replay('Already deactivated') + let off = ntilinkytvid.indexOf(from) + ntilinkytvid.splice(off, 1) + replay('Deactivated youtube video antilink !') + } else { + let buttonsntilink = [ + { buttonId: `.antilinkyoutubevideo on`, buttonText: { displayText: 'On' }, type: 1 }, + { buttonId: `.antilinkyoutubevideo off`, buttonText: { displayText: 'Off' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntilink, `Please click the button below On / Off`, `${global.BotName}`, m) + } + } + break + + + + case 'antilinkyoutubech': case 'antilinkyoutubechannel': case 'antilinkytch': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiLinkYoutubeChannel) return replay('Already activated') + ntilinkytch.push(from) + replay('Activated youtube channel antilink !') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 Warning 」\`\`\`\n\nAntilink System Activated!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiLinkYoutubeChannel) return replay('Already deactivated') + let off = ntilinkytch.indexOf(from) + ntilinkytch.splice(off, 1) + replay('Deactivated youtube channel antilink !') + } else { + let buttonsntilink = [ + { buttonId: `.antilinkyoutubech on`, buttonText: { displayText: 'On' }, type: 1 }, + { buttonId: `.antilinkyoutubech off`, buttonText: { displayText: 'Off' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntilink, `Please click the button below On / Off`, `${global.BotName}`, m) + } + } + break + + + case 'antilinkinstagram': case 'antilinkig': case 'antilinkinsta': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiLinkInstagram) return replay('Already activated') + ntilinkig.push(from) + replay('Activated instagram antilink !') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 Warning 」\`\`\`\n\nAntilink System Activated!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiLinkInstagram) return replay('Already deactivated') + let off = ntilinkig.indexOf(from) + ntilinkig.splice(off, 1) + replay('Deactivated instagram antilink !') + } else { + let buttonsntilink = [ + { buttonId: `.antilinkinstagram on`, buttonText: { displayText: 'On' }, type: 1 }, + { buttonId: `.antilinkinstagram off`, buttonText: { displayText: 'Off' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntilink, `Please click the button below On / Off`, `${global.BotName}`, m) + } + } + break + + case 'antilinkfacebook': case 'antilinkfb': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiLinkFacebook) return replay('Already activated') + ntilinkfb.push(from) + replay('Activated facebook antilink !') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 Warning 」\`\`\`\n\nAntilink System Activated!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiLinkFacebook) return replay('Already deactivated') + let off = ntilinkfb.indexOf(from) + ntilinkfb.splice(off, 1) + replay('Deactivated facebook antilink !') + } else { + let buttonsntilink = [ + { buttonId: `.antilinkfacebook on`, buttonText: { displayText: 'On' }, type: 1 }, + { buttonId: `.antilinkfacebook off`, buttonText: { displayText: 'Off' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntilink, `Please click the button below On / Off `, `${global.BotName}`, m) + } + } + break + + + case 'antilinktelegram': case 'antilinktg': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiLinkTelegram) return replay('Already activated') + ntilinktg.push(from) + replay('Activated telegram antilink !') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 Warning 」\`\`\`\n\nAntilink System Activated!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiLinkTelegram) return replay('Already deactivated') + let off = ntilinkig.indexOf(from) + ntilinkig.splice(off, 1) + replay('Deactivated telegram antilink in this group') + } else { + let buttonsntilink = [ + { buttonId: `.antilinktelegram on`, buttonText: { displayText: 'On' }, type: 1 }, + { buttonId: `.antilinktelegram off`, buttonText: { displayText: 'Off' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntilink, `Please click the button below On / Off `, `${global.BotName}`, m) + } + } + break + + + case 'antilinktiktok': case 'antilinktt': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiLinkTiktok) return replay('Already activated') + ntilinktt.push(from) + replay('Activated tiktok antilink !') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 Warning 」\`\`\`\n\nAntilink System Activated!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiLinkTiktok) return replay('Already deactivated') + let off = ntilinktt.indexOf(from) + ntilinktt.splice(off, 1) + replay('Deactivated tiktok antilink !') + } else { + let buttonsntilink = [ + { buttonId: `.antilinktiktok on`, buttonText: { displayText: 'On' }, type: 1 }, + { buttonId: `.antilinktiktok off`, buttonText: { displayText: 'Off' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntilink, `Please click the button below\n\nOn to enable\nOff to disable`, `${global.BotName}`, m) + } + } + break + + case 'antilinktwt': case 'antilinktwitter': case 'antilinktwit': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiLinkTwitter) return replay('Already activated') + ntilinktwt.push(from) + replay('Activated twitter antilink in this group !') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 Warning 」\`\`\`\n\nAntilink System Activated!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiLinkTwitter) return replay('Already deactivated') + let off = ntilinktwt.indexOf(from) + ntilinktwt.splice(off, 1) + replay('Deactivated twitter antilink !') + } else { + let buttonsntilink = [ + { buttonId: `.antilinktwt on`, buttonText: { displayText: 'On' }, type: 1 }, + { buttonId: `.antilinktwt off`, buttonText: { displayText: 'Off' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntilink, `Please click the button below\n\nOn to enable\nOff to disable`, `${global.BotName}`, m) + } + } + break + + + case 'antilinkall': case 'الروابط': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiLinkTwitter) return replay('بالفعل نشط') + ntilinkall.push(from) + replay('تم تفعيل منع جميع الروابط !') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 تحذير 」\`\`\`\n\nتم تنشيط نظام منع الروابط اي شخص سيرسل رابط سيتم طرده علي الفور!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiLinkAll) return replay('تم إلغاء تنشيطه بالفعل') + let off = ntilinkall.indexOf(from) + ntilinkall.splice(off, 1) + replay('تعطيل منع جميع الروابط !') + } else { + let buttonsntilink = [ + { buttonId: `.antilinkall on`, buttonText: { displayText: 'فتح' }, type: 1 }, + { buttonId: `.antilinkall off`, buttonText: { displayText: 'قفل' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntilink, `الرجاء اختيار من الزر\n\nفتح\nقفل`, `${global.BotName}`, m) + } + } + break + + + case 'antiwame': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (antiWame) return replay('Already activated') + ntwame.push(from) + replay('Activated antiwame !') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`*「 Warning/تحذير 」*\`\`\`\n\nتم تفعيل منع الروابط!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!antiWame) return replay('تم إلغاء تنشيطه بالفعل') + let off = nttoxic.indexOf(from) + ntwame.splice(off, 1) + replay('Deactivated antiwame !') + } else { + let buttonsntwame = [ + { buttonId: `.antiwame on`, buttonText: { displayText: 'فتح' }, type: 1 }, + { buttonId: `.antiwame off`, buttonText: { displayText: 'قفل' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntwame, `Please click the button below\n\nOn to enable\nOff to disable`, `${global.BotName}`, m) + } + } + break + + + case 'nsfw': case 'اضافيه': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === "on") { + if (AntiNsfw) return replay('نشط بالفعل') + ntnsfw.push(from) + replay('تم تمكين ميزه القائمه الاضافيه!') + var groupe = await Miku.groupMetadata(from) + var members = groupe['participants'] + var mems = [] + members.map(async adm => { + mems.push(adm.id.replace('c.us', 's.whatsapp.net')) + }) + Miku.sendMessage(from, {text: `\`\`\`「 ملاحظه 」\`\`\`\n\nتم فتح ميزه القائمه الاضافيه وكدا كل الاعضاء يقدرو يشغلو القائمه في الجروب!`, contextInfo: { mentionedJid : mems }}, {quoted:m}) + } else if (args[0] === "off") { + if (!AntiNsfw) return replay('تم إلغاء تنشيطه بالفعل') + let off = ntnsfw.indexOf(from) + ntnsfw.splice(off, 1) + replay('اوامر القائمه الاضافيه معطله!') + } else { + let buttonsntnsfw = [ + { buttonId: `.nsfw on`, buttonText: { displayText: 'فتح' }, type: 1 }, + { buttonId: `.nsfw off`, buttonText: { displayText: 'قفل' }, type: 1 } + ] + await Miku.sendButtonText(m.chat, buttonsntnsfw, `اختار من الزر\n\nفتح\nقفل`, `${global.BotName}`, m) + } + } + break + + + case 'ban': case 'حظر':{ + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!isCreator) return replay(mess.botowner) +if (!args[0]) return replay(`حدد إضافة أو حذف (إضافة إلى الحظر ، حذف إلى إلغاء الحظر) ، على سبيل المثال: رد *${prefix}أضف الحظر * للمستخدم الذي تريد حظره.`) +if (args[1]) { +orgnye = args[1] + "@s.whatsapp.net" +} else if (m.quoted) { +orgnye = m.quoted.sender +} +const isBane = banUser.includes(orgnye) +if (args[0] === "فتح") { +if (isBane) return ads('User is already banned.') +banUser.push(orgnye) +replay(`تم حظر المستخدم بنجاح.`) +} else if (args[0] === "قفل") { +if (!isBane) return ads('User is already unbanned.') +let delbans = banUser.indexOf(orgnye) +banUser.splice(delbans, 1) +replay(`تم بنجاح إلغاء حظر المستخدم بنجاح.`) +} else { +replay("ايرور🙂!") +} +} +break + + +case 'listonline': case 'الصاحيين': case 'المتصلين':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + let id = args && /\d+\-\d+@g.us/.test(args[0]) ? args[0] : m.chat + let online = [...Object.keys(store.presences[id]), botNumber] + let liston = 1 + Miku.sendText(m.chat, ' ❆❯━━❲المتصلين الاموات❳━━❮❆\n\n' + online.map(v => `${liston++} . @` + v.replace(/@.+/, '')).join`\n`, m, { mentions: online }) + } + break + + case 'ban': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!isCreator) return replay(mess.botowner) +if (!args[0]) return replay(`حدد إضافة أو حذف (إضافة إلى الحظر ، حذف إلى إلغاء الحظر) ، على سبيل المثال: رد *${prefix}أضف الحظر * للمستخدم الذي تريد حظره.`) +if (args[1]) { +orgnye = args[1] + "@s.whatsapp.net" +} else if (m.quoted) { +orgnye = m.quoted.sender +} +const isBane = banUser.includes(orgnye) +if (args[0] === "add") { +if (isBane) return ads('تم حظر المستخدم بالفعل.') +banUser.push(orgnye) +replay(`تم حظر المستخدم بنجاح`) +} else if (args[0] === "del") { +if (!isBane) return ads('تم بالفعل رفع الحظر عن المستخدم.') +let delbans = banUser.indexOf(orgnye) +banUser.splice(delbans, 1) +replay(`تم بالفعل رفع الحظر عن المستخدم.`) +} else { +replay("Error") +} +} +break + + +case 'happymod': case 'هابي-مود': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!args.join(" ")) return replay(`Example : ${prefix + command} Kinemaster`) + yogipw.happymod(args.join(" ")).then(async(res) => { + teks = '```「 HappyMod Search Engine 」```' + for (let i of res) { + teks += `\n\n${i.name}\n` + teks += `${i.link}` + } + let buttons = [ + {buttonId: `.menu`, buttonText: {displayText: 'لقائمه✨'}, type: 1} + ] + let buttonMessage = { + image: {url:res[0].icon}, + jpegThumbnail: Thumb, + caption: teks, + footer: `${global.BotName}`, + buttons: buttons, + headerType: 4 + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + }) + } + break + + case 'yts': case 'ابحث': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!args.join(" ")) return replay(`مثال : .ابحث Heat waves`) + let yts = require("yt-search") + let search = await yts(args.join(" ")) + let teks = '```「 YouTube search Engine 」```\n\n Search Term: '+text+'\n\n' + let no = 1 + for (let i of search.all) { + teks += `Result No : ${no++}\n\nTitle : ${i.title}\n\nViews : ${i.views}\n\nDuration : ${i.timestamp}\n\nUploaded : ${i.ago}\n\nAuthor : ${i.author.name}\n\nUrl : ${i.url}\n\n\n-----------------------------------------------------------------------------\n\n\n` + } + Miku.sendMessage(m.chat, { image: { url: search.all[0].thumbnail }, caption: teks }, { quoted: m }) + } + break + + case 'setname': case 'تغيرالاسم': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (!text) return replay('اكتب الاسم الجديد للتغير') + await Miku.groupUpdateSubject(m.chat, text).then((res) => replay(mess.jobdone)).catch((err) => replay(jsonformat(err))) + } + break + +case 'block': case 'بلوك': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + if (!isCreator) return reply(mess.botowner) + let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + await Miku.updateBlockStatus(users, 'block').then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err))) + } + break + +case 'unblock': case 'فك-البلوك': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + if (!isCreator) return reply(mess.botowner) + let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + await Miku.updateBlockStatus(users, 'unblock').then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err))) + } + break + + case 'setdesc': case 'تغيرالبايو': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (!text) return replay('اكتب البايو الجديد للتغير.') + await Miku.groupUpdateDescription(m.chat, text).then((res) => replay(mess.jobdone)).catch((err) => replay(jsonformat(err))) + } + break + + case 'setgrouppp': case 'تغيرالصوره': case 'setgcpp': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (!quoted) return replay(`رد علي الصوره اللي هتحطها واكتب الامر ${prefix + command}`) + if (!/image/.test(mime)) return replay(`رد علي الصوره اللي هتحطها واكتب الامر ${prefix + command} لتغيير صورة الملف الشخصي لهذه المجموعة.`) + if (/webp/.test(mime)) return replay(`رد علي الصوره اللي هتحطها واكتب الامر ${prefix + command} لتغيير صورة الملف الشخصي لهذه المجموعة.`) + let media = await Miku.downloadAndSaveMediaMessage(quoted) + await Miku.updateProfilePicture(m.chat, { url: media }).catch((err) => fs.unlinkSync(media)) + replay(mess.jobdone) + } + break + + case 'منشن': case 'tagall': case 'تاك':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + let teks = `══✪〘 *منشن للكل👥* 〙✪══ + + *الرساله : ${args.join(" ") ? args.join(" ") : 'مفيش رساله'}*\n\n` + for (let mem of participants) { + teks += `🐤 @${mem.id.split('@')[0]}\n` + } + Miku.sendMessage(m.chat, { text: teks, mentions: participants.map(a => a.id) }, { quoted: m }) + } + break + + case 'hidetag': case 'وهمي': case 'مخفي': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + Miku.sendMessage(m.chat, { text : args.join(" ") ? args.join(" ") : '' , mentions: participants.map(a => a.id)}, { quoted: m }) + } + break + +/* + case 'purge':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + + const delay = time => new Promise(res=>setTimeout(res,time)); + + let users = (await Miku.fetchGroupMetadataFromWA(m.chat)).participants.map(u => u.jid) + for (let user of users){ + + await Miku.groupParticipantsUpdate(m.chat, [user], 'remove') + await delay(3000) + } + } + break + +*/ + +case 'purge':{mess + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) +const delay = time => new Promise(res=>setTimeout(res,time)); +let mentioned = participants.map(v => v.jid) + for (let member of mentioned) { + Miku.groupParticipantsUpdate(m.chat, [member], 'remove') + } + } + + break + + + + + case 'nowa': case 'stalk': case 'stalknumber':{ + if (isBan) return reply(mess.banned) + if (!args[0]) return reply(`Use command like: ${prefix}stalk xxx`) + var inputnumber = args[0] + if (!inputnumber.includes('x')) return reply('You didnot added x') + reply(`Searching for WhatsApp account in given range...`) + reply(`Please wait while i fetch details...`) + function countInstances(string, word) { + return string.split(word).length - 1; + } + var number0 = inputnumber.split('x')[0] + var number1 = inputnumber.split('x')[countInstances(inputnumber, 'x')] ? inputnumber.split('x')[countInstances(inputnumber, 'x')] : '' + var random_length = countInstances(inputnumber, 'x') + var randomxx; + if (random_length == 1) { + randomxx = 10 + } else if (random_length == 2) { + randomxx = 100 + } else if (random_length == 3) { + randomxx = 1000 + } + var nomerny = `*『 List of Whatsapp Numbers 』*\n\n` + var nobio = `\n*Bio:* || \nHey there! I am using WhatsApp.\n` + var nowhatsapp = `\n*Numbers with no WhatsApp account within the range you provided*\n` + for (let i = 0; i < randomxx; i++) { + var nu = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] + var status1 = nu[Math.floor(Math.random() * nu.length)] + var status2 = nu[Math.floor(Math.random() * nu.length)] + var status3 = nu[Math.floor(Math.random() * nu.length)] + var dom4 = nu[Math.floor(Math.random() * nu.length)] + var rndm; + if (random_length == 1) { + rndm = `${status1}` + } else if (random_length == 2) { + rndm = `${status1}${status2}` + } else if (random_length == 3) { + rndm = `${status1}${status2}${status3}` + } else if (random_length == 4) { + rndm = `${status1}${status2}${status3}${dom4}` + } + var anu = await Miku.onWhatsApp(`${number0}${i}${number1}@s.whatsapp.net`); + var anuu = anu.length !== 0 ? anu : false + try { + try { + var anu1 = await Miku.fetchStatus(anu[0].jid) + } catch { + var anu1 = '401' + } + if (anu1 == '401' || anu1.status.length == 0) { + nobio += `wa.me/${anu[0].jid.split("@")[0]}\n` + } else { + nomerny += `🎀 *Number:* wa.me/${anu[0].jid.split("@")[0]}\n🔹 *Bio :* ${anu1.status}\n🔸 *Updated On :* ${moment(anu1.setAt).tz('Asia/Kolkata').format('HH:mm:ss DD/MM/YYYY')}\n\n` + } + } catch { + nowhatsapp += `${number0}${i}${number1}\n` + } + } + reply(`${nomerny}${nobio}${nowhatsapp}`) + } + break + + + + + + + + case 'grouplink': case 'لينك': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + let response = await Miku.groupInviteCode(m.chat) + Miku.sendMessage(m.chat, {text:`*اسم الجروب:* *${groupMetadata.subject}* \n\n*لينك الجروب :* \nhttps://chat.whatsapp.com/${response}l`, "contextInfo": { + mimetype: "image/jpeg", + text: `${global.OwnerName}`, + "forwardingScore": 1000000000, + isForwarded: true, + sendEphemeral: true, + "externalAdReply": { + "title": `${global.BotName}`, + "body": `${global.WaterMark}`, + "previewType": "PHOTO", + "thumbnailUrl": Thumb, + "thumbnail": Thumb, + "sourceUrl": `${global.websitex}` + }}}, { quoted: m, detectLink: true }) + } + break + + + case 'resetlinkgc': + case 'resetlinkgroup': + case 'resetlinkgrup': + case 'رستر': + case 'resetlink': + case 'resetgrouplink': + case 'رستر-لينك': + case 'resetgruplink': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + Miku.groupRevokeInvite(m.chat) + } + break + + + case 'group': case 'جروب': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + if (args[0] === 'close'){ + await Miku.groupSettingUpdate(m.chat, 'announcement').then((res) => replay(`تم إغلاق المجموعة!`)).catch((err) => replay(jsonformat(err))) + } else if (args[0] === 'open'){ + await Miku.groupSettingUpdate(m.chat, 'not_announcement').then((res) => replay(`تم فتح المجموعة!`)).catch((err) => replay(jsonformat(err))) + } else { + let buttons = [ + { buttonId: '.group open', buttonText: { displayText: 'فتح' }, type: 1 }, + { buttonId: '.group close', buttonText: { displayText: 'قفل' }, type: 1 } + ] + let buttonMessage = { + image: BotLogo, + jpegThumbnail: Thumb, + caption: `*「 ${global.BotName} 」*\n\n_أداة تغيير إعدادات المجموعة_:`, + footer: `${BotName}`, + buttons: buttons, + headerType: 4 + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + } + } + break + + case 'ارفع': case 'رفع': case 'ترقيه': case 'ترقية': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + await Miku.groupParticipantsUpdate(m.chat, [users], 'promote').then((res) => replay(jsonformat(res))).catch((err) => replay(jsonformat(err))) + } + break + + case 'نزل': case 'تنزيل': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + await Miku.groupParticipantsUpdate(m.chat, [users], 'demote').then((res) => replay(jsonformat(res))).catch((err) => replay(jsonformat(err))) + } + break + + case 'طلع': case 'طرد': case 'اطرد':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + if (!isAdmins && !isCreator) return replay(mess.useradmin) + let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + await Miku.groupParticipantsUpdate(m.chat, [users], 'remove') + } + break + + + case 'ادخل': case 'انضم': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!isCreator) return replay(mess.botowner) + if (!args[0]) return replay(`أين الرابط؟`) + vdd = args[0] + let vcc = vdd.split("https://chat.whatsapp.com/")[1] + if (!vcc) return replay("الرابط غلط!") + if (isCreator) { + await Miku.groupAcceptInvite(vcc).then(async(res) => replay(jsonformat(res))).catch(_ => _) + replay("النجاح!") + } else { + Miku.query({ + tag: "iq", + attrs: { + type: "get", + xmlns: "w:g2", + to: "@g.us" + }, + content: [{ tag: "invite", attrs: { code: vcc } }] + }).then(async(res) => { + sizny = res.content[0].attrs.size + if (sizny < 20) { + teks = `معذرة 20 أعضاء مطلوبين في مجموعة لإضافة بوت!` + sendOrder(m.chat, teks, "667140254502463", fs.readFileSync('./Assets/pic7.jpg'), `${global.packname}`, `${global.BotName}`, "916909137213@s.whatsapp.net", "AR6NCY8euY5cbS8Ybg5Ca55R8HFSuLO3qZqrIYCT7hQp0g==", "99999999999999999999") + } else if (sizny > 20) { + await Miku.groupAcceptInvite(vcc).then(async(res) => replay(jsonformat(res))).catch(_ => _) + replay("انضم !") + } else { + replay("ايرور🙂!") + } + }).catch(_ => _) + } + } + break + + + case 'volume': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!args.join(" ")) return reply(`Example: ${prefix + command} 10`) + media = await Miku.downloadAndSaveMediaMessage(quoted, "volume") + if (isQuotedAudio) { + rname = getRandom('.mp3') + exec(`ffmpeg -i ${media} -filter:a volume=${args[0]} ${rname}`, (err, stderr, stdout) => { + fs.unlinkSync(media) + if (err) return reply('Error!') + jadie = fs.readFileSync(rname) + Miku.sendMessage(from, {audio:jadie, mimetype: 'audio/mp4', ptt: true}, {quoted: m}) + fs.unlinkSync(rname) + }) + } else if (isQuotedVideo) { + rname = getRandom('.mp4') + exec(`ffmpeg -i ${media} -filter:a volume=${args[0]} ${rname}`, (err, stderr, stdout) => { + fs.unlinkSync(media) + if (err) return reply('Error!') + jadie = fs.readFileSync(rname) + Miku.sendMessage(from, {video:jadie, mimetype: 'video/mp4'}, {quoted: m}) + fs.unlinkSync(rname) + }) + } else { + reply("Please send video/audio file only!") + } + } + break + + case 'tempo': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!args.join(" ")) return reply(`Example: ${prefix + command} 10`) + var req = args.join(' ') + media = await Miku.downloadAndSaveMediaMessage(quoted, "tempo") + if (isQuotedAudio) { + ran = getRandom('.mp3') + exec(`ffmpeg -i ${media} -filter:a "atempo=1.0,asetrate=${req}" ${ran}`, (err, stderr, stdout) => { + fs.unlinkSync(media) + if (err) return reply('Error!') + hah = fs.readFileSync(ran) + Miku.sendMessage(from, {audio:hah, mimetype:'audio/mp4', ptt:true}, {quoted:m}) + fs.unlinkSync(ran) + }) + } else if (isQuotedVideo) { + ran = getRandom('.mp4') + exec(`ffmpeg -i ${media} -filter:a "atempo=1.0,asetrate=${req}" ${ran}`, (err, stderr, stdout) => { + fs.unlinkSync(media) + if (err) return reply('Error!') + hah = fs.readFileSync(ran) + Miku.sendMessage(from, {video:hah, mimetype:'video/mp4'}, {quoted:m}) + fs.unlinkSync(ran) + }) + } else { + reply("Please send video/audio file only!") + } + } + break + + case 'دبه': case 'ضوضاء': case 'بطئ': case 'earrape': case 'سريع': case 'بطئ2': case 'طفل': case 'عكس': case 'روبوت': case 'slow': case 'smooth': case 'tupai': + try { + let set + if (/دبه/.test(command)) set = '-af equalizer=f=54:width_type=o:width=2:g=20' + if (/ضوضاء/.test(command)) set = '-af acrusher=.1:1:64:0:log' + if (/بطئ/.test(command)) set = '-af atempo=4/4,asetrate=44500*2/3' + if (/earrape/.test(command)) set = '-af volume=12' + if (/سريع/.test(command)) set = '-filter:a "atempo=1.63,asetrate=44100"' + if (/بطئ2/.test(command)) set = '-filter:a "atempo=1.6,asetrate=22100"' + if (/طفل/.test(command)) set = '-filter:a atempo=1.06,asetrate=44100*1.25' + if (/عكس/.test(command)) set = '-filter_complex "areverse"' + if (/روبوت/.test(command)) set = '-filter_complex "afftfilt=real=\'hypot(re,im)*sin(0)\':imag=\'hypot(re,im)*cos(0)\':win_size=512:overlap=0.75"' + if (/slow/.test(command)) set = '-filter:a "atempo=0.7,asetrate=44100"' + if (/smooth/.test(command)) set = '-filter:v "minterpolate=\'mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=120\'"' + if (/tupai/.test(command)) set = '-filter:a "atempo=0.5,asetrate=65100"' + if (/audio/.test(mime)) { + reply(mess.waiting) + let media = await Miku.downloadAndSaveMediaMessage(quoted) + let ran = getRandom('.mp3') + exec(`ffmpeg -i ${media} ${set} ${ran}`, (err, stderr, stdout) => { + fs.unlinkSync(media) + if (err) return reply(err) + let buff = fs.readFileSync(ran) + Miku.sendMessage(m.chat, { audio: buff, mimetype: 'audio/mpeg' }, { quoted : m }) + fs.unlinkSync(ran) + }) + } else reply(`رد علي الصوت اللي عاوز تغيرو واكتب _${prefix + command}_`) + } catch (e) { + reply(e) + } + break + + +case 'calculator': case 'cal': case 'calculate':{ + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (args.length < 1) return reply(`*Example :*\n${prefix}calculator 2*5\n\n`) +let qsd = args.join(" ") +if (typeof mathjs.evaluate(qsd) !== 'number') { +reply('Error') +} else { +reply(`\`\`\`「 _Calculator Tool_ 」\`\`\`\n\n*Input :* ${qsd}\n*Calculation Result :* ${mathjs.evaluate(qsd.replace(/×/g, "*").replace(/x/g, "*").replace(/÷/g, "/"))}`) +} +} +break + +case 'public': case 'عام': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!isCreator) return reply(mess.owner) + Miku.public = true + reply('انا الان عام للجميع!') + Miku.setStatus(`حاله البوت عام`) + } + break + + case 'self': case 'خاص': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!isCreator) return reply(mess.botowner) + Miku.public = false + reply('يمكن للمالك فقط استخدامي الآن!') + Miku.setStatus(`حاله البوت خاص`) + } + break + + +case 'لصوره': case 'toimg': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!m.quoted) return reply('رد علي صوره') +if (!/webp/.test(mime)) return reply(`رد علي صوره واكتب الامر *${prefix + command}*`) +reply(mess.waiting) +let media = await Miku.downloadAndSaveMediaMessage(quoted) +let ran = await getRandom('.png') +exec(`ffmpeg -i ${media} ${ran}`, (err) => { +fs.unlinkSync(media) +if (err) throw err +let buffer = fs.readFileSync(ran) +Miku.sendMessage(m.chat, { image: buffer }, { quoted: m}) +fs.unlinkSync(ran) +}) +} +break + +case 'لفيديو': case 'tovideo': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.quoted) return reply('رد علي صوره') + if (!/webp/.test(mime)) return reply(`رد علي استيكر واكتب الامر*${prefix + command}*`) + reply(mess.waiting) + let { webp2mp4File } = require('./lib/uploader') + let media = await Miku.downloadAndSaveMediaMessage(quoted) + let webpToMp4 = await webp2mp4File(media) + await Miku.sendMessage(m.chat, { video: { url: webpToMp4.result, caption: 'اي خدمه يروحي🌚♥...' } }, { quoted: m }) + await fs.unlinkSync(media) + } + break + +case 'لصوتي': case 'toaudio': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!/video/.test(mime) && !/audio/.test(mime)) return reply(`رد علي الفيديو اللي هتحولو لصوت واكتب الامر ${prefix + command}`) + if (!m.quoted) return reply(`رد علي الفيديو اللي هتحولو لصوت واكتب الامر ${prefix + command}`) + reply(mess.waiting) + let media = await quoted.download() + let { toAudio } = require('./lib/converter') + let audio = await toAudio(media, 'mp4') + Miku.sendMessage(m.chat, {audio: audio, mimetype: 'audio/mpeg'}, { quoted : m }) + } +break + +case 'tomp3': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (/document/.test(mime)) return reply(`Send/Reply Video/Audio You Want To Convert Into MP3 With Caption ${prefix + command}`) + if (!/video/.test(mime) && !/audio/.test(mime)) return reply(`Send/Reply Video/Audio You Want To Convert Into MP3 With Caption ${prefix + command}`) + if (!m.quoted) return reply(`Send/Reply Video/Audio You Want To Convert Into MP3 With Caption ${prefix + command}`) + reply(mess.waiting) + let media = await quoted.download() + let { toAudio } = require('./lib/converter') + let audio = await toAudio(media, 'mp4') + Miku.sendMessage(m.chat, {document: audio, mimetype: 'audio/mpeg', fileName: `Converted By ${global.BotName} (${m.id}).mp3`}, { quoted : m }) + } +break + + +case 'togif': case 'لمتحرك': case 'متحركه':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.quoted) return reply('رد علي صوره') + if (!/webp/.test(mime)) return reply(`رد علي استيكر واكتب الامر *${prefix + command}*`) + reply(mess.wait) + let { webp2mp4File } = require('./lib/uploader') + let media = await Miku.downloadAndSaveMediaMessage(quoted) + let webpToMp4 = await webp2mp4File(media) + await Miku.sendMessage(m.chat, { video: { url: webpToMp4.result, caption: 'تم تحويله الي متحرك' }, gifPlayback: true }, { quoted: m }) + await fs.unlinkSync(media) + } + break + + + case 'tourl': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + reply(mess.wait) + let { UploadFileUgu, webp2mp4File, TelegraPh } = require('./lib/uploader') + let media = await Miku.downloadAndSaveMediaMessage(quoted) + if (/image/.test(mime)) { + let anu = await TelegraPh(media) + reply(util.format(anu)) + } else if (!/image/.test(mime)) { + let anu = await UploadFileUgu(media) + reply(util.format(anu)) + } + await fs.unlinkSync(media) + } + break + + + case 'owner': case 'المالك': case 'mod': case 'المطور':{ + Miku.sendContact(m.chat, global.Owner, m) + } + break + +case 'translate': case 'trans': { + if (isBan) return reply(mess.banned) + if (!args.join(" ")) return replay("Pls enter any text to translate") + tes = await fetchJson (`https://megayaa.herokuapp.com/api/translate?to=en&kata=${args.join(" ")}`) + Infoo = tes.info + Detek = tes.translate + replay(`Input : ${Detek}\nTranslation Results : ${Infoo}`) + } + break + + +case 'image': case 'صوره': case 'صورة':{ + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!args[0]) return reply("اكتب اسم الصوره اللي تبحث عنها!") +let gis = require('g-i-s') +gis(args.join(" "), async (error, result) => { +n = result +images = n[Math.floor(Math.random() * n.length)].url +let buttons = [ +{buttonId: `.صوره ${args.join(" ")}`, buttonText: {displayText: '>>'}, type: 1} +] +let buttonMessage = { +image: { url: images }, +caption: `「 *محرك بحث جوجل* 」 + +_Search Term_ : ${text} +_Media Url_ : ${images}`, +footer: `${global.BotName}`, +buttons: buttons, +headerType: 4, + +} +Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) +}) +} +break + + +case 'google': case 'جوجل': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!args[0]) return reply(`مثال: ${prefix + command} <استفسار>\nالاستخدامات : ${prefix + command} ما هو الحب`) + let google = require('google-it') + google({'query': args.join(" ")}).then(res => { + let teks = `「 *محرك بحث جوجل* 」\n\n*مصطلح البحث:* ${text}\n\n\n` + for (let g of res) { + teks += `*العنوان* : ${g.title}\n\n` + teks += `*الوصف* : ${g.snippet}\n\n` + teks += `*اللينك* : ${g.link}\n\n\n -----------------------------------------------------------------------------\n\n` + } + reply(teks) + }) + } + break + + case 'igdl': case 'instagram': case 'انستجرام': case 'igreels': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!args[0]) return reply(`مثال :\n${prefix + command} https://www.instagram.com/p/CcvJGuxh9VI/?igshid=YmMyMTA2M2Y=`) + try { + hx.igdl(args[0]).then(async(resed) => { + ini_anu = [] + anu_list = [] + textbv = `「 *تنزيل انستجرام* 」\n\nاسم المستخدم : ${resed.user.username ? resed.user.name : "undefined"}\nالمتابعين : ${resed.user.followers}` + urut = 1 + for (let i = 0; i < resed.medias.length; i++) { + ini_anu.push({ + "type": resed.medias[i].fileType, + "url": resed.medias[i].url + }) + } + ilod = 1 + for (let i of ini_anu) { + anu_list.push({buttonId: `.انستجرام ${i.type} ${i.url}`, buttonText: {displayText: `وسائل الاعلام ${ilod++}`}, type: 1}) + } + textbv += `\n\n_Select the media below to download_` + let buttons = anu_list + let buttonMessage = { + image:BotLogo, + jpegThumbnail:Thumb, + caption: textbv, + footer: `${global.BotName}`, + buttons: buttons, + headerType: 4 + } + Miku.sendMessage(from, buttonMessage, {quoted:m}) + }) + } catch (err) { + reply("An Error Occured!") + } + } + break + + case 'ig': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (args[0] === "mp4") { +Miku.sendMessage(from, {video:{url:args[1]}, caption:'Here it is...', mimetype:'video/mp4'}, {quoted:m}) +} else if (args[0] === "jpg") { +Miku.sendMessage(from, {image:{url:args[1]}, caption:'Here it is...'}, {quoted:m}) +} else { +reply("Error! ") +} +} +break + +case 'mp4' : { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!args[0]) return reply(`Pls provide link!`) +try { +Miku.sendMessage(from, {video:{url:args[0]}, caption:"Succes!", contextInfo:{externalAdReply:{ +title:`${global.BotName}`, +body:`${global.OwnerName}`, +thumbnail: BotLogo, +mediaType:2, +mediaUrl: `${global.websitex}`, +sourceUrl: `${global.websitex}` +}}}, {quoted:m}) +} catch { +reply("Link error!") +} +} +break + +case 'jpeg': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + if (!args[0]) return reply(`Please provide link!`) + try { + Miku.sendMessage(from, {image:{url:args[0]}, caption:"Success!"}, {quoted:m}) + } catch { + reply("Link error") + } + } + break + + case 'igtv': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!text) return reply(`Please provide link!`) + const { instagramdl, instagramdlv2, instagramdlv3 } = require('@bochilteam/scraper') + if (!isUrl(args[0]) && !args[0].includes('instagram.com')) return reply('*Invalid link!*') + instagramdlv3(`${text}`).then(async (data) => { + var buf = await getBuffer(data[0].thumbnail) + Miku.sendMessage(m.chat, { video: { url: data[0].url }, jpegThumbnail:buf, caption: `${BotName}`}, { quoted: m }) + }).catch((err) => { + reply(mess.error) + }) + } + break + +case 'twitter': case 'تويتر': case 'twitterdl': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + if (!text) return reply(`Please provide link!`) + if (!isUrl(args[0]) && !args[0].includes('twitter.com')) return reply(`*Invalid link!*`) + xfarrapi.Twitter(`${text}`).then(async (data) => { + let txt = `「 *تنزيل تويتر* 」\n\n` + txt += `*العنوان :* ${data.title}\n` + txt += `*الجوده :* ${data.medias[1].quality}\n` + txt += `*وسائل الاعلام :* ${data.medias[1].extension}\n` + txt += `*الحجم :* ${data.medias[1].formattedSize}\n` + txt += `*المده :* ${data.medias.length}\n` + txt += `*عنوانurl :* ${data.url}\n\n` + txt += `*${BotName}*` + buf = await getBuffer(data.thumbnail) + Miku.sendMessage(m.chat, { image: { url: data.thumbnail }, jpegThumbnail:buf, caption: `${txt}` }, { quoted: m }) + for (let i of data.medias) { + Miku.sendMessage(m.chat, { video: { url: i.url }, jpegThumbnail:buf, caption: `*${text}*`}, { quoted: m }) + } + }).catch((err) => { + reply(mess.error) + }) + } + break + +case 'twittermp3': case 'twitteraudio': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + if (!text) return reply(`Please provide link!`) + if (!isUrl(args[0]) && !args[0].includes('twitter.com')) return reply(`*Invalid link!*`) + xfarrapi.Twitter(`${text}`).then(async (data) => { + Miku.sendMessage(m.chat, { audio: { url: data.medias[1].url }, mimetype: 'audio/mp4'}, { quoted: m }) + }).catch((err) => { + reply(mess.reply) + }) + } + break + +case 'twitterxx': case 'twdlxx': case 'twmp4xx': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!args[0]) return reply(`Example :\n${prefix + command} https://twitter.com/cinema21/status/1517754155644821504?t=rUnbyqwh4vAE1QXMXlsVeQ&s=19`) +try { +let lotwit = await aiovideodl(args[0]) +teks = `「 _Twitter Downloader_ 」 +Caption : ${lotwit.title ? lotwit.title : "undefined"} +Type : ${lotwit.medias[1].extension} +Size : ${lotwit.medias[1].formattedSize} +Link : ${lotwit.medias[1].url} +_Please choose the video quality_` +let buttons = [ +{buttonId: `.twitter ${lotwit.medias[0].url}`, buttonText: {displayText: `Quality ${lotwit.medias[0].quality}`}, type: 1}, +{buttonId: `.twitter ${lotwit.medias[2].url}`, buttonText: {displayText: `Quality ${lotwit.medias[2].quality}`}, type: 1} +] +let buttonMessage = { +video: {url:lotwit.medias[1].url}, +caption: teks, +footer: `${pushname}`, +buttons: buttons, +headerType: 4, + +} +Miku.sendMessage(from, buttonMessage, {quoted:m}) +} catch { +reply("Link Error!") +} +} +break + +case 'twddlxx': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + let buttons = [ + {buttonId: `.menu`, buttonText: {displayText: 'القائمه✨'}, type: 1} + ] + let buttonMessage = { + video: {url:args[0]}, + caption: "اي خدمه يروحي🌚♥...", + footer: `${pushname}`, + buttons: buttons, + headerType: 4, + + } + Miku.sendMessage(from, buttonMessage, {quoted:m}) + } + break + + case 'fbdl': case 'فيسبوك': case 'facebook': case 'fbmp4': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!text) return reply(`Please provide the link!\n\nExample: ${prefix}facebook https://www.facebook.com/groups/599913174599515/permalink/705467384044093/`) + if (!isUrl(args[0]) && !args[0].includes('facebook.com')) return reply(`Invalid link!`) + let bocil = require('@bochilteam/scraper') + bocil.facebookdlv2(`${text}`).then(async (data) => { + let txt = `「 *تنزيل فيسبوك* 」\n\n` + txt += `*العنوان :* ${data.title}\n` + txt += `*الجوده :* ${data.result[0].quality}\n` + txt += `*الوصف:* ${data.description}\n` + txt += `*عنوانurl :* ${text}\n\n` + buf = await getBuffer(data.thumbnail) + Miku.sendMessage(m.chat, { image: { url: data.thumbnail }, jpegThumbnail:buf, caption: `${txt}` }, { quoted: m }) + for (let i of data.result) { + Miku.sendMessage(m.chat, { video: { url: i.url }, jpegThumbnail:buf, caption: `*الجوده :* ${i.quality}`}, { quoted: m }) + } + }).catch((err) => { + reply(mess.error) + }) + } + break + +case 'fbmp3': case 'facebookmp3': case 'facebookaudio': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + if (!text) return reply(`Please provide the link!\n\nExample: ${prefix + command} https://www.facebook.com/groups/599913174599515/permalink/705467384044093/`) + if (!isUrl(args[0]) && !args[0].includes('facebook.com')) return reply(`Invalid link!`) + let noh = require('@bochilteam/scraper') + noh.savefrom(`${text}`).then(async (anu) => { + Miku.sendMessage(m.chat, { audio: { url: anu.url[0].url }, mimetype: 'audio/mp4' }, { quoted: m }) + }).catch((err) => { + reply(mess.error) + }) + } + break + + +case 'facebookxx': case 'fbdlxxx': case 'fbmp4xxx': case 'fbxxx': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!args[0]) return reply(`Example :\n${prefix + command} https://fb.watch/cAX2dep-BZ/`) +try { +let resd = await aiovideodl(args[0]) +teks = `「 _Facebook Downloader_ 」 +Type : video/${resd.medias[0].extension} +Quality : ${resd.medias[0].quality} +Size : ${resd.medias[0].formattedSize} +_Click the button below to download_` +let buttons = [ +{buttonId: `.fbdl ${resd.medias[1].url}`, buttonText: {displayText: 'QualityHD'}, type: 1} +] +let buttonMessage = { +video: {url:resd.medias[0].url}, +caption: teks, +footer: `${pushname}`, +buttons: buttons, +headerType: 4, + +} +Miku.sendMessage(from, buttonMessage, {quoted:m}) +} catch { +reply("Link invalid!") +} +} +break + +case 'fbddlxx': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + let buttons = [ + {buttonId: `.menu`, buttonText: {displayText: 'القائمه✨'}, type: 1} + ] + let buttonMessage = { + video: {url:args[0]}, + caption: "Done!", + footer: `${pushname}`, + buttons: buttons, + headerType: 4, + + } + Miku.sendMessage(from, buttonMessage, {quoted:m}) + } + break + + case 'تيكتوك':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!q) return reply('Please provide the link !') +reply(mess.wait) +if (!q.includes('tiktok')) return reply(`Invalid tiktok link!`) + const musim_rambutan = await MikuTiktok(`${q}`).catch(e => { +reply(mess.error) +} ) + console.log(musim_rambutan) + const mikutiktokop = musim_rambutan.result.watermark +texttk = `_اختار من الزر_` +let buttons = [ +{buttonId: `.ttnowm ${q}`, buttonText: {displayText: 'Watermark Free'}, type: 1}, +{buttonId: `.ttaud ${q}`, buttonText: {displayText: 'صوتي '}, type: 1} +] +let buttonMessage = { +video: {url:mikutiktokop}, +caption: texttk, +footer: `${BotName}`, +buttons: buttons, +headerType: 4, + +} +Miku.sendMessage(from, buttonMessage, {quoted:m}) +} +break + +case 'tiktoknowm': case 'ttnowm':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!q) return reply('Please provide the link !') +reply(mess.wait) +if (!q.includes('tiktok')) return reply(`That's not a tiktok link!`) + const musim_rambutan = await MikuTiktok(`${q}`).catch(e => { +reply(mess.error) +} ) + console.log(musim_rambutan) + const mikutiktoknowm = musim_rambutan.result.nowatermark + Miku.sendMessage(from, { video: { url: mikutiktoknowm }, caption: "Here it is..." }, { quoted: m }) + } +break + +case 'tiktokaudio': +case 'tiktokmusic': +case 'ttaud':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!q) return reply('Where is the audio?') +if (!q.includes('tiktok')) return reply(`That's not a tiktok link!`) + const musim_rambutan = await MikuTiktok(`${q}`).catch(e => { +reply(mess.error) +} ) + console.log(musim_rambutan) + const mikutiktokaudio = musim_rambutan.result.nowatermark + Miku.sendMessage(from, { audio: { url: mikutiktokaudio }, mimetype: 'audio/mp4' }, { quoted: m }) + } +break + + + + +case 'play': case 'شغل': case 'song': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + reply(mess.wait) + let yts = require("yt-search") + let search = await yts(text) + let anu = search.videos[Math.floor(Math.random() * search.videos.length)] + let ytvc = await hx.youtube(anu.url) + let buttons = [ + {buttonId: `.ytmp4 ${anu.url}`, buttonText: {displayText: '► فيديو'}, type: 1}, + {buttonId: `.ytmp3 ${anu.url}`, buttonText: {displayText: '♫ صوتي'}, type: 1} + ] + let buttonMessage = { + image: { url: anu.thumbnail}, + caption: `▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ⟮*◉بحث يوتيوب◉*⟯ + +0.02━◉━━━━━━━━━━━━3.26 + 🔂 ⏪ ⏸️ ⏩ 🎵 + + عنوان : ${anu.title} + ايدي : ${anu.videoId} + الوصف : ${anu.timestamp} + المشاهدات : ${anu.views} + التحميل : ${anu.ago} + مؤلف : ${anu.author.name} + القناه : ${anu.author.url} + الرابط : ${anu.url}`, + footer: `${BotName}`, + buttons: buttons, + headerType: 4 + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + } + break + + +case 'بحث': case 'yt2': case 'youtube2':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + reply(mess.wait) +if (!args[0]) return reply(mess.nolink) +try { +hx.youtube(args[0]).then(async(res) => { +textyt = `▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ⟮*◉بحث يوتيوب◉*⟯ + +0.02━◉━━━━━━━━━━━━3.26 + 🔂 ⏪ ⏸️ ⏩ 🎵 +عنوان : ${res.title} +الحجم : ${res.size} +الجوده : ${res.quality} +_حدد الفيديو أو الصوت وانتظر بعض الوقت_` +let buttons = [ +{buttonId: `.ytmp4 ${res.link}`, buttonText: {displayText: '► فيديو'}, type: 1}, +{buttonId: `.ytmp3 ${res.link}`, buttonText: {displayText: '♫ صوتي'}, type: 1} +] +let buttonMessage = { +image: {url:res.thumb}, +caption: textyt, +footer: BotName, +buttons: buttons, +headerType: 4, + +} +Miku.sendMessage(from, buttonMessage, {quoted:m}) +}).catch(_ => _) +} catch { +reply("Error link!") +} +} +break + +case 'play2': case 'تشغيل': { + if (!text) throw `مثال : ${prefix + command} حلقه انمي ناروتو` + let yts = require("yt-search") + let search = await yts(text) + let anu = search.videos[Math.floor(Math.random() * search.videos.length)] + let buttons = [ + {buttonId: `${prefix}ytmp3 ${anu.url}`, buttonText: {displayText: '♫ صوتي'}, type: 1}, + {buttonId: `${prefix}ytmp4 ${anu.url}`, buttonText: {displayText: '► فيديو'}, type: 1} + ] + let buttonMessage = { + image: { url: anu.thumbnail }, + caption: ` +${themeemoji} العنوان : ${anu.title} +${themeemoji} تحويلة : Search +${themeemoji} ايدي : ${anu.videoId} +${themeemoji} مدة : ${anu.timestamp} +${themeemoji} المشاهدات : ${anu.views} +${themeemoji} تحميل في : ${anu.ago} +${themeemoji} مؤلف : ${anu.author.name} +${themeemoji} القناه : ${anu.author.url} +${themeemoji} الوصف : ${anu.description} +${themeemoji} الرابط : ${anu.url}`, + footer: Miku.user.name, + buttons: buttons, + headerType: 4 + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + } + break + case 'ytmp3': case 'ytaudio': { + let { yta } = require('./lib/y2mate2') + if (!text) throw `Example : ${prefix + command} https://youtube.com/watch?v=PtFMh6Tccag%27 128kbps` + let quality = args[1] ? args[1] : '128kbps' + let media = await yta(text, quality) + if (media.filesize >= 100000) return m.reply('File Over Limit '+util.format(media)) + Miku.sendImage(m.chat, media.thumb, `${themeemoji} العنوان : ${media.title}\n${themeemoji} حجم الملف : ${media.filesizeF}\n${themeemoji} الرابط : ${isUrl(text)}\n${themeemoji} النوع : صوتي\n${themeemoji} القرار : ${args[1] || '128kbps'}`, m) + Miku.sendMessage(m.chat, { audio: { url: media.dl_link }, mimetype: 'audio/mpeg', fileName: `${media.title}.mp3` }, { quoted: m }) + } + break + case 'ytmp4': case 'ytvideo': { + let { ytv } = require('./lib/y2mate2') + if (!text) throw `Example : ${prefix + command} https://youtube.com/watch?v=PtFMh6Tccag%27 360p` + let quality = args[1] ? args[1] : '360p' + let media = await ytv(text, quality) + if (media.filesize >= 100000) return m.reply('File Over Limit '+util.format(media)) + Miku.sendMessage(m.chat, { video: { url: media.dl_link }, mimetype: 'video/mp4', fileName: `${media.title}.mp4`, caption: `${themeemoji} العنوان : ${media.title}\n${themeemoji} حجم الملف : ${media.filesizeF}\n${themeemoji} الرابط : ${isUrl(text)}\n${themeemoji} النوع : فيديو\n${themeemoji} القرار : ${args[1] || '360p'}` }, { quoted: m }) + } + break + + case 'ytvd': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + Miku.sendMessage(from, {video:{url:args[0]}, mimetype:"video/mp4", caption:"Here it is...",}, {quoted:m}) + } + break + + case 'ytad': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + Miku.sendMessage(from, {audio:{url:args[0]}, mimetype:"audio/mp4", ptt:true}, {quoted:m}) + } + break + + case 'ytshorts': case 'shorts': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!text) return reply(`*Use ${prefix + command} put yt shorts link*`) + if (!isUrl(args[0]) && !args[0].includes('youtube')) return reply(`The link you provided is not valid!`) + xfarrapi.Youtube(`${text}`).then(async (data) => { + if (data.medias[0].formattedSize.split('MB')[0] >= 999) return reply('*File Over Limit* '+util.format(data)) + cap = ` + 「 *Youtube Shorts* 」 + *TITLE:* ${data.title}\n*QUALITY:* ${data.medias[0].quality}\n*SIZE:* ${data.medias[0].formattedSize}\n*DURATION* ${data.duration}\n*LINK:* ${data.url}\n\n*${BotName}*` + buf = await getBuffer(data.thumbnail) + Miku.sendMessage(m.chat, { image: { url: data.thumbnail }, jpegThumbnail:buf, caption: `${cap}` }, { quoted: m }) + Miku.sendMessage(m.chat, { video: { url: data.medias[0].url }, jpegThumbnail:buf, caption: `*TITLE:* ${data.title}\n*QUALITY:* ${data.medias[0].quality}\n*SIZE:* ${data.medias[0].formattedSize}` }, { quoted: m }) + }).catch((err) => { + reply(mess.reply) + }) + } + break + + +case 'تطقيم': case 'طقم': { +if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) + reply(mess.waiting) + let anu = await fetchJson('https://raw.githubusercontent.com/iamriz7/kopel_/main/kopel.json') + let random = anu[Math.floor(Math.random() * anu.length)] + Miku.sendMessage(m.chat, { image: { url: random.male }, caption: `ولد🙎🏻‍♂️` }, { quoted: m }) + Miku.sendMessage(m.chat, { image: { url: random.female }, caption: `️بنت🙎‍♀️` }, { quoted: m }) + } + break + + + case 'ytmp3x': case 'ytmusicx': { + if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +let { yta } = require('./lib/y2mate') +if (!text) return reply(`Example : ${prefix + command} https://youtube.com/watch?v=PtFMh6Tccag%27 128kbps`) +if (!isUrl(args[0]) && !args[0].includes('youtube.com')) return reply(`The link you provided is invalid`) +let quality = args[1] ? args[1] : '128kbps' +let media = await yta(text, quality) +if (media.filesize >= 999999) return reply('*File Over Limit* '+util.format(media)) +let caption = `*「 Youtube Music 」*\n\n*Title :* ${media.title}\n*File size :* ${media.filesizeF}\n*Url :* ${isUrl(text)}\n*Ext :* MP3\n*Resolution :* ${args[1] || '128kbps'}` +buf = await getBuffer(media.thumb) +Miku.sendMessage(m.chat, { image: { url: media.thumb }, jpegThumbnail:buf, caption: `${caption}` }, { quoted: m }).catch((err) => reply(mess.error)) +Miku.sendMessage(m.chat, {audio:{url:media.dl_link}, mimetype:"audio/mpeg", fileName: `${media.title}.mp3`, quoted: m, contextInfo: { externalAdReply:{title:media.title,body:"YOUTUBE MP3",mediaType:"2",thumbnail:buf,mediaUrl:`${text}`}}}).catch((err) => reply(mess.error)) +} +break + + +case 'ytmp4x': case 'ytvideox': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +let { ytv } = require('./lib/y2mate') +if (!text) return reply(`Example : ${prefix + command} https://youtube.com/watch?v=RNa4thokVJ4 360p`) +if (!isUrl(args[0]) && !args[0].includes('youtube.com')) return reply(`The link you provided is invalid!`) +let quality = args[1] ? args[1] : '360p' +let media = await ytv(text, quality) +if (media.filesize >= 999999) return reply('*File Over Limit* '+util.format(media)) +var capti = `*「 Youtube Video 」*\n\n*Title* : ${media.title}\n*File size* : ${media.filesizeF}\n*Url* : ${isUrl(text)}\n*Ext* : Mp4\n*Resoultion* : ${args[1] || '360p'}` +var buf = await getBuffer(media.thumb) +Miku.sendMessage(m.chat, { image: { url: media.thumb }, jpegThumbnail:buf, caption: `${capti}` }, { quoted: m }) +Miku.sendMessage(m.chat, { video: { url: media.dl_link }, jpegThumbnail:buf, mimetype: 'video/mp4', fileName: `${media.title}.mp4`, caption: `Here you go!` }, { quoted: m }).catch((err) => reply(mess.error)) +} +break + +case 'ytdl': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!text) return reply(mess.nolink) +if (!isUrl(args[0]) && !args[0].includes('youtube.com')) return reply(`The link you provided is invalid`) +anu = await fetchJson(`https://api.akuari.my.id/downloader/youtube?link=${text}`) +if (anu.filesize_video >= 999999) return reply('*File Over Limit* '+util.format(anu)) +tummb = await getBuffer(anu.thumb) +audio = await getBuffer(anu.audio) +Miku.sendMessage(m.chat, {document: audio, mimetype: 'audio/mpeg', fileName: `${anu.title}`}, { quoted : m }).catch((err) => reply(mess.error)) +Miku.sendMessage(m.chat, { video: { url: anu.video }, jpegThumbnail:tummb, caption: `${util.format(anu)}`}, { quoted: m }).catch((err) => reply(mess.error)) +} +break + + +case 'pinterest': case 'pin': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!args.join(" ")) return reply("Pls providea search term!") + try { + hx.pinterest(args.join(" ")).then(async(res) => { + imgnyee = res[Math.floor(Math.random() * res.length)] + let buttons = [ + {buttonId: `.pinterest ${args.join(" ")}`, buttonText: {displayText: '>>'}, type: 1} + ] + let buttonMessage = { + image: { url: imgnyee }, + caption: `Title : ` + args.join(" ") + `\nMedia Url : `+imgnyee, + footer: `${global.BotName}`, + buttons: buttons, + headerType: 4, + + } + Miku.sendMessage(m.chat, buttonMessage, { quoted: m }) + }).catch(_ => _) + } catch { + reply("Error") + } + } + break + + + +case 'زرف': case 'take': case 'سرقة': case 'سرقه':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!args.join(" ")) return reply(`اكتب الامر ويليه حقوق الملصق`) +const swn = args.join(" ") +const pcknm = swn.split("|")[0]; +const atnm = swn.split("|")[1]; +if (m.quoted.isAnimated === true) { +Miku.downloadAndSaveMediaMessage(quoted, "gifee") +Miku.sendMessage(from, {sticker:fs.readFileSync("gifee.webp")},{quoted:m}) +} else if (/image/.test(mime)) { +let media = await quoted.download() +let encmedia = await Miku.sendImageAsSticker(m.chat, media, m, { packname: pcknm, author: atnm }) +await fs.unlinkSync(encmedia) +} else if (/video/.test(mime)) { +if ((quoted.msg || quoted).seconds > 11) return reply('الحد الأقصى المسموح به هو 10 ثواني!') +let media = await quoted.download() +let encmedia = await Miku.sendVideoAsSticker(m.chat, media, m, { packname: pcknm, author: atnm }) +await fs.unlinkSync(encmedia) +} else { +reply(`إرسال صورة او فيديو وقم بالرد وكتابه الامر ${prefix + command}\nيُسمح بمدة الفيديو من 1 إلى 9 ثوانٍ!`) +} +} +break + + + + +case 'smeme': case 'كتابه': case 'اكتب': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +let { TelegraPh } = require('./lib/uploader') +if (!text) return reply(`Send/Reply Photo With Caption ${prefix + command} *text*`) +if (text.includes('|')) return reply(`Send/Reply Photo With Caption ${prefix + command} *text*`) +if (!/image/.test(mime)) return reply(`Send/Reply Photo With Caption ${prefix + command} *text*`) +reply(mess.wait) +mee = await Miku.downloadAndSaveMediaMessage(quoted) +mem = await TelegraPh(mee) +meme = `https://api.memegen.link/images/custom/-/${text}.png?background=${mem}` +memek = await Miku.sendImageAsSticker(m.chat, meme, m, { packname: global.packname, author: global.author }) +await fs.unlinkSync(memek) +} +break + +case 'استيكر': case 'sticker': case 's': case 'ملصق': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (/image/.test(mime)) { + let media = await quoted.download() + let encmedia = await Miku.sendImageAsSticker(m.chat, media, m, { packname: global.packname, author: global.author }) + await fs.unlinkSync(encmedia) + } else if (/video/.test(mime)) { + if ((quoted.msg || quoted).seconds > 11) return reply('حد اقصي10ثواني!') + let media = await quoted.download() + let encmedia = await Miku.sendVideoAsSticker(m.chat, media, m, { packname: global.packname, author: global.author }) + await fs.unlinkSync(encmedia) + } else { + reply(`إرسال صورة او فيديو وقم بالرد وكتابه الامر ${prefix + command}\nيُسمح بمدة الفيديو من 1 إلى 9 ثوانٍ`) + } + } + break + +case 'wiki': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (args.length < 1) return reply('What Are You Looking For?? ') +const res2 = await wikiSearch(q).catch(e => { +return reply('Error Result Not Found!') +}) +const result2 = `*Title :* ${res2[0].judul}\n*Wiki :* ${res2[0].wiki}` +Miku.sendMessage(from, { image : { url : res2[0].thumb }, caption : result2}) +break + +case 'earthquake': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +const tres = await Gempa() +var { Waktu, Lintang, Bujur, Magnitude, Kedalaman, Wilayah, Map } = tres.result +console.log(Map) +const captt = `زمن : ${Waktu}\nخط العرض : ${Lintang}\nخط الطول : ${Bujur}\nمنطقة : ${Wilayah}` +Miku.sendMessage(from, { image : { url : Map }, caption : captt}) +break + +case 'covidinfo': +case 'كوفيد': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +const c = await covid() +var { kasus, kematian, sembuh } = c[0] +Miku.sendMessage(from, {text : `قضية : ${kasus}\n\nتوفي : ${kematian}\n\nتلتئم : ${sembuh}`}, m) +break + + +case 'جواز': case 'زواج': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!m.isGroup) return replay(`${mess.grouponly}`) +let member = participants.map(u => u.id) +let orang = member[Math.floor(Math.random() * member.length)] +let jodoh = member[Math.floor(Math.random() * member.length)] +let jawab = `@${orang.split('@')[0]} 「 معلش زوجناكم لأنكم تصلحون لبعض 🤡 」◣ @${jodoh.split('@')[0]} +「 الي يشوفهم مناسبين لبعض زيي يضغط يب 🤡 」◣` +let menst = [orang, jodoh] +let buttons = [ +{ buttonId: '「 يب هم مناسبين لبعض😂🤡 」◣', buttonText: { displayText: '「 يب هم مناسبين لبعض😂🤡 」◣' }, type: 1 } +] +await Miku.sendButtonText(m.chat, buttons, jawab, Miku.user.name, m, {mentions: menst}) +} +break + +case 'طلقني': case 'طلاق': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!m.isGroup) return replay(`${mess.grouponly}`) +let member = participants.map(u => u.id) +let orang = member[Math.floor(Math.random() * member.length)] +let jodoh = member[Math.floor(Math.random() * member.length)] +let jawab = `@${orang.split('@')[0]} 「 معلش طلقناكم لأنكم لا تصلحون لبعض 💔 」◣ @${jodoh.split('@')[0]} +「 الي يشوفهم مش مناسبين لبعض زيي يضغط يب 🤡 」◣` +let menst = [orang, jodoh] +let buttons = [ +{ buttonId: '「 يب هم مش مناسبين لبعض 💔 」◣', buttonText: { displayText: '「 يب هم مش مناسبين لبعض 💔 」◣' }, type: 1 } +] +await Miku.sendButtonText(m.chat, buttons, jawab, Miku.user.name, m, {mentions: menst}) +} +break + +case 'soulmate': case 'رفيق': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!m.isGroup) return replay(`${mess.grouponly}`) +let member = participants.map(u => u.id) +let me = m.sender +let jodoh = member[Math.floor(Math.random() * member.length)] +let jawab = `👫 رفيق الروح +@${me.split('@')[0]} ❤️ @${jodoh.split('@')[0]}` +let ments = [me, jodoh] +let buttons = [ +{ buttonId: '❤️', buttonText: { displayText: 'كن توأم روحي❤️' }, type: 1 } +] +await Miku.sendButtonText(m.chat, buttons, jawab, Miku.user.name, m, {mentions: ments}) +} +break + +break + +case 'فارقني': case 'فراق': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!m.isGroup) return replay(`${mess.grouponly}`) +let member = participants.map(u => u.id) +let me = m.sender +let jodoh = member[Math.floor(Math.random() * member.length)] +let jawab = ` تم فراقكم 🙂💔 +@${me.split('@')[0]} 💔 @${jodoh.split('@')[0]}` +let ments = [me, jodoh] +let buttons = [ +{ buttonId: '💔', buttonText: { displayText: 'فارقني 💔️' }, type: 1 } +] +await Miku.sendButtonText(m.chat, buttons, jawab, Miku.user.name, m, {mentions: ments}) +} +break + +case 'نسبه-حبك': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!text) return replay(`اعمل منشن علي شخص مثال : ${prefix + command} @Elgazar`) + const gan = ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','97','98','99','100'] + const teng = gan[Math.floor(Math.random() * gan.length)] +Miku.sendMessage(from, { text: `*${command}*\n\nالاسم : ${q}\nالاجابه : *${teng}%*` }, { quoted: m }) + break + +case 'نسبه-جمالك': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!text) return replay(`اعمل منشن علي شخص مثال : ${prefix + command} @Elgazar`) + const can = ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','97','98','99','100'] + const tik = can[Math.floor(Math.random() * can.length)] +Miku.sendMessage(from, { text: `*${command}*\n\nالاسم : ${q}\nالجواب : *${tik}%*` }, { quoted: m }) + break + +case 'awesomecheck': + case 'greatcheck': + case 'gaycheck': + case 'cutecheck': + case 'lesbiancheck': + case 'hornycheck': + case 'prettycheck': + case 'نسبه الكره': + case 'نسبه-الكره': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!text) return replay(`اعمل منشن علي شخص مثال : ${prefix + command} @Elgazar`) + const sangeh = ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','97','98','99','100'] + const sange = sangeh[Math.floor(Math.random() * sangeh.length)] +Miku.sendMessage(from, { text: `*${command}*\n\nالاسم : ${q}\nالجواب : *${sange}%*` }, { quoted: m }) + break + + +case 'شخصيتك': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!text) return replay(`اعمل منشن علي شخص, مثال : ${prefix + command} @Elgazar`) + const Mikutttt =['زفت','واطي','غبي','مطيع','غلبان','جدع','طيب','حبوب','جميل','حمار','محترم','شرموط'] + const taky = Mikutttt[Math.floor(Math.random() * Mikutttt.length)] + Miku.sendMessage(from, { text: `التحقق من الشخصية : ${q}\nالاجابه : *${taky}*` }, { quoted: m }) + break + + case 'dare': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + const dare =[ + "eat 2 tablespoons of rice without any side dishes, if it's dragging you can drink", + "spill people who make you pause", + "call crush/pickle now and send ss", + "drop only emote every time you type on gc/pc for 1 day.", + "say Welcome to Who Wants To Be a Millionaire! to all the groups you have", + "call ex saying miss", + "sing the chorus of the last song you played", + "vn your ex/crush/girlfriend, says hi (name), wants to call, just a moment. I miss🥺👉🏼👈🏼", + "Bang on the table (which is at home) until you get scolded for being noisy", + "Tell random people - I was just told I was your twin first, we separated, then I had plastic surgery. And this is the most ciyusss_ thing", + "mention ex's name", + "make 1 rhyme for the members!", + "send ur whatsapp chat list", + "chat random people with gheto language then ss here", + "tell your own version of embarrassing things", + "tag the person you hate", + "Pretending to be possessed, for example: possessed by dog, possessed by grasshoppers, possessed by refrigerator, etc.", + "change name to *I AM DONKEY* for 24 hours", + "shout *ma chuda ma chuda ma chuda* in front of your house", + "snap/post boyfriend photo/crush", + "tell me your boyfriend type!", + "say *i hv crush on you, do you want to be my girlfriend?* to the opposite sex, the last time you chatted (submit on wa/tele), wait for him to reply, if you have, drop here", + "record ur voice that read *titar ke age do titar, titar ke piche do titar*", + "prank chat ex and say *i love u, please come back.* without saying dare!", + "chat to contact wa in the order according to your battery %, then tell him *i am lucky to hv you!*", + "change the name to *I am a child of randi* for 5 hours", + "type in bengali 24 hours", + "Use selmon bhoi photo for 3 days", + "drop a song quote then tag a suitable member for that quote", + "send voice note saying can i call u baby?", + "ss recent call whatsapp", + "Say *YOU ARE SO BEAUTIFUL DON'T LIE* to guys!", + "pop to a group member, and say fuck you", + "Act like a chicken in front of ur parents", + "Pick up a random book and read one page out loud in vn n send it here", + "Open your front door and howl like a wolf for 10 seconds", + "Take an embarrassing selfie and paste it on your profile picture", + "Let the group choose a word and a well known song. You have to sing that song and send it in voice note", + "Walk on your elbows and knees for as long as you can", + "sing national anthem in voice note", + "Breakdance for 30 seconds in the sitting room😂", + "Tell the saddest story you know", + "make a twerk dance video and put it on status for 5mins", + "Eat a raw piece of garlic", + "Show the last five people you texted and what the messages said", + "put your full name on status for 5hrs", + "make a short dance video without any filter just with a music and put it on ur status for 5hrs", + "call ur bestie, bitch", + "put your photo without filter on ur status for 10mins", + "say i love oli london in voice note🤣🤣", + "Send a message to your ex and say I still like you", + "call Crush/girlfriend/bestie now and screenshot here", + "pop to one of the group member personal chat and Say you ugly bustard", + "say YOU ARE BEAUTIFUL/HANDSOME to one of person who is in top of ur pinlist or the first person on ur chatlist", + "send voice notes and say, can i call u baby, if u r boy tag girl/if girl tag boy", + "write i love you (random grup member name, who is online) in personal chat, (if u r boy write girl name/if girl write boy name) take a snap of the pic and send it here", + "use any bollywood actor photo as ur pfp for 3 days", + "put your crush photo on status with caption, this is my crush", + "change name to I AM GAY for 5 hours", + "chat to any contact in whatsapp and say i will be ur bf/gf for 5hours", + "send voice note says i hv crush on you, want to be my girlfriend/boyfriend or not? to any random person from the grup(if u girl choose boy, if boy choose girl", + "slap ur butt hardly send the sound of slap through voice note😂", + "state ur gf/bf type and send the photo here with caption, ugliest girl/boy in the world", + "shout bravooooooooo and send here through voice note", + "snap your face then send it here", + "Send your photo with a caption, i am lesbian", + "shout using harsh words and send it here through vn", + "shout you bastard in front of your mom/papa", + "change the name to i am idiot for 24 hours", + "slap urself firmly and send the sound of slap through voice note😂", + "say i love the bot owner Fantox through voice note", + "send your gf/bf pic here", + "make any tiktok dance challenge video and put it on status, u can delete it after 5hrs", + "breakup with your best friend for 5hrs without telling him/her that its a dare", + "tell one of your frnd that u love him/her and wanna marry him/her, without telling him/her that its a dare", + "say i love depak kalal through voice note", + "write i am feeling horny and put it on status, u can delete it only after 5hrs", + "write i am lesbian and put it on status, u can delete only after 5hrs", + "kiss your mommy or papa and say i love you😌", + "put your father name on status for 5hrs", + "send abusive words in any grup, excepting this grup, and send screenshot proof here" + ] + const Mikudareww = dare[Math.floor(Math.random() * dare.length)] + buffer = await getBuffer(`https://wallpapercave.com/wp/wp10524609.jpg`) + Miku.sendMessage(from, { image: buffer, caption: '*You have chosen Dare*\n\n'+ Mikudareww }, {quoted:m}) + break + + +case 'truth': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + const truth =[ + "Have you ever liked anyone? How long?", + "If you can or if you want, which gc/outside gc would you make friends with? (maybe different/same type)", + "apa ketakutan terbesar kamu?", + "Have you ever liked someone and felt that person likes you too?", + "What is the name of your friend's ex-girlfriend that you used to secretly like?", + "Have you ever stolen money from your father or mom? The reason?", + "What makes you happy when you're sad?", + "Ever had a one sided love? if so who? how does it feel bro?", + "been someone's mistress?", + "the most feared thing", + "Who is the most influential person in your life?", + "what proud thing did you get this year", + "Who is the person who can make you awesome", + "Who is the person who has ever made you very happy?", + "Who is closest to your ideal type of partner here", + "Who do you like to play with??", + "Have you ever rejected people? the reason why?", + "Mention an incident that made you hurt that you still remember", + "What achievements have you got this year??", + "What's your worst habit at school??", + "What song do you sing most in the shower", + "Have you ever had a near-death experience", + "When was the last time you were really angry. Why?", + "Who is the last person who called you", + "Do you have any hidden talents, What are they", + "What word do you hate the most?", + "What is the last YouTube video you watched?", + "What is the last thing you Googled", + "Who in this group would you want to swap lives with for a week", + "What is the scariest thing thats ever happened to you", + "Have you ever farted and blamed it on someone else", + "When is the last time you made someone else cry", + "Have you ever ghosted a friend", + "Have you ever seen a dead body", + "Which of your family members annoys you the most and why", + "If you had to delete one app from your phone, which one would it be", + "What app do you waste the most time on", + "Have you ever faked sick to get home from school", + "What is the most embarrassing item in your room", + "What five items would you bring if you got stuck on a desert island", + "Have you ever laughed so hard you peed your pants", + "Do you smell your own farts", + "have u ever peed on the bed while sleeping 🤣🤣", + "What is the biggest mistake you have ever made", + "Have you ever cheated in an exam", + "What is the worst thing you have ever done", + "When was the last time you cried", + "whom do you love the most among ur parents", + "do u sometimes put ur finger in ur nosetril🤣", + "who was ur crush during the school days", + "tell honestly, do u like any boy in this grup", + "have you ever liked anyone? how long?", + "do you have gf/bf','what is your biggest fear?", + "have you ever liked someone and felt that person likes you too?", + "What is the name of your ex boyfriend of your friend that you once liked quietly?", + "ever did you steal your mothers money or your fathers money", + "what makes you happy when you are sad", + "do you like someone who is in this grup? if you then who?", + "have you ever been cheated on by people?", + "who is the most important person in your life", + "what proud things did you get this year", + "who is the person who can make you happy when u r sad", + "who is the person who ever made you feel uncomfortable", + "have you ever lied to your parents", + "do you still like ur ex", + "who do you like to play together with?", + "have you ever stolen big thing in ur life? the reason why?", + "Mention the incident that makes you hurt that you still remember", + "what achievements have you got this year?", + "what was your worst habit at school?", + "do you love the bot creator Fantox?", + "have you ever thought of taking revenge from ur teacher?", + "do you like current prime minister of ur country", + "you non veg or veg", + "if you could be invisible, what is the first thing you would do", + "what is a secret you kept from your parents", + "Who is your secret crush", + "whois the last person you creeped on social media", + "If a genie granted you three wishes, what would you ask for", + "What is your biggest regret", + "What animal do you think you most look like", + "How many selfies do you take a day", + "What was your favorite childhood show", + "if you could be a fictional character for a day, who would you choose", + "whom do you text the most", + "What is the biggest lie you ever told your parents", + "Who is your celebrity crush", + "Whats the strangest dream you have ever had", + "do you play pubg, if you then send ur id number" + ] + const mikutruthww = truth[Math.floor(Math.random() * truth.length)] + buffer = await getBuffer(`https://wallpapercave.com/wp/wp10524609.jpg`) + Miku.sendMessage(from, { image: buffer, caption: '*You have chosen Truth*\n'+ mikutruthww }, {quoted:m}) + break + + + +case 'nsfwchiku': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +reply(mess.wait) +nye = `http://api.lolhuman.xyz/api/gimage?apikey=${lolkey}&query=${command}` +Miku.sendMessage(from, {image:{url:nye}, caption:"Master..."}, {quoted:m}) +break + +case 'mediafire': case 'ميديافاير': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!text) return reply(mess.linkm) +if (!isUrl(args[0]) && !args[0].includes('mediafire.com')) return reply(`The link you provided is invalid`) +const baby1 = await mediafireDl(text) +if (baby1[0].size.split('MB')[0] >= 999) return reply('*File Over Limit* '+util.format(baby1)) +const result4 = `「 *التحميل من ميديافاير* 」 + +*Name* : ${baby1[0].nama} +*Size* : ${baby1[0].size} +*Mime* : ${baby1[0].mime} +*Link* : ${baby1[0].link}` +reply(`${result4}`) +Miku.sendMessage(m.chat, { document : { url : baby1[0].link}, fileName : baby1[0].nama, mimetype: baby1[0].mime }, { quoted : m }).catch ((err) => reply(mess.error)) +} +break + +case 'masturbation': case 'jahy': case 'hentai': case 'glasses': case 'gangbang': case 'foot': +case 'femdom': case 'cum': case 'ero': case 'cuckold': case 'blowjob': case 'bdsm': +case 'ahegao': case 'ass': case 'orgy': case 'panties': case 'pussy': case 'thighs': case 'yuri': case 'tentacles': +if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!m.isGroup) return replay(mess.grouponly) +if (!AntiNsfw) return reply(mess.nonsfw) +try{ +reply(mess.waiting) +NoHorny = await fetchJson(`https://myselfff.herokuapp.com/docs/nsfw/${command}`) +YesHorny = await getBuffer(NoHorny.result) +Miku.sendMessage(from, {image:YesHorny},{quoted:m}) +} catch (e) {error("Error")} +break + +case 'spank': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!AntiNsfw) return reply(mess.nonsfw) +reply(mess.waiting) +spankd = await axios.get(`https://nekos.life/api/v2/img/spank`) + let spbuff = await getBuffer(spankd.data.url) +let spgif = await GIFBufferToVideoBuffer(spbuff) + await Miku.sendMessage(m.chat,{video: spgif, gifPlayback:true},{ quoted:m }).catch(err => { + return reply('Error!') + }) +break + +case 'blowjobgif': case 'bj' : + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!AntiNsfw) return reply(mess.nonsfw) +reply(mess.waiting) +bjd = await axios.get(`https://api.waifu.pics/nsfw/blowjob`) + let bjf = await getBuffer(bjd.data.url) +let bjif = await GIFBufferToVideoBuffer(bjf) + await Miku.sendMessage(m.chat,{video: bjif, gifPlayback:true},{ quoted:m }).catch(err => { + return reply('error..') + }) +break + +case 'hentaivid': case 'hentaivideo': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!AntiNsfw) return reply(mess.nonsfw) +reply(mess.waiting) +anu = await hentai() +result912 = anu[Math.floor(Math.random(), anu.length)] +Miku.sendMessage(m.chat, { video: { url: result912.video_1 }, caption: `Title : ${result912.title}\nCategory : ${result912.category}\n$Mimetype : ${result912.type}\nViews : ${result912.views_count}\nShares : ${result912.share_count}\nSource : ${result912.link}\nMedia Url : ${result912.video_1}` }, { quoted: m }) +} +break + +case 'trap' : + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!AntiNsfw) return reply(mess.nonsfw) +reply(mess.waiting) + waifudd = await axios.get(`https://waifu.pics/api/nsfw/${command}`) + let trapbot = [ + {buttonId: `.trap`, buttonText: {displayText: `>>`}, type: 1}, + ] + let button2Messages = { + image: {url:waifudd.data.url}, + caption: `Here it is...`, + buttons: trapbot, + headerType: 1 + } + await Miku.sendMessage(m.chat, button2Messages, { quoted:m }).catch(err => { + return('Error!') + }) +break + +case 'hentai-neko' : +case 'hneko' : + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!AntiNsfw) return reply(mess.nonsfw) +reply(mess.waiting) + waifudd = await axios.get(`https://waifu.pics/api/nsfw/neko`) + let hnekobot = [ + {buttonId: `.${command}`, buttonText: {displayText: `>>`}, type: 1}, + ] + let button3Messages = { + image: {url:waifudd.data.url}, + caption: `Nyaah...`, + buttons: hnekobot, + headerType: 1 + } + await Miku.sendMessage(m.chat, button3Messages, { quoted:m }).catch(err => { + return('Error!') + }) +break + +case 'hentai-waifu' : +case 'hwaifu' : + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!AntiNsfw) return reply(mess.nonsfw) +reply(mess.waiting) + waifudd = await axios.get(`https://waifu.pics/api/nsfw/waifu`) + let nwaifubot = [ + {buttonId: `.${command}`, buttonText: {displayText: `>>`}, type: 1}, + ] + let button4Messages = { + image: {url:waifudd.data.url}, + caption: `Here it is...`, + buttons: nwaifubot, + headerType: 1 + } + await Miku.sendMessage(m.chat, button4Messages, { quoted:m }).catch(err => { + return('Error!') + }) +break + +case 'gasm': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if (!AntiNsfw) return reply(mess.nonsfw) +reply(mess.waiting) + waifudd = await axios.get(`https://nekos.life/api/v2/img/${command}`) + var wbuttsss = [ + {buttonId: `.gasm`, buttonText: {displayText: `>>`}, type: 1}, + ] + let buttonsssMessages = { + image: {url:waifudd.data.url}, + caption: `Here it is...`, + footer: `${global.BotName}`, + buttons: wbuttsss, + headerType: 4 + } + await Miku.sendMessage(m.chat, buttonsssMessages,{ quoted:m }).catch(err => { + return('Error!') + }) +break + + +case 'smug2': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +reply(mess.waiting) + waifudd = await axios.get(`https://nekos.life/api/v2/img/smug`) + var wbuttsss = [ + {buttonId: `.smug2`, buttonText: {displayText: `>>`}, type: 1}, + ] + let button1ssMessages = { + image: {url:waifudd.data.url}, + caption: `Here it is...`, + footer: `${global.BotName}`, + buttons: wbuttsss, + headerType: 4 + } + await Miku.sendMessage(m.chat, button1ssMessages,{ quoted:m }).catch(err => { + return('Error!') + }) +break + +case 'foxgirl': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) + waifudd = await axios.get(`https://nekos.life/api/v2/img/fox_girl`) + var wbuttsss = [ + {buttonId: `.foxgirl`, buttonText: {displayText: `>>`}, type: 1}, + ] + let button12ssMessages = { + image: {url:waifudd.data.url}, + caption: `Awooo...`, + footer: `${global.BotName}`, + buttons: wbuttsss, + headerType: 4 + } + await Miku.sendMessage(m.chat, button12ssMessages,{ quoted:m }).catch(err => { + return('Error!') + }) +break + +case 'نوم' : + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) + waifudd = await axios.get(`https://waifu.pics/api/sfw/nom`) + let xxhnekobot = [ + {buttonId: `.نوم`, buttonText: {displayText: `>>`}, type: 1}, + ] + let xx1button3Messages = { + image: {url:waifudd.data.url}, + caption: `اي خدمه يروحي🌚♥...`, + buttons: xxhnekobot, + headerType: 1 + } + await Miku.sendMessage(m.chat, xx1button3Messages, { quoted:m }).catch(err => { + return('Error!') + }) +break + +case 'وايفي2': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) + waifudd = await axios.get(`https://nekos.life/api/v2/img/waifu`) + var wbuttsss = [ + {buttonId: `.وايفي2`, buttonText: {displayText: `>>`}, type: 1}, + ] + let button112ssMessages = { + image: {url:waifudd.data.url}, + caption: `اي خدمه يروحي🌚♥...`, + footer: `${global.BotName}`, + buttons: wbuttsss, + headerType: 4 + } + await Miku.sendMessage(m.chat, button112ssMessages,{ quoted:m }).catch(err => { + return('Error!') + }) +break + + + +case 'crossplay': case 'crosplay': case 'cosplay': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + const buttons = [ + {buttonId: '.crossplay', buttonText: {displayText: '>>'}, type: 1}, + ] + const cosplybutton = { + image: {url: 'https://hanzz-web.herokuapp.com/api/randomimage/cosplay'}, + caption: "Guess who am i...", + footer: `${global.BotName}`, + buttons: buttons, + headerType: 4 + } + + await Miku.sendMessage(m.chat,cosplybutton, { quoted:m }).catch(err => { + return('Error!') + }) + + break + + + + +case 'نيكو2': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) + waifud = await axios.get('https://waifu.pics/api/sfw/neko') + var wbutsss = [ + {buttonId: `.نيكو2`, buttonText: {displayText: `>>`}, type: 1}, + ] + let buttonssMessage = { + image: {url:waifud.data.url}, + caption: `اي خدمه يروحي🌚♥...`, + footer: `${global.BotName}`, + buttons: wbutsss, + headerType: 4 + } + await Miku.sendMessage(m.chat,buttonssMessage, { quoted:m }).catch(err => { + return('Error!') + }) + break + + + +case 'فيد': +case 'meow': +case 'tickle': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) + waifudd = await axios.get(`https://nekos.life/api/v2/img/${command}`) + var wbuttsss = [ + {buttonId: `.${command}`, buttonText: {displayText: `>>`}, type: 1}, + ] + let buttonssMessages = { + image: {url:waifudd.data.url}, + caption: `اي خدمه يروحي🌚♥...`, + footer: `${global.BotName}`, + buttons: wbuttsss, + headerType: 4 + } + await Miku.sendMessage(m.chat, buttonssMessages,{ quoted:m }).catch(err => { + return('Error!') + }) +break + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +case 'كيري': case 'هاندهولد':{ + + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + var pat = await fetchJson(`https://api.waifu.pics/sfw/${command}`) + try { + let messsender = m.sender +let musers=`` +try { +users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + + ment=[messsender,users] +} catch { + users == "none" + ment=[messsender,m.sender] +} +if(users == "none"){ + musers =`@${m.sender.split("@")[0]} ${command}ed with themself!` + console.log(musers) + +} else { +const rcpp =`@${users.split("@"[0])}` + musers= `@${m.sender.split("@")[0]} ${command}ed with @${users.split("@")[0]} ` + +console.log(musers) +} + const response = await axios.get(pat.url, { responseType: 'arraybuffer' }) + const buffer = Buffer.from(response.data, "utf-8") + var fetchedgif = await GIFBufferToVideoBuffer(buffer) + Miku.sendMessage(m.chat,{video: fetchedgif, gifPlayback:true,mentions:ment,caption:musers},{quoted:m}) + } catch (error) { + console.log(error); + } +} +break + +case 'نوم':{ + + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + var pat = await fetchJson(`https://api.waifu.pics/sfw/${command}`) + try { + let messsender = m.sender +let musers=`` +try { +users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + + ment=[messsender,users] +} catch { + users == "none" + ment=[messsender,m.sender] +} +if(users == "none"){ + musers =`@${m.sender.split("@")[0]} is eating with themself!` + console.log(musers) + +} else { +const rcpp =`@${users.split("@"[0])}` + musers= `@${m.sender.split("@")[0]} is eating with @${users.split("@")[0]} ` + +console.log(musers) +} + const response = await axios.get(pat.url, { responseType: 'arraybuffer' }) + const buffer = Buffer.from(response.data, "utf-8") + var fetchedgif = await GIFBufferToVideoBuffer(buffer) + Miku.sendMessage(m.chat,{video: fetchedgif, gifPlayback:true,mentions:ment,caption:musers},{quoted:m}) + } catch (error) { + console.log(error); + } +} +break + +case 'هاج':{ + + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + var pat = await fetchJson(`https://api.waifu.pics/sfw/${command}`) + try { + let messsender = m.sender +let musers=`` +try { +users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + + ment=[messsender,users] +} catch { + users == "none" + ment=[messsender,m.sender] +} +if(users == "none"){ + musers =`@${m.sender.split("@")[0]} hugged themself!` + console.log(musers) + +} else { +const rcpp =`@${users.split("@"[0])}` + musers= `@${m.sender.split("@")[0]} hugged @${users.split("@")[0]} ` + +console.log(musers) +} + const response = await axios.get(pat.url, { responseType: 'arraybuffer' }) + const buffer = Buffer.from(response.data, "utf-8") + var fetchedgif = await GIFBufferToVideoBuffer(buffer) + Miku.sendMessage(m.chat,{video: fetchedgif, gifPlayback:true,mentions:ment,caption:musers},{quoted:m}) + } catch (error) { + console.log(error); + } +} +break + + +case 'دانسي':{ + + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + var pat = await fetchJson(`https://api.waifu.pics/sfw/${command}`) + try { + let messsender = m.sender +let musers=`` +try { +users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + + ment=[messsender,users] +} catch { + users == "none" + ment=[messsender,m.sender] +} +if(users == "none"){ + musers =`@${m.sender.split("@")[0]} is dancing alone!!` + console.log(musers) + +} else { +const rcpp =`@${users.split("@"[0])}` + musers= `@${m.sender.split("@")[0]} is dancing with @${users.split("@")[0]} ` + +console.log(musers) +} + const response = await axios.get(pat.url, { responseType: 'arraybuffer' }) + const buffer = Buffer.from(response.data, "utf-8") + var fetchedgif = await GIFBufferToVideoBuffer(buffer) + Miku.sendMessage(m.chat,{video: fetchedgif, gifPlayback:true,mentions:ment,caption:musers},{quoted:m}) + } catch (error) { + console.log(error); + } +} +break + +case 'كيل': case 'بات': case 'كيس': case 'بيتي': +case 'بولي': case 'بونك': case 'بوكي': case 'سلاب': +case 'هابي' :{ + + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + var pat = await fetchJson(`https://api.waifu.pics/sfw/${command}`) + try { + let messsender = m.sender +let musers=`` +try { +users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + + ment=[messsender,users] +} catch { + users == "none" + ment=[messsender,m.sender] +} +if(users == "none"){ + musers =`@${m.sender.split("@")[0]} ${command}ed themselves!!` + console.log(musers) + +} else { +const rcpp =`@${users.split("@"[0])}` + musers= `@${m.sender.split("@")[0]} ${command}ed @${users.split("@")[0]} ` + +console.log(musers) +} + const response = await axios.get(pat.url, { responseType: 'arraybuffer' }) + const buffer = Buffer.from(response.data, "utf-8") + var fetchedgif = await GIFBufferToVideoBuffer(buffer) + Miku.sendMessage(m.chat,{video: fetchedgif, gifPlayback:true,mentions:ment,caption:musers},{quoted:m}) + } catch (error) { + console.log(error); + } +} +break + + + +case 'yeet': +case 'wink': case 'سميلي': +case 'wave': case 'بلوش': case 'سموج': case 'جلومب': +case 'كرينج': case 'highfive':{ + + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + var pat = await fetchJson(`https://api.waifu.pics/sfw/${command}`) + try { + let messsender = m.sender +let musers=`` +try { +users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + + ment=[messsender,users] +} catch { + users == "none" + ment=[messsender,m.sender] +} +if(users == "none"){ + musers =`@${m.sender.split("@")[0]} ${command}ed at themself!` + console.log(musers) + +} else { +const rcpp =`@${users.split("@"[0])}` + musers= `@${m.sender.split("@")[0]} ${command}ed at @${users.split("@")[0]} ` + +console.log(musers) +} + const response = await axios.get(pat.url, { responseType: 'arraybuffer' }) + const buffer = Buffer.from(response.data, "utf-8") + var fetchedgif = await GIFBufferToVideoBuffer(buffer) + Miku.sendMessage(m.chat,{video: fetchedgif, gifPlayback:true,mentions:ment,caption:musers},{quoted:m}) + } catch (error) { + console.log(error); + } +} +break +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + + +/* + +case 'كيري': case 'كيل': case 'هاج': case 'بات': case 'lick': case 'كيس': case 'بيتي': case 'yeet': +case 'بولي': case 'بونك': case 'wink': case 'بوكي': case 'نوم': case 'سلاب': case 'سميلي': +case 'wave': case 'بلوش': case 'سموج': case 'جلومب': case 'هابي': case 'دانسي': +case 'كرينج': case 'highfive': case 'هاندهولد': case 'kick': + + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +resggh = await axios.get(`https://nekos.life/api/v2/img/${command}`) +let resffj = await getBuffer(resggh.data.url) +let resmain = await GIFBufferToVideoBuffer(resffj) + await Miku.sendMessage(m.chat,{video: resmain, gifPlayback:true},{ quoted:m }).catch(err => { + return reply('error..') + }) +break + +*/ + + + + +case 'megumin': +if (isBan) return reply(mess.banned) +if (isBanChat) return reply(mess.bangc) +if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) +ud = await axios.get('https://waifu.pics/api/sfw/megumin') +var wbutsss = [ + {buttonId: `.megumin`, buttonText: {displayText: `>>`}, type: 1}, + ] + let buttonzMessage = { + image: {url:ud.data.url}, + caption: `اي خدمه يروحي🌚♥...`, + footer: `${global.BotName}`, + buttons: wbutsss, + headerType: 4 + } +await Miku.sendMessage(m.chat,buttonzMessage, { quoted:m }).catch(err => { + return('Error!') + }) +break + +case 'awoo': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + reply(mess.waiting) + waifudd = await axios.get(`https://waifu.pics/api/sfw/awoo`) + var wbuttsss = [ + {buttonId: `.awoo`, buttonText: {displayText: `>>`}, type: 1}, + ] + let button1Messages = { + image: {url:waifudd.data.url}, + caption: `اي خدمه يروحي🌚♥...`, + footer: `${global.BotName}`, + buttons: wbuttsss, + headerType: 2 + } + await Miku.sendMessage(m.chat, button1Messages, { quoted:m }).catch(err => { + return('Error!') + }) +break + + +case 'animewall2': case 'animewallpaper2': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + reply(mess.waiting) +const { AnimeWallpaper } =require("anime-wallpaper") +if(!q) return reply('Please enter a seach term!') +const wall = new AnimeWallpaper(); + const pages = [1,2,3,4]; + const random=pages[Math.floor(Math.random() * pages.length)] + const wallpaper = await wall + .getAnimeWall4({ title: q, type: "sfw", page: pages }) + .catch(() => null); +const i = Math.floor(Math.random() * wallpaper.length); +var walb = [ + {buttonId: `.animewall2 ${q}`, buttonText: {displayText: `>>`}, type: 1}, + ] + let wal = { + image: {url:wallpaper[i].image}, + caption: `*مصطلح البحث :* ${q}`, + footer: `${global.BotName}`, + buttons: walb, + headerType: 4 + } + await Miku.sendMessage(m.chat, wal,{ quoted:m }).catch(err => { + return('Error!') + }) +break + + +case 'anime': case 'انمي': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + if(!q) return reply(`يرجى تقديم مصطلح البحث!\n\n*مثال:* ${prefix}انمي naruto`) +reply(mess.waiting) +const { Anime } =require("@shineiichijo/marika") + const client = new Anime(); + let anime = await client.searchAnime(q) + let result = anime.data[0]; + console.log(result) + let details = `*العنوان:* ${result.title}\n`; + details += `*الشكل:* ${result.type}\n`; + details += `*الحاله:* ${result.status.toUpperCase().replace(/\_/g, " ")}\n`; + details += `*مجموع الحلقات:* ${result.episodes}\n`; + details += `*المده:* ${result.duration}\n`; + details += `*الانواع:*\n`; + for (let i = 0; i < result.genres.length; i++) { + details += `\t\t\t\t\t\t\t\t${result.genres[i].name}\n`; + } + details += `*مرتكز على:* ${result.source.toUpperCase()}\n`; + details += `*استوديوهات:*\n`; + for (let i = 0; i < result.studios.length; i++) { + details += `\t\t\t\t\t\t\t\t${result.studios[i].name}\n`; + } + details += `*منتجين:*\n`; + for (let i = 0; i < result.producers.length; i++) { + details += `\t\t\t\t\t\t\t\t\t\t${result.producers[i].name}\n`; + } + details += `*انتهى في:* ${result.aired.from}\n`; + details += `*شعبية:* ${result.aired.to}\n`; + details += `*المفضلة:* ${result.popularity}\n`; + details += `*تقيم:* ${result.favorites}\n`; + details += `*تقييم:* ${result.rating}\n`; + details += `*مرتبه:* ${result.rank}\n\n`; + if (result.trailer.url !== null) + details += `*جَرَّار:* ${result.trailer.url}\n\n`; + details += `*الرابط:* ${result.url}\n\n`; + if (result.background !== null) + details += `*خلفيه:* ${result.background}\n\n`; + details += `*الوصف:* ${result.synopsis.replace( + /\[Written by MAL Rewrite]/g, + "" + )}` +Miku.sendMessage(m.chat,{image:{url:result.images.jpg.large_image_url},caption:details},{quoted:m}) +break + +case 'مانجا': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) +const { Manga } =require("@shineiichijo/marika") +const manga = new Manga(); +if(!q) return reply(`اكتب اسم شخصيه انمي للبحث!\n\n_مثال:_ ${prefix}مانجا naruto`) +let srh = await manga.searchManga(q) + let mang = `*Title:* ${srh.data[0].title}\n`; + mang += `*Status:* ${srh.data[0].status}\n`; + mang += `*Total Volumes:* ${srh.data[0].volumes}\n`; + mang += `*Total Chapters:* ${srh.data[0].chapters}\n`; + mang += `*Genres:*\n`; + for (let i = 0; i < srh.data[0].genres.length; i++) { + mang += `\t\t\t\t\t\t\t\t${srh.data[0].genres[i].name}\n`; + } + mang += `*Published on:* ${srh.data[0].published.from}\n`; + mang += `*Score:* ${srh.data[0].scored}\n`; + mang += `*Popularity:* ${srh.data[0].popularity}\n`; + mang += `*Favorites:* ${srh.data[0].favorites}\n`; + mang += `*Authors:*\n`; + for (let i = 0; i < srh.data[0].authors.length; i++) { + mang += `\t\t\t\t\t\t\t\t\t${srh.data[0].authors[i].name} (${srh.data[0].authors[0].type})\n`; + } + mang += `\n*URL:* ${srh.data[0].url}\n\n`; + if (srh.data[0].background !== null) + mang += `*Background:* ${srh.data[0].background}`; + mang += `*Description:* ${srh.data[0].synopsis.replace( + /\[Written by MAL Rewrite]/g, + "" + )}`; +Miku.sendMessage(m.chat,{image:{url:srh.data[0].images.jpg.large_image_url},caption:mang},{quoted:m}) +break + + + +case 'وايفي' : + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) + waifuddd = await axios.get('https://waifu.pics/api/sfw/waifu') + var wbuttsssr = [ + {buttonId: `.وايفي`, buttonText: {displayText: `>>`}, type: 1}, + ] + let button4Messagess = { + image: {url:waifuddd.data.url}, + caption: 'أكثر من وايفي سوف يدمر لايفو الخاص بك بالتأكيد!', + buttons: wbuttsssr, + headerType: 4 + } + + await Miku.sendMessage(m.chat, button4Messagess, { quoted:m }).catch(err => { + return('error..') + }) +break + +case 'نيكو' : + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) + waifuddd = await axios.get('https://waifu.pics/api/sfw/neko') + var wbuttsssr = [ + {buttonId: `.نيكو`, buttonText: {displayText: `>>`}, type: 1}, + ] + let buttonMessagessf = { + image: {url:waifuddd.data.url}, + caption: 'اي خدمه يروحي🌚❤️...', + buttons: wbuttsssr, + headerType: 2 + } + + await Miku.sendMessage(m.chat, buttonMessagessf, { quoted:m }).catch(err => { + return('error..') + }) +break + + +case 'لولي' : + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +reply(mess.waiting) + waifuddd = await axios.get('https://waifu.pics/api/sfw/shinobu') + var wbuttsssr = [ + {buttonId: `.لولي`, buttonText: {displayText: `>>`}, type: 1}, + ] + let buttonMessagessfgr = { + image: {url:waifuddd.data.url}, + caption: 'لا تكن لولي كون!', + buttons: wbuttsssr, + headerType: 2 + } + + await Miku.sendMessage(m.chat, buttonMessagessfgr, { quoted:m }).catch(err => { + return('error..') + }) +break + + +case 'lyrics': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +if (!text) return reply(`Comand usage: ${prefix}lyrics Thunder`) +reply(mess.waiting) +const { lyrics, lyricsv2 } = require('@bochilteam/scraper') +const result = await lyricsv2(text).catch(async _ => await lyrics(text)) +reply(` +*Title :* ${result.title} +*Author :* ${result.author} +*Url :* ${result.link} + +*Lyrics :* ${result.lyrics} + +`.trim()) +} +break + + +case "quotes": + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +var res = await Quotes() +teks = `\n*Author:* ${res.author}\n` +teks += `\n*Quotes:*\n` +teks += `${res.quotes}\n` + +replay(teks) +break + +case "darkjoke": + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) +var res = await Darkjokes() +teks = "\nDarkjokes" +Miku.sendMessage(m.chat, { image : { url : res }, caption: teks }, { quoted : m }) +break + +case 'غادر': case 'اخرج': case 'bye': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + reply(mess.waiting) + if (!isCreator) return replay(`${mess.botowner}`) + await Miku.groupLeave(m.chat).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err))) + } + break + + +case 'bc': case 'شير': case 'bcall': { + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) +if (!isCreator) return replay(mess.botowner) +if (!args.join(" ")) return replay(`الرجاء إدخال نص للبث! \n\nمثال : ${prefix + command} ${global.OwnerName}`) +let anu = await store.chats.all().map(v => v.id) +replay(`إرسال البث إلى ${anu.length} شات\nانتهى الوقت ${anu.length * 1.5} ثواني`) +for (let yoi of anu) { +await sleep(1500) +let btn = [{ +quickReplyButton: { +displayText: 'القائمه✨', +id: '.menu' +} +}, { +quickReplyButton: { +displayText: 'مطور البوت👤', +id: '.owner' +} +}] +let txt = `「 *${global.OwnerName}'شير للكل* 」\n\n${text}` +Miku.send5ButImg(yoi, txt, `${global.BotName}`, BotLogo, btn, Thumb) +} +replay('تم ارسال البث بنجاح !') +} +break + + +case 'help': case 'الاوامر': case 'menu': case 'اوامر': case 'القائمه': case 'انوس':{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + + const helpmenu =`هاي*${pushname}*, + +↲ انا الامبراطور انوس انوس 🦇*, +تم تطويري بواسطة *70ا الامبراطور انوس ❤️*.↲ + +♠️ البادئة الخاصة بي هي: ${prefix} + +*✶━━━✲─ • ❨🤖❩ • ─✲━━━✶* +اوامر قليل ولاكنت نحن نطور البوت يومن على يوم↲ +*كيف صنع بوت وتس ملصقات* *وأوامر كثييره 😍* +*بوت اسطوره🤩* +*رابط الفيديو📽️* ↲ +*كل الروابط في التعليقات* +*اذا واجهتك اي مشكله ادخل* *جروب الدعم💪*↲ +https://youtu.be/8v7smdKSklA +*ملاحظة⚠️* +*سوي اشتراك ولايكي وتعليق حلو مثلك❣️*↲ +https://youtu.be/Ligaee2E-Hc +*كيف تصنع بوت وتس ملصقات وأوامر كثييره بوت خيالي🥳🥳🥳*↲ +https://chat.whatsapp.com/JUngwIYTMVzCxMuismJuOY +*جروب تعليم صناعت بوتات 😍* +*✶━━━✲─ • ❨اوامر اضافيه📀❩ • ─✲━━━✶* +↲بروفايل║ +↲الاوامر ║↲ +↲التسجيل║↲ +↲الدعم║↲ +↲المطور ║↲ +↲انوس ║↲ +↲انطق║↲ +*✶━━━✲─ • ❨اوامر المالك⚜️❩ • ─✲━━━✶* +↲عام║↲ +↲خاص ║↲ +↲حظر║↲ +↲بان║↲ +↲اخرج║↲ +↲انظم║↲ +↲بلوك║↲ +↲فك-البلوك║↲ +↲شير║↲ +*✶━━━✲─ • ❨الجروبات🧰❩ • ─✲━━━✶* +↲منشن ║↲ +↲مخفي ║↲ +↲المتصلين ║↲ +↲حذف║↲ +↲لينك║↲ +↲رستر║↲ +↲رفع║↲ +↲تنزيل ║↲↲ +↲تغيرالبايو║↲ +↲تغيرالصوره║↲ +↲جروب ║↲ +↲طرد║↲ +↲اضافه ║↲ +↲الروابط ║↲ +*✶━━━✲─ • ❨التحميلات❩ • ─✲━━━✶* +↲شغل║↲ +↲تشغيل║↲ +↲انمي ║↲ +↲صوره║↲ +↲تطقيم ║↲ +↲بحث║↲ +↲جوجل ║↲ +↲ملصق║↲ +↲سرقه ║↲ +↲دمج║║↲ +↲ايموجي ║↲ +↲لصوره║↲ +↲لفيديو║↲ +↲لمتحرك║↲ +↲اكتب║↲ +↲لولي║↲ +↲ميديافاير║↲ +↲انستجرام║↲ +↲فيسبوك║↲ +↲تويتر║↲ +↲تيكتوك║↲ +*✶━━━✲─ • ❨🤩المرح🤩❩ • ─✲━━━✶* +↲زواج║↲ +↲طلاق║↲ +↲المستوي║↲ +↲رفيق║↲ +↲فراق║ +↲نسبه-حبك║ +↲نسبه جمالك║ +↲شخصيتك║ +↲عكس║ +↲اختفاء ║ + +*✶━━━✲─ • ❨🤖❩ • ─✲━━━✶ +🪷شكرا لك على استخدام بوتات انوس +🪷اذا اعجبك البوت سوي لايكي واشترك في القناه +🪷اكتب". " قبل كل امر مثل. *. الاوامر* + +🏖️ اكتب: ${prefix} قبل كل امر ليعمل معك البوت + + + + 『 *${global.BotName}* 』 + *تم التطوير بواسطه: الامبراطور انوس * +` + + + let buttonshelpm = [ + + {buttonId: `.owner`, buttonText: {displayText: 'مطور البوت 👤'}, type: 1}, + + {buttonId: `.help`, buttonText: {displayText: 'الاوامر🌺'}, type: 1}, + + {buttonId: `.nsfw on`, buttonText: {displayText: 'قائمه اضافيه 💦'}, type: 1} + ] + let buttonMessage = { + video:fs.readFileSync('./system/miku2.mp4'),gifPlayback:true, + caption: helpmenu, + footer: `${BotName}`, + buttons: buttonshelpm, + headerType: 4 + + } + Miku.sendMessage(m.chat, buttonMessage,{ quoted:m }) + } + +break + + +case '': + if(isCmd){ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + + mikupic ='https://telegra.ph/file/1592262447c5ce8714b60.jpg' + + + const needhelpmenu = `👋. مرحبا بك البداية الخاص بي هيا. *${prefix}*` + + let butRun = [ + {buttonId: `.help`, buttonText: {displayText: 'القائمه✨'}, type: 1} + ] + let buttonMessage = { + video:fs.readFileSync('./system/miku.mp4'),gifPlayback:true, + caption: needhelpmenu, + footer: `${global.BotName}`, + buttons: butRun, + headerType: 4 + } + Miku.sendMessage(m.chat,buttonMessage,{quoted:m}) + } +break + + + +case 'انوس': case 'الامبراطور': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + +const txt = ` انوس بيحبك🌚❤️ / رقمي للتواصل معايا:https://api.whatsapp.com/send?phone=+967730348571 ` +const mikuarray= [ + "https://c.tenor.com/SOeIW-QVZvoAAAPo/scared-the-quintessential-quintuplets.mp4", + "https://c.tenor.com/FDe7lTs0xvMAAAPo/miku-nakano-nakano-miku.mp4", + "https://c.tenor.com/IWKYIP6AMIgAAAPo/miku-nakano-the-quintessential-quintuplets.mp4", + "https://c.tenor.com/qE3H_Ae_jTQAAAPo/miku-nakano-nakano.mp4", + "https://c.tenor.com/9ijVngbm_ZMAAAPo/itsuki-nakano-the-quintessential-quintuplets.mp4", + "https://c.tenor.com/Fz9xGVR_FHAAAAPo/miku-nakano-nakano-miku.mp4", + "https://c.tenor.com/ALV6SZoJZb8AAAPo/gotoubun-corada.mp4", + "https://c.tenor.com/QHefpWiqvN4AAAPo/blush-anime.mp4", + "https://c.tenor.com/NJVFjOYEcsIAAAPo/miku-gotoubun.mp4", + "https://c.tenor.com/DA88NW5x_0wAAAPo/miku-nakano-stare.mp4", + "https://c.tenor.com/zNTH_-ks3GEAAAPo/miku-nakano.mp4", + "https://c.tenor.com/V9XEKQYRwrEAAAPo/miku-nakano-the-quintessential-quintuplets.mp4", + "https://c.tenor.com/GDH4WFhELpAAAAPo/anime-pout.mp4", + "https://c.tenor.com/ME0cvLQiW0kAAAPo/nakano-miku-go-toubun-no-hanayome.mp4", + "https://c.tenor.com/d5pE_0GJUf0AAAPo/miku-nakano.mp4", + "https://c.tenor.com/zNTH_-ks3GEAAAPo/miku-nakano.mp4", + "https://c.tenor.com/pCgBkgDBbnIAAAPo/nakano-miku-go-toubun-no-hanayome.mp4", + "https://c.tenor.com/6GTU3JEtpKoAAAPo/miku-nakano-the-quintessential-quintuplets.mp4", + "https://c.tenor.com/XNbmenhVucMAAAPo/5toubun-no-hanayome-gotoubun-no-hanayome.mp4", + "https://c.tenor.com/lyMqrhEK4scAAAPo/%EC%98%A4%EB%93%B1%EB%B6%84-5%EB%93%B1%EB%B6%84.mp4", + "https://c.tenor.com/vQ9TpmdjfWAAAAPo/cuteness-overload.mp4", + "https://c.tenor.com/PHngM6-NJVwAAAPo/miku-quintessential.mp4", + "https://c.tenor.com/yniTgeiOo4gAAAPo/miku-nakano.mp4", + "https://c.tenor.com/AULffc4ZKFIAAAPo/miku-god-miku.mp4", + "https://c.tenor.com/Y8Y1GbmQSOIAAAPo/miku-nakano-quintessential-quintuplets.mp4", + "https://c.tenor.com/m0EjrelpOfkAAAPo/miku-nakano-nakano-miku.mp4", + "https://c.tenor.com/x6RTarQTMzoAAAPo/miku-nakano.mp4", + "https://c.tenor.com/hUzZGMltInkAAAPo/gotoubun-corada.mp4", + "https://c.tenor.com/9-7azOBpr84AAAPo/miku-nakano-and-i-love-you.mp4", + "https://c.tenor.com/Ed5IC_yxZkoAAAPo/miku-nakano-gotoubun-no-hanayome.mp4", + "https://c.tenor.com/hDKieuZGiU0AAAPo/miku-nakano.mp4", + "https://c.tenor.com/WD8L3QLO024AAAPo/whaatt-the-quintessential-quintuplets.mp4" + + ] + + const mikuselection = mikuarray[Math.floor(Math.random()*mikuarray.length)] + + Miku.sendMessage(from,{video:{url:mikuselection},gifPlayback:true,caption:txt},{quoted:m}) + +break + +case 'add': case 'اضافه':{ + if (!m.isGroup) return replay(mess.grouponly) + if (!isBotAdmins) return replay(mess.botadmin) + let users = m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net' + if (users.length == 0) return replay(`يرجى كتابة رقم الشخص الذي تريد إضافته إلى هذه المجموعة`) + await Miku.groupParticipantsUpdate(m.chat, [users], 'add').then((res) => replay(`تمت إضافة المستخدم بنجاح!`)).catch((err) => replay(`لا يمكن إضافة هذا المستخدم إلى هذه المجموعة!`)) + } + break + + + case "tts": case "انطق": case "قول": case "speak":{ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + + if (!args[0]) return reply("من فضلك اكتب اي شئ انجليزي و سوف انطقه!") + + let texttosay = text + ? text + : m.quoted && m.quoted.text + ? m.quoted.text + : m.text; + const SpeakEngine = require("google-tts-api"); + const texttospeechurl = SpeakEngine.getAudioUrl(texttosay, {lang: "ar", slow: false, host: "https://translate.google.com",}); + Miku.sendMessage(m.chat,{audio: {url: texttospeechurl,},mimetype: "audio/mpeg",fileName: `MikuSpeechEngine.mp3`,},{quoted: m,}); + } + break + + + case 'qr': case 'باركودباركود': + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + if (!m.isGroup) return replay(mess.grouponly) + reply(`جاري إعادة التشغيل .... يرجى الانتظار حتى يستجيب Rep.it ...`) + var replqr = await getBuffer(`https://bot-elgazar-qr--bm077197.repl.co/`) + var qrbutton = [ + {buttonId: `.qr`, buttonText: {displayText: `باركود جديد`}, type: 1} + ] + let bmffg = { + image: replqr, + caption: `امسح الباركود خلال 10-15 ثانية ...`, + footer: `${global.BotName}`, + buttons: qrbutton, + headerType: 4 + } + await Miku.sendMessage(m.chat, bmffg,{ quoted:m }).catch(err => { + return('Error!') + }) + break + + + +default: + + if(isCmd){ + if (isBan) return reply(mess.banned) + if (isBanChat) return reply(mess.bangc) + reply (`لا يوجد امر مبرمج مثل هذا *${pushname}* اكتب *${prefix}الاوامر* للحصول على قائمة الأوامر الكاملة الخاصة بي!`) + + } + + +if (budy.startsWith('=>')) { +if (!isCreator) return reply(mess.botowner) +function Return(sul) { +sat = JSON.stringify(sul, null, 2) +bang = util.format(sat) +if (sat == undefined) { +bang = util.format(sul) +} +return reply(bang) +} +try { +reply(util.format(eval(`(async () => { ${budy.slice(3)} })()`))) +} catch (e) { +Miku.sendMessage(from, {image:ErrorPic, caption:String(e)}, {quoted:m}) +} +} +if (budy.startsWith('>')) { +if (!isCreator) return reply(mess.botowner) +try { +let evaled = await eval(budy.slice(2)) +if (typeof evaled !== 'string') evaled = require('util').inspect(evaled) +await reply(evaled) +} catch (err) { +await Miku.sendMessage(from, {image:ErrorPic, caption:String(err)}, {quoted:m}) +} +} + + + +if (budy.startsWith('$')) { +if (!isCreator) return replay(mess.botowner) +exec(budy.slice(2), (err, stdout) => { +if(err) return Miku.sendMessage(from, {image:ErrorPic, caption:String(err)}, {quoted:m}) +if (stdout) return replay(stdout) +}) +} + + +if (isCmd && budy.toLowerCase() != undefined) { +if (m.chat.endsWith('broadcast')) return +if (m.isBaileys) return +let msgs = global.db.database +if (!(budy.toLowerCase() in msgs)) return +Miku.copyNForward(m.chat, msgs[budy.toLowerCase()], true) +} +} +}catch (err) { +Miku.sendMessage(`${ownertag}@s.whatsapp.net`, util.format(err), {quoted:m}) +console.log(err) +} +} + + +let file = require.resolve(__filename) +fs.watchFile(file, () => { +fs.unwatchFile(file) +console.log(chalk.redBright(`Update ${__filename}`)) +delete require.cache[file] +require(file) +})