diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/Procfile b/Procfile old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/index.js b/index.js old mode 100644 new mode 100755 diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 diff --git a/lib/database.js b/lib/database.js old mode 100644 new mode 100755 diff --git a/lib/logs.js b/lib/logs.js old mode 100644 new mode 100755 diff --git a/lib/print.js b/lib/print.js old mode 100644 new mode 100755 diff --git a/lib/simple.js b/lib/simple.js old mode 100644 new mode 100755 diff --git a/lib/sticker.js b/lib/sticker.js old mode 100644 new mode 100755 diff --git a/lib/uploadImage.js b/lib/uploadImage.js old mode 100644 new mode 100755 diff --git a/lib/webp.js b/lib/webp.js old mode 100644 new mode 100755 diff --git a/lib/y2mate.js b/lib/y2mate.js old mode 100644 new mode 100755 diff --git a/main.js b/main.js old mode 100644 new mode 100755 index 7131f27..e2f3547 --- a/main.js +++ b/main.js @@ -127,7 +127,7 @@ conn.handler = async function (m) { m.exp += 1 let usedPrefix - let user = global.DATABASE._data.users[m.sender] + let _user = global.DATABASE._data.users[m.sender] for (let name in global.plugins) { let plugin = global.plugins[name] if (!plugin) continue @@ -202,7 +202,7 @@ conn.handler = async function (m) { fail('private', m, this) continue } - if (plugin.register && user.registered == false) { // Butuh daftar? + if (plugin.register && _user.registered == false) { // Butuh daftar? fail('unreg', m, this) continue } @@ -239,6 +239,7 @@ conn.handler = async function (m) { console.log(e) if (e) m.reply(util.format(e)) } finally { + // m.reply(util.format(_user)) if (m.limit) m.reply(+ m.limit + ' Limit terpakai') } break diff --git a/package.json b/package.json old mode 100644 new mode 100755 diff --git a/plugins/add.js b/plugins/add.js old mode 100644 new mode 100755 diff --git a/plugins/apakah.js b/plugins/apakah.js old mode 100644 new mode 100755 diff --git a/plugins/apakah2.js b/plugins/apakah2.js old mode 100644 new mode 100755 diff --git a/plugins/attp.js b/plugins/attp.js old mode 100644 new mode 100755 diff --git a/plugins/banchat.js b/plugins/banchat.js old mode 100644 new mode 100755 diff --git a/plugins/base64.js b/plugins/base64.js old mode 100644 new mode 100755 diff --git a/plugins/brainly.js b/plugins/brainly.js old mode 100644 new mode 100755 diff --git a/plugins/broadcast.js b/plugins/broadcast.js old mode 100644 new mode 100755 diff --git a/plugins/broadcastgroups.js b/plugins/broadcastgroups.js old mode 100644 new mode 100755 diff --git a/plugins/broadcastjadibot.js b/plugins/broadcastjadibot.js old mode 100644 new mode 100755 diff --git a/plugins/bucin.js b/plugins/bucin.js old mode 100644 new mode 100755 diff --git a/plugins/buylimit.js b/plugins/buylimit.js old mode 100644 new mode 100755 diff --git a/plugins/calc.js b/plugins/calc.js old mode 100644 new mode 100755 diff --git a/plugins/clear.js b/plugins/clear.js old mode 100644 new mode 100755 diff --git a/plugins/creator.js b/plugins/creator.js old mode 100644 new mode 100755 diff --git a/plugins/daily.js b/plugins/daily.js old mode 100644 new mode 100755 diff --git a/plugins/debounce.js b/plugins/debounce.js old mode 100644 new mode 100755 diff --git a/plugins/delete.js b/plugins/delete.js old mode 100644 new mode 100755 diff --git a/plugins/demote.js b/plugins/demote.js old mode 100644 new mode 100755 diff --git a/plugins/donasi.js b/plugins/donasi.js old mode 100644 new mode 100755 diff --git a/plugins/enable.js b/plugins/enable.js old mode 100644 new mode 100755 diff --git a/plugins/exec.js b/plugins/exec.js old mode 100644 new mode 100755 index 4f7d7b5..86596f4 --- a/plugins/exec.js +++ b/plugins/exec.js @@ -8,12 +8,15 @@ let handler = async (m, { conn, usedPrefix, command, text, noPrefix, args, grou let old = m.exp * 1 try { let i = 15 - let exec = new (async () => {}).constructor('print', 'm', 'handler', 'require', 'conn', 'Array', 'process', 'args', 'groupMetadata', _text) + let f = { + exports: {} + } + let exec = new (async () => {}).constructor('print', 'm', 'handler', 'require', 'conn', 'Array', 'process', 'args', 'groupMetadata', 'module', 'exports', _text) _return = await exec.call(conn, (...args) => { if (--i < 1) return console.log(...args) return conn.reply(m.chat, util.format(...args), m) - }, m, handler, require, conn, CustomArray, process, args, groupMetadata) + }, m, handler, require, conn, CustomArray, process, args, groupMetadata, f, f.exports) } catch (e) { let err = await syntaxerror(_text, 'Execution Function', { allowReturnOutsideFunction: true, diff --git a/plugins/exec2.js b/plugins/exec2.js old mode 100644 new mode 100755 index 2c98ff2..4c08548 --- a/plugins/exec2.js +++ b/plugins/exec2.js @@ -4,9 +4,16 @@ let exec = promisify(cp.exec).bind(cp) let handler = async (m, { conn, isOwner, command, text }) => { if (global.conn.user.jid != conn.user.jid) return m.reply('Executing...') - let { stdout, stderr } = await exec(command.trimStart() + ' ' + text.trimEnd()) - if (stdout.trim()) m.reply(stdout) - if (stderr.trim()) m.reply(stderr) + let o + try { + o = await exec(command.trimStart() + ' ' + text.trimEnd()) + } catch (e) { + o = e + } finally { + let { stdout, stderr } = o + if (stdout.trim()) m.reply(stdout) + if (stderr.trim()) m.reply(stderr) + } } handler.customPrefix = /^[$] / handler.command = new RegExp diff --git a/plugins/fetch.js b/plugins/fetch.js old mode 100644 new mode 100755 diff --git a/plugins/fitnah.js b/plugins/fitnah.js old mode 100644 new mode 100755 diff --git a/plugins/getcode.js b/plugins/getcode.js old mode 100644 new mode 100755 diff --git a/plugins/google.js b/plugins/google.js old mode 100644 new mode 100755 diff --git a/plugins/grouplist.js b/plugins/grouplist.js old mode 100644 new mode 100755 diff --git a/plugins/hlh.js b/plugins/hlh.js old mode 100644 new mode 100755 diff --git a/plugins/ht.js b/plugins/ht.js old mode 100644 new mode 100755 diff --git a/plugins/jadibot.js b/plugins/jadibot.js old mode 100644 new mode 100755 diff --git a/plugins/kapankah.js b/plugins/kapankah.js old mode 100644 new mode 100755 diff --git a/plugins/kapankah2.js b/plugins/kapankah2.js old mode 100644 new mode 100755 diff --git a/plugins/kick.js b/plugins/kick.js old mode 100644 new mode 100755 diff --git a/plugins/leaderboard.js b/plugins/leaderboard.js old mode 100644 new mode 100755 diff --git a/plugins/link.js b/plugins/link.js old mode 100644 new mode 100755 diff --git a/plugins/math.js b/plugins/math.js old mode 100644 new mode 100755 diff --git a/plugins/math_answer.js b/plugins/math_answer.js old mode 100644 new mode 100755 diff --git a/plugins/mention.js b/plugins/mention.js old mode 100644 new mode 100755 diff --git a/plugins/menu.js b/plugins/menu.js old mode 100644 new mode 100755 diff --git a/plugins/nulis.js b/plugins/nulis.js old mode 100644 new mode 100755 diff --git a/plugins/oadd.js b/plugins/oadd.js old mode 100644 new mode 100755 diff --git a/plugins/odemote.js b/plugins/odemote.js old mode 100644 new mode 100755 diff --git a/plugins/okick.js b/plugins/okick.js old mode 100644 new mode 100755 diff --git a/plugins/online.js b/plugins/online.js old mode 100644 new mode 100755 diff --git a/plugins/opengumuman.js b/plugins/opengumuman.js old mode 100644 new mode 100755 diff --git a/plugins/opromote.js b/plugins/opromote.js old mode 100644 new mode 100755 diff --git a/plugins/pay.js b/plugins/pay.js old mode 100644 new mode 100755 diff --git a/plugins/pengumuman.js b/plugins/pengumuman.js old mode 100644 new mode 100755 diff --git a/plugins/play.js b/plugins/play.js old mode 100644 new mode 100755 diff --git a/plugins/profile.js b/plugins/profile.js old mode 100644 new mode 100755 diff --git a/plugins/promote.js b/plugins/promote.js old mode 100644 new mode 100755 diff --git a/plugins/qrcode.js b/plugins/qrcode.js old mode 100644 new mode 100755 diff --git a/plugins/readmore.js b/plugins/readmore.js old mode 100644 new mode 100755 diff --git a/plugins/register.js b/plugins/register.js old mode 100644 new mode 100755 diff --git a/plugins/runningtext.js b/plugins/runningtext.js old mode 100644 new mode 100755 diff --git a/plugins/setbye.js b/plugins/setbye.js old mode 100644 new mode 100755 diff --git a/plugins/setmenu.js b/plugins/setmenu.js old mode 100644 new mode 100755 diff --git a/plugins/setwelcome.js b/plugins/setwelcome.js old mode 100644 new mode 100755 diff --git a/plugins/simsimi.js b/plugins/simsimi.js old mode 100644 new mode 100755 diff --git a/plugins/speed.js b/plugins/speed.js old mode 100644 new mode 100755 diff --git a/plugins/ssweb.js b/plugins/ssweb.js old mode 100644 new mode 100755 diff --git a/plugins/sticker.js b/plugins/sticker.js old mode 100644 new mode 100755 diff --git a/plugins/stopjadibot.js b/plugins/stopjadibot.js old mode 100644 new mode 100755 diff --git a/plugins/styletext.js b/plugins/styletext.js old mode 100644 new mode 100755 diff --git a/plugins/sudo.js b/plugins/sudo.js old mode 100644 new mode 100755 diff --git a/plugins/template.js b/plugins/template.js old mode 100644 new mode 100755 diff --git a/plugins/textpro.js b/plugins/textpro.js old mode 100644 new mode 100755 diff --git a/plugins/toimg.js b/plugins/toimg.js old mode 100644 new mode 100755 diff --git a/plugins/ttp.js b/plugins/ttp.js old mode 100644 new mode 100755 diff --git a/plugins/tts.js b/plugins/tts.js old mode 100644 new mode 100755 diff --git a/plugins/unbanchat.js b/plugins/unbanchat.js old mode 100644 new mode 100755 diff --git a/plugins/unregister.js b/plugins/unregister.js old mode 100644 new mode 100755 diff --git a/plugins/update.js b/plugins/update.js old mode 100644 new mode 100755 diff --git a/plugins/yta.js b/plugins/yta.js old mode 100644 new mode 100755 diff --git a/plugins/ytv.js b/plugins/ytv.js old mode 100644 new mode 100755 diff --git a/src/LICENSE b/src/LICENSE old mode 100644 new mode 100755 diff --git a/src/font/Zahraaa.ttf b/src/font/Zahraaa.ttf old mode 100644 new mode 100755 diff --git a/src/kertas/magernulis1.jpg b/src/kertas/magernulis1.jpg old mode 100644 new mode 100755 diff --git a/test.js b/test.js old mode 100644 new mode 100755 diff --git a/tmp/file b/tmp/file old mode 100644 new mode 100755 diff --git a/views/index.html b/views/index.html old mode 100644 new mode 100755 diff --git a/views/index.js b/views/index.js old mode 100644 new mode 100755 diff --git a/views/style.css b/views/style.css old mode 100644 new mode 100755