3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-30 16:09:27 +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) { '~js': function(event) {
try { try {
var s = new VM({timeout: 1000, sandbox: {}}); var s = new VM({timeout: 1000, sandbox: {}});
event.reply(s.run(code)); event.reply(s.run(event.input[1]));
} catch(err) {} } catch(err) { event.reply(err); }
}, },
// Run JS code un-sandboxed, with access to DBot memory (admin-only). // Run JS code un-sandboxed, with access to DBot memory (admin-only).