aboutsummaryrefslogtreecommitdiff
path: root/discord/message.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-05-01 11:45:27 -0400
committerRapptz <[email protected]>2021-05-01 11:46:27 -0400
commit83611edb66c20d34f531ae4c9fbc052a0ecfe166 (patch)
tree1658473117cffcdd3fd5a2b6c79192d8b437217f /discord/message.py
parentReformat message.py file (diff)
downloaddiscord.py-83611edb66c20d34f531ae4c9fbc052a0ecfe166.tar.xz
discord.py-83611edb66c20d34f531ae4c9fbc052a0ecfe166.zip
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.
Diffstat (limited to 'discord/message.py')
-rw-r--r--discord/message.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/message.py b/discord/message.py
index 1a575d47..ec6dcac6 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: