Fix shelve counter.

This commit is contained in:
Rykov7
2023-12-23 22:24:56 +03:00
parent d10f567e2e
commit e9cb03814f
+1 -1
View File
@@ -14,7 +14,7 @@ def increment(chat_id: int, banned: bool = True):
Увеличивает счетчик банов или удаленных
"""
category = "Banned" if banned else "Deleted"
with shelve.open(f"{DATA}{chat_id}") as shelve_db:
with shelve.open(f"{DATA}{chat_id}", writeback=True) as shelve_db:
shelve_db[category] += 1