Compare commits
2 commits
b31b37051f
...
8863fa6050
Author | SHA1 | Date | |
---|---|---|---|
8863fa6050 | |||
57ad39102f |
2 changed files with 7 additions and 3 deletions
|
@ -48,8 +48,8 @@ class tweetCommand extends Command {
|
|||
}
|
||||
|
||||
// If account is less than 1 year old don't accept attachment
|
||||
if (Attachment[0] && message.author.createdAt > date.setMonth(date.getMonth() - 12)) {
|
||||
return message.channel.send('Your account need to be 6 months or older to be able to send attachment!');
|
||||
if (Attachment[0] && message.author.createdAt > date.setFullYear(date.getFullYear() - 1 )) {
|
||||
return message.channel.send('Your account need to be 1 year or older to be able to send attachment!');
|
||||
}
|
||||
|
||||
if (args.text) {
|
||||
|
|
|
@ -114,7 +114,11 @@ class DownloadCommand extends Command {
|
|||
message.channel.send({
|
||||
embed: Embed,
|
||||
files: [`${os.tmpdir()}/${message.id}compressed.mp4`]
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
return message.channel.send(`${err.name}: ${err.message} ${err.message === 'Request entity too large' ? 'The file size is too big' : ''}`);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
retry++;
|
||||
|
|
Loading…
Reference in a new issue