From 788af946458edeb7b135bddd607376756e344996 Mon Sep 17 00:00:00 2001 From: Ayrat Hudaygulov Date: Mon, 22 Jul 2024 23:09:42 +0100 Subject: [PATCH] fixed incorrect bot stats (#40) --- src/VahterBanBot/DB.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VahterBanBot/DB.fs b/src/VahterBanBot/DB.fs index a2f7c6f..7bda856 100644 --- a/src/VahterBanBot/DB.fs +++ b/src/VahterBanBot/DB.fs @@ -150,7 +150,7 @@ let getVahterStats(banInterval: TimeSpan option): Task = UNION SELECT 'bot' AS vahter, COUNT(*) AS killCountTotal, - COUNT(*) FILTER (WHERE bbb.banned_at > NOW() - NULL::INTERVAL) AS killCountInterval + COUNT(*) FILTER (WHERE bbb.banned_at > NOW() - @banInterval::INTERVAL) AS killCountInterval FROM (SELECT banned_user_id, MIN(banned_at) AS banned_at FROM banned_by_bot GROUP BY banned_user_id) bbb)