Skip to content

Commit 5f3fc17

Browse files
authored
fix(SoundboardSound): wrong emoji comparison in equals (#10861)
1 parent 20fade2 commit 5f3fc17

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/discord.js/src/structures/GuildAuditLogsEntry.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ class GuildAuditLogsEntry {
487487
AuditLogEvent.ThreadUpdate,
488488
AuditLogEvent.SoundboardSoundUpdate,
489489
AuditLogEvent.ApplicationCommandPermissionUpdate,
490-
AuditLogEvent.SoundboardSoundUpdate,
491490
AuditLogEvent.AutoModerationRuleUpdate,
492491
AuditLogEvent.AutoModerationBlockMessage,
493492
AuditLogEvent.AutoModerationFlagToChannel,

packages/discord.js/src/structures/SoundboardSound.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ class SoundboardSound extends Base {
181181
this.available === other.available &&
182182
this.name === other.name &&
183183
this.volume === other.volume &&
184-
this.emojiId === other.emojiId &&
185-
this.emojiName === other.emojiName &&
184+
this._emoji?.id === other._emoji?.id &&
185+
this._emoji?.name === other._emoji?.name &&
186186
this.guildId === other.guildId &&
187187
this.user?.id === other.user?.id
188188
);
@@ -193,8 +193,8 @@ class SoundboardSound extends Base {
193193
this.available === other.available &&
194194
this.name === other.name &&
195195
this.volume === other.volume &&
196-
this.emojiId === other.emoji_id &&
197-
this.emojiName === other.emoji_name &&
196+
(this._emoji?.id ?? null) === other.emoji_id &&
197+
(this._emoji?.name ?? null) === other.emoji_name &&
198198
this.guildId === other.guild_id &&
199199
this.user?.id === other.user?.id
200200
);

0 commit comments

Comments
 (0)