From babc888422626e84f708f74e1bff1d4a5285e687 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Wed, 5 Jun 2024 01:30:30 +0100 Subject: [PATCH] Open file in rw --- src/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index fcf7ff7..4b0fce6 100644 --- a/src/main.py +++ b/src/main.py @@ -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: