From a5e1230fc68678b589e823f58f33d92a23cce325 Mon Sep 17 00:00:00 2001 From: Tueem Date: Sun, 15 Dec 2024 23:13:57 +0100 Subject: [PATCH] fix issues with ExecutableSlashCommandDefinition equals check --- .../commands/ExecutableSlashCommandDefinition.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ExecutableSlashCommandDefinition.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ExecutableSlashCommandDefinition.java index 6505984..f0b551c 100644 --- a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ExecutableSlashCommandDefinition.java +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ExecutableSlashCommandDefinition.java @@ -27,8 +27,8 @@ public record ExecutableSlashCommandDefinition( ExecutableSlashCommandDefinition other = (ExecutableSlashCommandDefinition) o; boolean equals = false; - if (this.applicationCommand() != null && other.subCommandGroup() != null) - equals = this.applicationCommand.name().equals(other.applicationCommand().name()); + if (this.applicationCommand() != null && other.applicationCommand() != null) + equals = this.applicationCommand().name().equals(other.applicationCommand().name()); if (this.subCommandGroup() != null && other.subCommandGroup() != null) equals = this.subCommandGroup().name().equals(other.subCommandGroup().name());