Skip to content

Commit

Permalink
Fix CommandClient random response selector
Browse files Browse the repository at this point in the history
  • Loading branch information
abalabahaha committed Oct 26, 2017
1 parent 884034c commit dbdd30a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/command/Command.js
Expand Up @@ -123,7 +123,7 @@ class Command {
throw new Error("Invalid command response generator (index " + index + ")");
}
});
this.execute = () => this.responses[Math.floor(Math.random() * this.responses.length)];
this.execute = () => this.responses[Math.floor(Math.random() * this.responses.length)]();
} else if(typeof generator === "function") {
this.execute = generator;
} else {
Expand Down

0 comments on commit dbdd30a

Please sign in to comment.