mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
fix js crash
This commit is contained in:
parent
53103c6842
commit
96b2dd0ddd
@ -13,9 +13,11 @@ var js = function(dbot) {
|
||||
var commands = {
|
||||
// Run JS code sandboxed, return result to channel.
|
||||
'~js': function(event) {
|
||||
s.run(event.input[1], function(output) {
|
||||
event.reply(output.result);
|
||||
}.bind(this));
|
||||
try {
|
||||
s.run(event.input[1], function(output) {
|
||||
event.reply(output.result);
|
||||
}.bind(this));
|
||||
} catch(err) {}
|
||||
},
|
||||
|
||||
// Run JS code un-sandboxed, with access to DBot memory (admin-only).
|
||||
|
Loading…
Reference in New Issue
Block a user