Remove cached emoji and sticker data if intent is disabled

This commit is contained in:
Rapptz
2023-07-06 20:10:55 -04:00
parent 55f907a793
commit 5eeeef02e4
2 changed files with 24 additions and 5 deletions

View File

@ -259,6 +259,13 @@ class ConnectionState(Generic[ClientT]):
self.clear()
# For some reason Discord still sends emoji/sticker data in payloads
# This makes it hard to actually swap out the appropriate store methods
# So this is checked instead, it's a small penalty to pay
@property
def cache_guild_expressions(self) -> bool:
return self._intents.emojis_and_stickers
async def close(self) -> None:
for voice in self.voice_clients:
try: