Skip to content

Commit

Permalink
[ Jessi-md 4.8.2 ⏱️ ]
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteshadowofficial authored Jan 19, 2024
1 parent b7b6d2e commit 2c0e5cf
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions plugins/_update.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
let { execSync } = require('child_process')
let handler = async (m, { conn, text }) => {
if (global.conn.user.jid == conn.user.jid) {
let stdout = execSync('git pull' + (m.fromMe && text ? ' ' + text : ''))
require('fs').readdirSync('plugins').map(v=>global.reload('', v))
conn.reply(m.chat, stdout.toString(), m)
}
}
handler.help = ['update']
handler.tags = ['host']
handler.command = /^update$/i
handler.owner = true
handler.mods = false
handler.premium = false
handler.group = false
handler.private = false

handler.admin = false
handler.botAdmin = false

handler.fail = null
handler.exp = 0

module.exports = handler

0 comments on commit 2c0e5cf

Please sign in to comment.