From 95ccaf947868551c45546bbf0823ebfac835bbcd Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 28 Dec 2019 00:38:22 -0500 Subject: [PATCH] Increased downvote power and VIP downvote power. --- index.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index b6ffa3f..c85910b 100644 --- a/index.js +++ b/index.js @@ -325,7 +325,7 @@ app.get('/api/voteOnSponsorTime', function (req, res) { } else if (votesRow.type == 2) { //extra downvote oldIncrementAmount = -4; - } else if (votesRow.type <= -25) { + } else if (votesRow.type < 0) { //vip downvote oldIncrementAmount = votesRow.type; } @@ -340,13 +340,12 @@ app.get('/api/voteOnSponsorTime', function (req, res) { db.prepare("SELECT votes, views FROM sponsorTimes WHERE UUID = ?").get(UUID, async function(err, row) { if (vipResult.row.userCount != 0 && incrementAmount < 0) { //this user is a vip and a downvote - //their vote should be -25 or -80% - incrementAmount = -Math.max(25, Math.floor(row.votes * 0.8)); + incrementAmount = -Math.min(350, Math.floor(row.votes + 2)); + type = incrementAmount; + } else if (row != null && (row.votes > 8 || row.views > 15) && incrementAmount < 0) { + //increase the power of this downvote + incrementAmount = -10; type = incrementAmount; - } else if (row != null && (row.votes > 3 || row.views > 4) && incrementAmount < 0) { - //multiply the power of this downvote - incrementAmount *= 4; - type = 2; } // Send discord message