From 83611edb66c20d34f531ae4c9fbc052a0ecfe166 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 1 May 2021 11:45:27 -0400 Subject: [PATCH] Fix supressing messages leading a 400 error This only makes it so allowed_mentions are passed if the message is authored by the bot itself. --- discord/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/message.py b/discord/message.py index 1a575d477..ec6dcac6c 100644 --- a/discord/message.py +++ b/discord/message.py @@ -1156,7 +1156,7 @@ class Message(Hashable): try: allowed_mentions = fields.pop('allowed_mentions') except KeyError: - if self._state.allowed_mentions is not None: + if self._state.allowed_mentions is not None and self.author.id == self._state.self_id: fields['allowed_mentions'] = self._state.allowed_mentions.to_dict() else: if allowed_mentions is not None: