From 14b2c1afd35bf5311c4bf214045e47a9c4354a7b Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 14 Mar 2026 11:29:38 -0400 Subject: [PATCH] Don't cache SoundboardSound when Intents.expressions is disabled --- discord/guild.py | 2 +- discord/state.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/guild.py b/discord/guild.py index f93cf175d..0dd999de8 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -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) diff --git a/discord/state.py b/discord/state.py index f2a610bdf..9c119acfc 100644 --- a/discord/state.py +++ b/discord/state.py @@ -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: