3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-29 06:02:39 +01:00

Update js.js

This commit is contained in:
reality 2021-09-22 12:57:41 +01:00 committed by GitHub
parent 7d9a9eeeff
commit 2307f164f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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).