From 7373b9a8567229018da2a3d0784b504e6526e178 Mon Sep 17 00:00:00 2001 From: Dome Date: Thu, 9 Apr 2026 09:08:51 +0200 Subject: [PATCH] fix: correct sleep logic in kick_users loop - Fixed a bug where a string literal "sleep" was passed to the delay function. - Switched from blocking time.sleep() to non-blocking await asyncio.sleep() to ensure the bot remains responsive during large purge operations. - The delay now correctly pulls the numerical value from self.config["sleep"]. --- community/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community/bot.py b/community/bot.py index 8d9ffa3..f5604c6 100644 --- a/community/bot.py +++ b/community/bot.py @@ -1629,7 +1629,7 @@ class CommunityBot(Plugin): purge_list[user].append(roomname) else: purge_list[user].append(room) - time.sleep("sleep") + await asyncio.sleep(self.config["sleep"]) except MNotFound: pass except Exception as e: