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:
+1
-1
@@ -1629,7 +1629,7 @@ class CommunityBot(Plugin):
|
|||||||
purge_list[user].append(roomname)
|
purge_list[user].append(roomname)
|
||||||
else:
|
else:
|
||||||
purge_list[user].append(room)
|
purge_list[user].append(room)
|
||||||
time.sleep("sleep")
|
await asyncio.sleep(self.config["sleep"])
|
||||||
except MNotFound:
|
except MNotFound:
|
||||||
pass
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user