From 4949cb28384b33314fc344ea73fca0ade7521e74 Mon Sep 17 00:00:00 2001 From: thedragonsinn <98635854+thedragonsinn@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:47:58 +0530 Subject: [PATCH] pmlogger order fix. --- app/plugins/tools/pm_n_tag_logger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/plugins/tools/pm_n_tag_logger.py b/app/plugins/tools/pm_n_tag_logger.py index 4e74369..3cab52c 100644 --- a/app/plugins/tools/pm_n_tag_logger.py +++ b/app/plugins/tools/pm_n_tag_logger.py @@ -146,8 +146,6 @@ async def runner(): cached_list = MESSAGE_CACHE.copy()[first_key] if not cached_list: MESSAGE_CACHE.pop(first_key) - global LAST_PM_LOGGED_ID - LAST_PM_LOGGED_ID = first_key for msg in cached_list: if msg.chat.type == ChatType.PRIVATE: await log_pm(message=msg, key=first_key) @@ -155,6 +153,8 @@ async def runner(): await log_chat(message=msg) MESSAGE_CACHE[first_key].remove(msg) await asyncio.sleep(5) + global LAST_PM_LOGGED_ID + LAST_PM_LOGGED_ID = first_key await asyncio.sleep(15)