diff --git a/commands/commit-count.js b/commands/commit-count.js index 3cb4bc2..88ef35a 100644 --- a/commands/commit-count.js +++ b/commands/commit-count.js @@ -125,8 +125,7 @@ module.exports = { const messageList = messageMap.get(date); for (const messageId of messageList) { - // Complicated... But TLDR gives priority to Commit URL, then Attachment, then Reaction - if (verifyReason == '' || verifyReason != 'Attachment' || verifyReason != 'Reaction') { + if (verifyReason == '') { await interaction.channel.messages .fetch(messageId) .then(async (message) => { @@ -134,19 +133,19 @@ module.exports = { /http.:\/\/.*\/(commit|compare|pull)\/.*/g.test(message.content) ) { dateVerified = true; - verifyReason = 'Commit URL'; + verifyReason = '[Commit URL](https://discord.com/channels/${message.guildId}/${message.channel.id}/${message.id})'; } - else if ((message.attachments.size > 0) && verifyReason != 'Commit URL') { + else if ((message.attachments.size > 0)) { dateVerified = true; - verifyReason = 'Attachment'; + verifyReason = '[Attachment](https://discord.com/channels/${message.guildId}/${message.channel.id}/${message.id})'; } - else if ((message.reactions.cache.size > 0) && verifyReason != 'Commit URL' && verifyReason != 'Attachment') { + else if ((message.reactions.cache.size > 0)) { for (const reaction of message.reactions.cache.values()) { const emojiName = reaction._emoji.name; if (emojiName === emojiCheck) { dateVerified = true; - verifyReason = 'Reaction'; + verifyReason = `[Reaction](https://discord.com/channels/${message.guildId}/${message.channel.id}/${message.id})`; break; } }