aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-03-21 00:48:22 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-03-21 00:48:22 +0100
commit10b516b1b82479d6547c25edca36ad3629bbcd2c (patch)
tree72dfbd13193e8ae0a2ab177f53101135a65222b3
parentf29355768dfaee55d6c7ab53b9f79e7d3647ae64 (diff)
downloaddiscord-10b516b1b82479d6547c25edca36ad3629bbcd2c.zip
discord-10b516b1b82479d6547c25edca36ad3629bbcd2c.tar.bz2
Lazy fix, string encoding is likely still an issue.
-rw-r--r--jh-discord.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/jh-discord.py b/jh-discord.py
index 4d27b5a..543269b 100644
--- a/jh-discord.py
+++ b/jh-discord.py
@@ -64,7 +64,7 @@ def get_jh_reply ():
if ((jh_reply == b"!P \n") or (jh_reply == b"!N \n")):
is_done = True
else:
- jh_reply = jh_reply.decode("UTF-8")
+ jh_reply = jh_reply.decode("UTF-8", "ignore")
if (jh_reply.startswith("!GR ")):
result = jh_reply[4:]
@@ -97,7 +97,7 @@ async def on_message(message):
has_lock = False
try:
- msg = bytes(message.clean_content.replace('\n', ' '), "utf8", 'strict')
+ msg = bytes(message.clean_content.replace('\n', ' '), "utf8", 'ignore')
server_mutex.acquire()
has_lock = True