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));