diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-03-13 17:07:53 -0400 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-03-13 17:07:53 -0400 |
| commit | 6212c5e975bcdd44d2bf09bc5dea90ca89c62538 (patch) | |
| tree | c52627c340216f7bf7f7f9a92b7ee8319b142b9f /commands/Owners Only | |
| parent | 95150b7cb868b69a5e06d6b4f7a48dd4fe596477 (diff) | |
| download | PokeBot-6212c5e975bcdd44d2bf09bc5dea90ca89c62538.tar.gz PokeBot-6212c5e975bcdd44d2bf09bc5dea90ca89c62538.tar.bz2 PokeBot-6212c5e975bcdd44d2bf09bc5dea90ca89c62538.zip | |
test
Diffstat (limited to 'commands/Owners Only')
| -rw-r--r-- | commands/Owners Only/eval.js | 7 |
1 files changed, 6 insertions, 1 deletions
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); |
