Fix the 1 year requirement
This commit is contained in:
parent
4a4fe01742
commit
3ec5d0525b
1 changed files with 3 additions and 0 deletions
|
@ -42,6 +42,9 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset the current date so it checks correctly for the 1 year requirement.
|
||||||
|
date.setTime(Date.now());
|
||||||
|
|
||||||
// If account is less than 1 year old don't accept attachment
|
// If account is less than 1 year old don't accept attachment
|
||||||
if (attachment && interaction.user.createdAt > date.setFullYear(date.getFullYear() - 1)) {
|
if (attachment && interaction.user.createdAt > date.setFullYear(date.getFullYear() - 1)) {
|
||||||
await interaction.editReply({ content: 'Your account need to be 1 year or older to be able to send attachment!' });
|
await interaction.editReply({ content: 'Your account need to be 1 year or older to be able to send attachment!' });
|
||||||
|
|
Loading…
Reference in a new issue