From 152e6d08b5ea1ebd329baa91e3a0a60cd9e7e1f5 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 30 Dec 2024 18:03:52 -0600 Subject: [PATCH] Change end date again --- commands/commit-count.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/commands/commit-count.js b/commands/commit-count.js index 826d3b0..0f0b7d9 100644 --- a/commands/commit-count.js +++ b/commands/commit-count.js @@ -134,11 +134,11 @@ module.exports = { /http.:\/\/.*\/(commit|compare|pull)\/.*/g.test(message.content) ) { dateVerified = true; - verifyReason = `Commit URL - ${message.id} - ${date}`; + verifyReason = 'Commit URL'; } else if ((message.attachments.size > 0) && verifyReason != 'Commit URL') { dateVerified = true; - verifyReason = `Attachment - ${message.id} - ${date}`; + verifyReason = 'Attachment'; } else if ((message.reactions.cache.size > 0) && verifyReason != 'Commit URL' && verifyReason != 'Attachment') { for (const reaction of message.reactions.cache.values()) { @@ -146,7 +146,7 @@ module.exports = { if (emojiName === emojiCheck) { dateVerified = true; - verifyReason = `Reaction - ${message.id} - ${date}`; + verifyReason = 'Reaction'; break; } } @@ -179,7 +179,10 @@ module.exports = { interaction.options.getString('start-date') ?? threadStarterMessage.createdTimestamp, ); - const endDate = new Date(); + const endDate = new Date( + interaction.options.getString('end-date') ?? + new Date(), + ); while (currentDate <= endDate) { allDays.push(new Date(currentDate));