From d88df331f1719256c5a4aa746762bdbdd29d4bdf Mon Sep 17 00:00:00 2001 From: filipnyquist Date: Fri, 6 Jul 2018 16:45:30 +0200 Subject: [PATCH] Fixed message size --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 2eca5c8..e418d2a 100644 --- a/index.js +++ b/index.js @@ -43,6 +43,8 @@ stream.on("tweet", function(tweet) { if(tweet.user.screen_name === config.get("bot.handle").substring(1)) return; let msg = checkTrunc(tweet); msg = msg.slice(msg.indexOf(config.get("bot.handle"))).split(" "); + msg = msg.filter(a => a !== config.get("bot.handle")); + msg.unshift(config.get("bot.handle")); if (msg.length >= 2) checkTweet(tweet, msg); });