From e2527bf811d9e0a6dbf1b58630d16fa5505292cd Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 25 Nov 2019 23:23:28 +0100 Subject: [PATCH] please --- commands/general/tweet.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/commands/general/tweet.js b/commands/general/tweet.js index 54160a7..5e06066 100644 --- a/commands/general/tweet.js +++ b/commands/general/tweet.js @@ -71,16 +71,19 @@ class tweetCommand extends Command { } // remove zero width space - let text = args.text.replace('​', ''); - if (!text) - return; + let text = ''; + if (args.text) { + text = args.text.replace('​', ''); + + /* + //Filter out swear word + text = filter.clean(text); + */ + + text = rand.random(text, message); + } - /* - //Filter out swear word - text = filter.clean(text); - */ - text = rand.random(text, message); if (text.length > 280) { return message.channel.send('Your message is more than the 280 characters limit!');