mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-05 11:27:13 +00:00
Guard against AttributeErrors when clearing cached slot cache.
This commit is contained in:
parent
dfd51b95d6
commit
e64787a415
@ -117,9 +117,20 @@ class Message:
|
|||||||
self._handle_mentions(data.get('mentions', []))
|
self._handle_mentions(data.get('mentions', []))
|
||||||
|
|
||||||
# clear the cached slot cache
|
# clear the cached slot cache
|
||||||
del self._raw_mentions
|
try:
|
||||||
del self._raw_channel_mentions
|
del self._raw_mentions
|
||||||
del self._clean_content
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
del self._raw_channel_mentions
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
del self._clean_content
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def _handle_mentions(self, mentions):
|
def _handle_mentions(self, mentions):
|
||||||
self.mentions = []
|
self.mentions = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user