1
mirror of git://git.acid.vegas/archive.git synced 2024-11-14 12:16:40 +00:00

acidvegas is a skid

This commit is contained in:
Dionysus 2023-07-25 15:12:26 -04:00
parent 142de532c3
commit 6b6d199ccf
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -64,11 +64,12 @@ class Bot():
if not os.path.exists(FIFO_PATH):
os.mkfifo(FIFO_PATH)
while True:
async with aiofiles.open(FIFO_PATH) as fifo:
async with aiofiles.open(FIFO_PATH, mode='r') as fifo:
while True:
try:
for line in fifo.readlines():
await self.sendmsg(connection.channel, line.rstrip())
content = await fifo.readlines()
for line in content:
await self.sendmsg(connection.channel, line)
await asyncio.sleep(0.1)
except Exception as ex:
try: