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:
parent
135a7e9e5a
commit
83611edb66
@ -1156,7 +1156,7 @@ class Message(Hashable):
|
|||||||
try:
|
try:
|
||||||
allowed_mentions = fields.pop('allowed_mentions')
|
allowed_mentions = fields.pop('allowed_mentions')
|
||||||
except KeyError:
|
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()
|
fields['allowed_mentions'] = self._state.allowed_mentions.to_dict()
|
||||||
else:
|
else:
|
||||||
if allowed_mentions is not None:
|
if allowed_mentions is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user