test
This commit is contained in:
		@@ -4,7 +4,7 @@ const vm = require('vm');
 | 
				
			|||||||
module.exports = (lib) => {
 | 
					module.exports = (lib) => {
 | 
				
			||||||
  var sandbox = {
 | 
					  var sandbox = {
 | 
				
			||||||
    bot: lib.bot,
 | 
					    bot: lib.bot,
 | 
				
			||||||
    output: "nothing",
 | 
					    output: undefined,
 | 
				
			||||||
    e: null
 | 
					    e: null
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
@@ -19,7 +19,9 @@ module.exports = (lib) => {
 | 
				
			|||||||
      
 | 
					      
 | 
				
			||||||
      vm.runInNewContext('this.output = '+args, sandbox);
 | 
					      vm.runInNewContext('this.output = '+args, sandbox);
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
      e.reply(util.inspect(sandbox.output));
 | 
					      var output = util.inspect(sandbox.output);
 | 
				
			||||||
 | 
					      if(output !== undefined)
 | 
				
			||||||
 | 
					        e.reply(output);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    desc: 'bot debug'
 | 
					    desc: 'bot debug'
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user