Skip to content

Commit e827644

Browse files
authored
fix(Guild): cache soundboard sounds when patching (#10857)
1 parent 6281592 commit e827644

File tree

1 file changed

+7
-0
lines changed
  • packages/discord.js/src/structures

1 file changed

+7
-0
lines changed

packages/discord.js/src/structures/Guild.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,13 @@ class Guild extends AnonymousGuild {
499499
} else {
500500
this.incidentsData ??= null;
501501
}
502+
503+
if (data.soundboard_sounds) {
504+
this.soundboardSounds.cache.clear();
505+
for (const soundboardSound of data.soundboard_sounds) {
506+
this.soundboardSounds._add(soundboardSound);
507+
}
508+
}
502509
}
503510

504511
/**

0 commit comments

Comments
 (0)