fix bstat db counters
This commit is contained in:
parent
8c81fe5c5e
commit
d59552ae7d
1 changed files with 2 additions and 2 deletions
|
@ -17,8 +17,8 @@ async def biomod(client, c):
|
||||||
stats_most_chats = bio.most_infect_spam_chats.most_common()
|
stats_most_chats = bio.most_infect_spam_chats.most_common()
|
||||||
stats_most_chats = str(stats_most_chats).replace(',', '\n')
|
stats_most_chats = str(stats_most_chats).replace(',', '\n')
|
||||||
when = datetime.timestamp(event.date)
|
when = datetime.timestamp(event.date)
|
||||||
count_eaten = int(c.execute(f"SELECT COUNT(*) FROM `avocado` WHERE expr_int <= {when} 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])
|
count_not_eaten = int(c.execute(f"SELECT COUNT(*) FROM `avocado` WHERE expr_int == 0 LIMIT 1").fetchone()[0])
|
||||||
msg = "Session stats:\n" \
|
msg = "Session stats:\n" \
|
||||||
f"Medkit usage: {bio.medkit_usage}\n" \
|
f"Medkit usage: {bio.medkit_usage}\n" \
|
||||||
f"Victims in db (eaten/not eaten): {count_eaten}/{count_not_eaten}\n" \
|
f"Victims in db (eaten/not eaten): {count_eaten}/{count_not_eaten}\n" \
|
||||||
|
|
Loading…
Reference in a new issue