Skip to content

Commit

Permalink
fixed incorrect bot stats (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
Szer authored Jul 22, 2024
1 parent 9c42e50 commit 788af94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VahterBanBot/DB.fs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ let getVahterStats(banInterval: TimeSpan option): Task<VahterStats> =
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)
Expand Down

0 comments on commit 788af94

Please sign in to comment.