From 6212c5e975bcdd44d2bf09bc5dea90ca89c62538 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 13 Mar 2018 17:07:53 -0400 Subject: [PATCH] test --- commands/Owners Only/eval.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commands/Owners Only/eval.js b/commands/Owners Only/eval.js index a6a6916..60798f6 100644 --- a/commands/Owners Only/eval.js +++ b/commands/Owners Only/eval.js @@ -35,7 +35,12 @@ exports.run = async (bot, msg, args) => { } }; - evaled = eval(code); + + const str = `var func = async function() {\n ${code}\n}.bind(this)\nfunc`; + + const toExecute = eval(str); + + return await toExecute(); if (typeof evaled !== 'string') { evaled = require('util').inspect(evaled);