From 3ec5d0525b546703e82304a4e227a9ac8fd34a70 Mon Sep 17 00:00:00 2001 From: Supositware Date: Sat, 27 Aug 2022 17:40:10 +0200 Subject: [PATCH] Fix the 1 year requirement --- commands/fun/tweet.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/fun/tweet.js b/commands/fun/tweet.js index 8eca551..67b4f95 100644 --- a/commands/fun/tweet.js +++ b/commands/fun/tweet.js @@ -42,6 +42,9 @@ export default { 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 (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!' });