If message is more than 280 characters send message to tell about it

This commit is contained in:
Loïc Bersier 2019-07-24 00:52:37 +02:00
parent 71f7d3beb6
commit 27244b6867

View file

@ -52,6 +52,10 @@ class tweetCommand extends Command {
text = rand.random(text, message);
if (text.length > 280) {
return message.channel.send('Your message is more than the 280 characters limit!');
}
try {
let client = new Twitter({
consumer_key: twiConsumer,