forked from Supositware/Haha-Yes
Show error message when image is too big
This commit is contained in:
parent
7e5eb5e4f4
commit
15354ea108
1 changed files with 4 additions and 4 deletions
|
@ -51,10 +51,10 @@ class tweetCommand extends Command {
|
||||||
return message.channel.send('Your account is too new to be able to use this command!');
|
return message.channel.send('Your account is too new to be able to use this command!');
|
||||||
}
|
}
|
||||||
|
|
||||||
const client = this.client;
|
|
||||||
|
|
||||||
if (!Attachment[0] && !args.text) return message.channel.send('You need to input something for me to tweet!');
|
if (!Attachment[0] && !args.text) return message.channel.send('You need to input something for me to tweet!');
|
||||||
|
|
||||||
|
const client = this.client;
|
||||||
|
|
||||||
let T = new Twit({
|
let T = new Twit({
|
||||||
consumer_key: twiConsumer,
|
consumer_key: twiConsumer,
|
||||||
consumer_secret: twiConsumerSecret,
|
consumer_secret: twiConsumerSecret,
|
||||||
|
@ -148,6 +148,7 @@ class tweetCommand extends Command {
|
||||||
|
|
||||||
T.post('statuses/update', options, function (err, response) {
|
T.post('statuses/update', options, function (err, response) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
if (err.code == 324) return message.channel.send(err.message);
|
||||||
console.error('OH NO!!!!');
|
console.error('OH NO!!!!');
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('OH NO!!! AN ERROR HAS OCCURED!!! please hold on while i find what\'s causing this issue! ');
|
return message.channel.send('OH NO!!! AN ERROR HAS OCCURED!!! please hold on while i find what\'s causing this issue! ');
|
||||||
|
@ -179,7 +180,6 @@ class tweetCommand extends Command {
|
||||||
|
|
||||||
channel = client.channels.get(twiChannel);
|
channel = client.channels.get(twiChannel);
|
||||||
channel.send({embed: Embed});
|
channel.send({embed: Embed});
|
||||||
|
|
||||||
return message.channel.send(`Go see ur epic tweet https://twitter.com/i/status/${tweetid}`);
|
return message.channel.send(`Go see ur epic tweet https://twitter.com/i/status/${tweetid}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue