aboutsummaryrefslogtreecommitdiff
path: root/discord/flags.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-11-23 05:24:13 -0500
committerRapptz <[email protected]>2020-11-23 05:24:13 -0500
commit7a3a571e0a641aaeb061e86d8a6e851c5cd4c381 (patch)
treed3e324f415ee3c4619121ed08f323aaea848f028 /discord/flags.py
parentAdd sticker support (diff)
downloaddiscord.py-7a3a571e0a641aaeb061e86d8a6e851c5cd4c381.tar.xz
discord.py-7a3a571e0a641aaeb061e86d8a6e851c5cd4c381.zip
Don't store a user cache if there's no member intent or cache is off
Without a cache or member intent the user cache can get out of date with no events to update the underlying user in the member object. Ref: #6034
Diffstat (limited to 'discord/flags.py')
-rw-r--r--discord/flags.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/flags.py b/discord/flags.py
index 0cc106e5..cd8557a3 100644
--- a/discord/flags.py
+++ b/discord/flags.py
@@ -851,6 +851,10 @@ class MemberCacheFlags(BaseFlags):
self.value = self.DEFAULT_VALUE
return self
+ @property
+ def _empty(self):
+ return self.value == self.DEFAULT_VALUE
+
@flag_value
def online(self):
""":class:`bool`: Whether to cache members with a status.