diff options
| author | Rapptz <[email protected]> | 2021-05-01 11:45:27 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-05-01 11:46:27 -0400 |
| commit | 83611edb66c20d34f531ae4c9fbc052a0ecfe166 (patch) | |
| tree | 1658473117cffcdd3fd5a2b6c79192d8b437217f /discord/message.py | |
| parent | Reformat message.py file (diff) | |
| download | discord.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.py | 2 |
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: |