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.
This commit is contained in:
Rapptz 2021-05-01 11:45:27 -04:00
parent 135a7e9e5a
commit 83611edb66

View File

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