Open file in rw
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 16s

This commit is contained in:
Nexus 2024-06-05 01:30:30 +01:00
parent d24dc99a8e
commit babc888422
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -128,10 +128,11 @@ class Client(commands.Bot):
db = redis.asyncio.Redis(**CONFIG["redis"])
while True:
await asyncio.sleep(1)
while not os.path.exists(fifo):
await asyncio.sleep(1)
try:
async with aiofiles.open(fifo, "a") as fifo_fd:
async with aiofiles.open(fifo, "w") as fifo_fd:
async for line in fifo_fd:
log.debug("Webhook reader got this line: %r", line)
try: