From 57483e56b5117a49f6a7e83236f895fd478652a9 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Mon, 28 Jan 2019 23:06:45 +0100 Subject: Can't have '\n' characters in messages... --- jh-discord.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jh-discord.py b/jh-discord.py index c377175..a193568 100644 --- a/jh-discord.py +++ b/jh-discord.py @@ -79,7 +79,12 @@ async def on_message(message): if (message.author.id == client.user.id): return - server.sendall(b"?RLR " + bytes(message.content, "utf8") + b"\n") + server.sendall( + b"?RLR " + + bytes(message.content.replace('\n', ' '), "utf8") + + b"\n" + ) + result = get_jh_reply() if (args.print_chat): -- cgit v1.2.3-70-g09d2