Compare commits
2 Commits
642185f8c5
...
2b4980fb10
Author | SHA1 | Date | |
---|---|---|---|
2b4980fb10 | |||
655662c6f8 |
@ -49,7 +49,11 @@ public class AutoRoleListener implements EventListener {
|
||||
event.getGuild().addRoleToMember(event.getMember(), role).queue();
|
||||
}
|
||||
toRemove.forEach(profile::removeRole);
|
||||
log.info("Gave user \"{}\" {} auto roles{}", user.getId(), profile.getRoles().size(), toRemove.isEmpty() ? ""
|
||||
: " and removed %s invalid roles".formatted(toRemove.size()));
|
||||
log.info("Gave user \"{}\" {} auto roles in guild \"{}\"{}",
|
||||
user.getId(),
|
||||
profile.getRoles().size(),
|
||||
guild.getName(),
|
||||
toRemove.isEmpty() ? "" : " and removed %s invalid roles from the profile".formatted(toRemove.size())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -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")
|
||||
|
Reference in New Issue
Block a user