Spaces:
Paused
Paused
| /*╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺ | |
| ⭐PROJECT NAME: | |
| SUBZERO WHATSAPP MD BOT | |
| ⭐DEVELOPER | |
| MR FRANK | |
| ⭐ MY TEAM | |
| XERO CODERS | |
| ⭐ OUR WEBSITE | |
| https://github.com/ZwSyntax/SUBZERO-MD | |
| © TRY DECRYPTING IF YOU CAN⚠ | |
| ╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺*/ | |
| const config = require('../config') | |
| const {cmd , commands} = require('../command') | |
| const {sleep} = require('../lib/functions') | |
| cmd({ | |
| pattern: "restart", | |
| alias: ["rebot","reboot"], | |
| react: "🔄", | |
| desc: "restart the bot", | |
| category: "owner", | |
| filename: __filename | |
| }, | |
| async(conn, mek, m,{from, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isAdmins, reply}) => { | |
| try{ | |
| if (!isOwner) return; | |
| const {exec} = require("child_process") | |
| reply("restarting...") | |
| await sleep(1500) | |
| exec("pm2 restart all") | |
| }catch(e){ | |
| console.log(e) | |
| reply(`${e}`) | |
| } | |
| }) | |