fix role log color
Some checks failed
Deploy to Dokku / docker (ubuntu-latest) (push) Has been cancelled
Some checks failed
Deploy to Dokku / docker (ubuntu-latest) (push) Has been cancelled
This commit is contained in:
@ -75,7 +75,9 @@ public class RoleListener implements EventListener {
|
||||
logFeature.sendLog(guild, LogType.ROLE_CREATE, EmbedUtils.successEmbed()
|
||||
.setDescription(new EmbedDescriptionBuilder("Role Created")
|
||||
.appendLine("Role: %s".formatted(role.getAsMention()), true)
|
||||
.appendLine("Color: %s".formatted(role.getColor() == null ? "Default" : role.getColor()), true)
|
||||
.appendLine("Color: `%s`".formatted(
|
||||
role.getColor() == null ? "Default" : HexColorUtils.colorToHex(role.getColor())
|
||||
), true)
|
||||
.appendLine("Position: `%s`".formatted(role.getPosition()), true)
|
||||
.build())
|
||||
.build());
|
||||
@ -86,8 +88,10 @@ public class RoleListener implements EventListener {
|
||||
log.info("Role \"{}\" was deleted in guild \"{}\"", event.getRole().getName(), guild.getName());
|
||||
logFeature.sendLog(guild, LogType.ROLE_DELETE, EmbedUtils.successEmbed()
|
||||
.setDescription(new EmbedDescriptionBuilder("Role Deleted")
|
||||
.appendLine("Role: %s".formatted(event.getRole().getAsMention()), true)
|
||||
.appendLine("Color: %s".formatted(event.getRole().getColor() == null ? "Default" : event.getRole().getColor()), true)
|
||||
.appendLine("Role: `%s`".formatted(event.getRole().getName()), true)
|
||||
.appendLine("Color: `%s`".formatted(
|
||||
event.getRole().getColor() == null ? "Default" : HexColorUtils.colorToHex(event.getRole().getColor())
|
||||
), true)
|
||||
.appendLine("Position: `%s`".formatted(event.getRole().getPosition()), true)
|
||||
.build())
|
||||
.build());
|
||||
@ -139,4 +143,18 @@ public class RoleListener implements EventListener {
|
||||
.build())
|
||||
.build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRoleUpdateHoisted(@NonNull BatGuild guild, @NonNull Role role, boolean wasHoisted, boolean isHoisted, @NonNull RoleUpdateHoistedEvent event) {
|
||||
log.info("Role \"{}\" hoisted status was updated in guild \"{}\"", role.getName(), guild.getName());
|
||||
logFeature.sendLog(guild, LogType.ROLE_CONFIGURATION, EmbedUtils.successEmbed()
|
||||
.setDescription(new EmbedDescriptionBuilder("Role Hoisted Status Updated")
|
||||
.appendLine("Role: %s".formatted(role.getAsMention()), true)
|
||||
.appendLine("Hoisted: `%s` -> `%s`".formatted(
|
||||
wasHoisted ? "Yes" : "No",
|
||||
isHoisted ? "Yes" : "No"
|
||||
), true)
|
||||
.build())
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user