Update.
This commit is contained in:
parent
edeaceba25
commit
e0f9aca6ab
@ -33,6 +33,7 @@ class Bot:
|
||||
self.rpc = None
|
||||
self.ws = None
|
||||
self.joined = set()
|
||||
self.semaphore = asyncio.Semaphore(1)
|
||||
|
||||
async def on_init(self):
|
||||
logger.debug("Bot initialized.")
|
||||
@ -115,8 +116,10 @@ class Bot:
|
||||
await self.on_idle()
|
||||
|
||||
message = None
|
||||
data = None
|
||||
|
||||
while True:
|
||||
async iwth self.semaphore:
|
||||
data = await rpc.receive()
|
||||
if not data:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user