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"].
This commit is contained in:
2026-04-09 09:08:51 +02:00
committed by GitHub
parent 5a1ed5aa1a
commit 7373b9a856
+1 -1
View File
@@ -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: