aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2020-10-01 09:35:23 +0200
committerGravatar GitHub <[email protected]>2020-10-01 09:35:23 +0200
commite80bfe4b4f6901d8efb31c24e4af23b4b4317193 (patch)
treea6fee5605f435582668494f345864be34e620dec
parentPR #1191 Verification: broaden 50_007 error handling (diff)
parentRemove null chars before posting deleted messages (diff)
Merge pull request #1200 from python-discord/bug/mod/1182/deleted-msg-null-char
Remove null chars before posting deleted messages
-rw-r--r--bot/exts/moderation/modlog.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/moderation/modlog.py b/bot/exts/moderation/modlog.py
index 41ed46b69..b01de0ee3 100644
--- a/bot/exts/moderation/modlog.py
+++ b/bot/exts/moderation/modlog.py
@@ -63,7 +63,7 @@ class ModLog(Cog, name="ModLog"):
'id': message.id,
'author': message.author.id,
'channel_id': message.channel.id,
- 'content': message.content,
+ 'content': message.content.replace("\0", ""), # Null chars cause 400.
'embeds': [embed.to_dict() for embed in message.embeds],
'attachments': attachment,
}