Browse Source

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.
pull/6836/head
Rapptz 4 years ago
parent
commit
83611edb66
  1. 2
      discord/message.py

2
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:

Loading…
Cancel
Save