From 82f848a4acc67bdef6671dd025b238bb335663c5 Mon Sep 17 00:00:00 2001 From: n1ck_pro <59617443+N1ckPro@users.noreply.github.com> Date: Sat, 26 Apr 2025 19:38:03 +0200 Subject: [PATCH] fix(Guild): cache soundboard sounds when patching --- packages/discord.js/src/structures/Guild.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/discord.js/src/structures/Guild.js b/packages/discord.js/src/structures/Guild.js index 7d4a900bf9d6..71f8dc014167 100644 --- a/packages/discord.js/src/structures/Guild.js +++ b/packages/discord.js/src/structures/Guild.js @@ -499,6 +499,13 @@ class Guild extends AnonymousGuild { } else { this.incidentsData ??= null; } + + if (data.soundboard_sounds) { + this.soundboardSounds.cache.clear(); + for (const soundboardSound of data.soundboard_sounds) { + this.soundboardSounds._add(soundboardSound); + } + } } /**