diff --git a/src/main/java/cc/fascinated/bat/features/welcomer/command/EmbedSubCommand.java b/src/main/java/cc/fascinated/bat/features/welcomer/command/EmbedSubCommand.java index 3395cc8..4c6c283 100644 --- a/src/main/java/cc/fascinated/bat/features/welcomer/command/EmbedSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/welcomer/command/EmbedSubCommand.java @@ -46,6 +46,9 @@ public class EmbedSubCommand extends BatSubCommand { String color = colorOption.getAsString(); boolean pingBeforeSend = pingBeforeSendOption.getAsBoolean(); + // Remove # if the user added it + color = color.replace("#", ""); + // Validate the input if (color.length() != 6 || Color.decode("#" + color).getRGB() == -1){ event.replyEmbeds(EmbedUtils.errorEmbed() @@ -67,7 +70,6 @@ public class EmbedSubCommand extends BatSubCommand { return; } - color = color.replace("#", ""); // Remove # if the user added it boolean isMessageEnabled = profile.isMessage(); profile.setEmbed(title, description, color, pingBeforeSend); EmbedDescriptionBuilder successDescription = new EmbedDescriptionBuilder("Welcomer Embed")