aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-01-28 23:06:45 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-01-28 23:06:45 +0100
commit57483e56b5117a49f6a7e83236f895fd478652a9 (patch)
tree2c0e1d54172b6e0c8295b1afe91900386ce9062e
parent387fd50f7d727ecf9c2df21ef6ed9d134b21324a (diff)
downloaddiscord-57483e56b5117a49f6a7e83236f895fd478652a9.zip
discord-57483e56b5117a49f6a7e83236f895fd478652a9.tar.bz2
Can't have '\n' characters in messages...
-rw-r--r--jh-discord.py7
1 files changed, 6 insertions, 1 deletions
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):