From 2307f164f865ce819b0580746d1beff3c997fe8e Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 22 Sep 2021 12:57:41 +0100 Subject: [PATCH] Update js.js --- modules/js/js.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/js/js.js b/modules/js/js.js index 0d99374..4f1067e 100644 --- a/modules/js/js.js +++ b/modules/js/js.js @@ -12,8 +12,8 @@ var js = function(dbot) { '~js': function(event) { try { var s = new VM({timeout: 1000, sandbox: {}}); - event.reply(s.run(code)); - } catch(err) {} + event.reply(s.run(event.input[1])); + } catch(err) { event.reply(err); } }, // Run JS code un-sandboxed, with access to DBot memory (admin-only).