From dbdd30a86b2e5bb7c94d318dfb5c0a7469021375 Mon Sep 17 00:00:00 2001 From: abalabahaha Date: Wed, 25 Oct 2017 22:13:19 -0700 Subject: [PATCH] Fix CommandClient random response selector --- lib/command/Command.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/command/Command.js b/lib/command/Command.js index b48df39e0..a0a693152 100644 --- a/lib/command/Command.js +++ b/lib/command/Command.js @@ -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 {