This commit is contained in:
loicbersier 2019-11-25 23:23:28 +01:00
parent ea5d0a50de
commit e2527bf811

View file

@ -71,9 +71,9 @@ class tweetCommand extends Command {
} }
// remove zero width space // remove zero width space
let text = args.text.replace('', ''); let text = '';
if (!text) if (args.text) {
return; text = args.text.replace('', '');
/* /*
//Filter out swear word //Filter out swear word
@ -81,6 +81,9 @@ class tweetCommand extends Command {
*/ */
text = rand.random(text, message); text = rand.random(text, message);
}
if (text.length > 280) { if (text.length > 280) {
return message.channel.send('Your message is more than the 280 characters limit!'); return message.channel.send('Your message is more than the 280 characters limit!');