hubot-bustabit
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -10,3 +10,3 @@ // When you log in to bustabit.com select the "AUTO" tab, then at the | ||
const USER = engine.getUsername(); | ||
var won = false; // Keep track of whether we won or lost. | ||
var won; // Keep track of whether we won or lost. | ||
@@ -30,4 +30,4 @@ // Update the server with game information. | ||
// User won. | ||
engine.on('cashed_out', function(resp) { | ||
if(resp.username === USER) { | ||
engine.on('cashed_out', function(data) { | ||
if(data.username === USER) { | ||
won = true; | ||
@@ -43,7 +43,7 @@ updateServer('win=true&balance='+engine.getBalance()) | ||
xmlhttp.onreadystatechange = function() { | ||
if (this.readyState == 4 && this.status == 200) { | ||
bet = JSON.parse(this.responseText); | ||
if(this.readyState === 4 && this.status === 200) { | ||
let bet = JSON.parse(this.responseText); | ||
if(bet.size) { | ||
engine.placeBet(bet.size*100, parseInt(bet.ratio*100), false); | ||
won = false; | ||
engine.placeBet(bet.size*100, parseInt(bet.ratio*100), false) | ||
} | ||
@@ -50,0 +50,0 @@ } |
@@ -50,3 +50,3 @@ { | ||
}, | ||
"version": "1.1.0" | ||
"version": "1.2.0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package