From 5b2b61329f6c80a9a1627b2deb94ab997a5e190b Mon Sep 17 00:00:00 2001 From: Nayan <33187059+GShadow5@users.noreply.github.com> Date: Mon, 25 Aug 2025 23:21:34 -0400 Subject: [PATCH] fix no chat in discord --- bot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index bcb06c1..1a5ca45 100644 --- a/bot.py +++ b/bot.py @@ -89,6 +89,7 @@ async def _read_from_pipe(servername, channel_id, bot_instance): if not channel: print(f"Error: Discord channel with ID {channel_id} not found.") return + print(f"Sending to channel {channel_id}") print(f"Attempting to open named pipe for reading: {pipe_path}") try: @@ -171,7 +172,8 @@ async def _read_from_pipe(servername, channel_id, bot_instance): # Limit message length for Discord if necessary if len(discord_message) > 2000: discord_message = discord_message[:1997] + "..." - await channel.send(discord_message) + print(discord_message) + await bot.loop.create_task(channel.send(discord_message)) # else: # # Optionally, you can log other server output to a debug channel or console # print(f"Non-chat output: {line}")