mirror of
https://github.com/cdryzun/tg_bot_collections.git
synced 2025-08-05 13:16:42 +08:00
fix: 30 days clean message
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
@ -154,7 +154,7 @@ class MessageStore:
|
|||||||
]
|
]
|
||||||
|
|
||||||
def _clean_old_messages(
|
def _clean_old_messages(
|
||||||
self, chat_id: int, conn: sqlite3.Connection, days: int = 7
|
self, chat_id: int, conn: sqlite3.Connection, days: int = 30
|
||||||
) -> None:
|
) -> None:
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
threshold_date = datetime.now(tz=timezone.utc) - timedelta(days=days)
|
threshold_date = datetime.now(tz=timezone.utc) - timedelta(days=days)
|
||||||
|
Reference in New Issue
Block a user