var safeEval = require('safe-eval'); module.exports = (lib) => { lib.trigger.add({ name: 'bot debug', call: /^\!bot (.*)/i, level: 100, active: 1, func: (e) => { var args = e.message.match(/^\!bot (.*)/i)[1]; var context = { bot: lib.bot, e: e } try { var output = safeEval(args, context); if(typeof(output) != undefined && output !== 'undefined' && output) e.reply(output); } catch(blah) { e.reply('f0ck you!'); } }, desc: 'bot debug' }); };