diff --git a/src/stat.py b/src/stat.py index 43f033d..28f59a9 100644 --- a/src/stat.py +++ b/src/stat.py @@ -17,8 +17,8 @@ async def biomod(client, c): stats_most_chats = bio.most_infect_spam_chats.most_common() stats_most_chats = str(stats_most_chats).replace(',', '\n') when = datetime.timestamp(event.date) - count_eaten = int(c.execute(f"SELECT COUNT(*) FROM `avocado` WHERE expr_int <= {when} LIMIT 1").fetchone()[0]) - count_not_eaten = int(c.execute(f"SELECT COUNT(*) FROM `avocado` WHERE expr_int = 0 LIMIT 1").fetchone()[0]) + count_eaten = int(c.execute(f"SELECT COUNT(*) FROM `avocado` WHERE expr_int >= {when} LIMIT 1").fetchone()[0]) + count_not_eaten = int(c.execute(f"SELECT COUNT(*) FROM `avocado` WHERE expr_int == 0 LIMIT 1").fetchone()[0]) msg = "Session stats:\n" \ f"Medkit usage: {bio.medkit_usage}\n" \ f"Victims in db (eaten/not eaten): {count_eaten}/{count_not_eaten}\n" \