summaryrefslogtreecommitdiff |
path: root/jh-discord.py
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-03-21 00:48:22 +0100 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-03-21 00:48:22 +0100 |
commit | 10b516b1b82479d6547c25edca36ad3629bbcd2c (patch) | |
tree | 72dfbd13193e8ae0a2ab177f53101135a65222b3 /jh-discord.py | |
parent | f29355768dfaee55d6c7ab53b9f79e7d3647ae64 (diff) |
Lazy fix, string encoding is likely still an issue.
Diffstat (limited to 'jh-discord.py')
-rw-r--r-- | jh-discord.py | 4 |
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 |