From 4e380f72863a0b32cadcde9fd583a8f00d0a60cf Mon Sep 17 00:00:00 2001 From: Vlad Rud Date: Mon, 16 Aug 2021 20:52:51 +0300 Subject: [PATCH] Fixed karmaCooldown --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f900b87..3b594b5 100644 --- a/index.js +++ b/index.js @@ -588,7 +588,7 @@ async function processKarma(msg, match, settings={}) { // Дальше страшная строка для поиска недавних карма-выстрелов одного юзера другому console.log("OLD CARMA SHOTS: ") console.log({CarmaShots}) - const carmaShot = CarmaShots.find((val, id) => val.from === from.id && val.to === to.id && (Date.now() - val.date) < chat.options.karmaCooldown) + const carmaShot = CarmaShots.find((val, id) => val.from === from.id && val.to === to.id && (Date.now() - val.date) < chat.options.karmaCooldown * 1000) console.log("FOUND SHOT: ") console.log({carmaShot}) if (carmaShot) {