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:
parent
7d9a9eeeff
commit
2307f164f8
@ -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).
|
||||||
|
Loading…
Reference in New Issue
Block a user