update role log embed
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m3s

This commit is contained in:
Lee
2024-07-04 18:15:05 +01:00
parent 75da7a4b51
commit f6a23e4888
2 changed files with 34 additions and 9 deletions

View File

@ -75,9 +75,7 @@ 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" : HexColorUtils.colorToHex(role.getColor())
), true)
.appendLine("Color: %s".formatted(RoleUtils.getFormattedColor(role)), true)
.appendLine("Permissions: %s".formatted(RoleUtils.getFormattedPermissions(role)), true)
.build())
.build());
@ -90,9 +88,7 @@ public class RoleListener implements EventListener {
logFeature.sendLog(guild, LogType.ROLE_DELETE, EmbedUtils.successEmbed()
.setDescription(new EmbedDescriptionBuilder("Role Deleted")
.appendLine("Role: `%s`".formatted(role.getName()), true)
.appendLine("Color: `%s`".formatted(
role.getColor() == null ? "Default" : HexColorUtils.colorToHex(role.getColor())
), true)
.appendLine("Color: %s".formatted(RoleUtils.getFormattedColor(role)), true)
.appendLine("Permissions: %s".formatted(RoleUtils.getFormattedPermissions(role)), true)
.build())
.build());
@ -120,9 +116,9 @@ public class RoleListener implements EventListener {
logFeature.sendLog(guild, LogType.ROLE_CONFIGURATION, EmbedUtils.successEmbed()
.setDescription(new EmbedDescriptionBuilder("Role Color Updated")
.appendLine("Role: %s".formatted(event.getRole().getAsMention()), true)
.appendLine("Color: `%s` -> `%s`".formatted(
oldColor == null ? "Default" : HexColorUtils.colorToHex(oldColor),
newColor == null ? "Default" : HexColorUtils.colorToHex(newColor)
.appendLine("Color: %s -> %s".formatted(
RoleUtils.getFormattedColor(oldColor),
RoleUtils.getFormattedColor(newColor)
), true)
.build())
.build());