This commit is contained in:
retoor 2025-08-30 15:39:27 +02:00
parent edeaceba25
commit e0f9aca6ab

View File

@ -33,6 +33,7 @@ class Bot:
self.rpc = None self.rpc = None
self.ws = None self.ws = None
self.joined = set() self.joined = set()
self.semaphore = asyncio.Semaphore(1)
async def on_init(self): async def on_init(self):
logger.debug("Bot initialized.") logger.debug("Bot initialized.")
@ -115,8 +116,10 @@ class Bot:
await self.on_idle() await self.on_idle()
message = None message = None
data = None
while True: while True:
async iwth self.semaphore:
data = await rpc.receive() data = await rpc.receive()
if not data: if not data:
return return