From c20649e14aadd5c2e562f1a9306100c1240ea983 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 28 Dec 2019 11:49:51 -0500 Subject: [PATCH] Made the discord notification show votes after vote happened. --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 401f5fa..916b0f6 100644 --- a/index.js +++ b/index.js @@ -373,8 +373,10 @@ app.get('/api/voteOnSponsorTime', function (req, res) { json: { "embeds": [{ "title": data.items[0].snippet.title, - "url": "https://www.youtube.com/watch?v=" + submissionInfoResult.row.videoID + "&t=" + (submissionInfoResult.row.startTime.toFixed(0) - 2), - "description": "**" + row.votes + " Votes | " + row.views + " Views**\n\nSubmission ID: " + UUID + + "url": "https://www.youtube.com/watch?v=" + submissionInfoResult.row.videoID + + "&t=" + (submissionInfoResult.row.startTime.toFixed(0) - 2), + "description": "**" + (row.votes + incrementAmount - oldIncrementAmount) + " Votes | " + row.views + + " Views**\n\nSubmission ID: " + UUID + "\n\nSubmitted by: " + submissionInfoResult.row.userID + "\n\nTimestamp: " + getFormattedTime(submissionInfoResult.row.startTime) + " to " + getFormattedTime(submissionInfoResult.row.endTime), "color": 10813440,