mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-03-17 00:35:02 +00:00
Don't cache SoundboardSound when Intents.expressions is disabled
This commit is contained in:
@@ -677,7 +677,7 @@ class Guild(Hashable):
|
||||
scheduled_event = ScheduledEvent(data=s, state=self._state)
|
||||
self._scheduled_events[scheduled_event.id] = scheduled_event
|
||||
|
||||
if 'soundboard_sounds' in guild:
|
||||
if 'soundboard_sounds' in guild and state.cache_guild_expressions:
|
||||
for s in guild['soundboard_sounds']:
|
||||
soundboard_sound = SoundboardSound(guild=self, data=s, state=self._state)
|
||||
self._add_soundboard_sound(soundboard_sound)
|
||||
|
||||
@@ -279,7 +279,7 @@ class ConnectionState(Generic[ClientT]):
|
||||
# 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
|
||||
return self._intents.expressions
|
||||
|
||||
async def close(self) -> None:
|
||||
for voice in self.voice_clients:
|
||||
|
||||
Reference in New Issue
Block a user