From 38bde93d16077cecd2b1c690e4995bd7265e29e5 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 2 Jul 2024 19:43:27 +0100 Subject: [PATCH] update channel log messages --- .../bat/features/logging/listeners/ChannelListener.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/cc/fascinated/bat/features/logging/listeners/ChannelListener.java b/src/main/java/cc/fascinated/bat/features/logging/listeners/ChannelListener.java index 814ab05..b3c0565 100644 --- a/src/main/java/cc/fascinated/bat/features/logging/listeners/ChannelListener.java +++ b/src/main/java/cc/fascinated/bat/features/logging/listeners/ChannelListener.java @@ -31,10 +31,9 @@ public class ChannelListener implements EventListener { @Override public void onChannelCreate(@NonNull BatGuild guild, @NonNull ChannelCreateEvent event) { logFeature.sendLog(guild, LogType.CHANNEL_CREATE, EmbedUtils.successEmbed() - .setDescription(new EmbedDescriptionBuilder("Channel Created") + .setDescription(new EmbedDescriptionBuilder("%s Channel Created".formatted(EnumUtils.getEnumName(event.getChannel().getType()))) .appendLine("Channel: %s".formatted(event.getChannel().getAsMention()), true) .appendLine("Name: %s".formatted(event.getChannel().getName()), true) - .appendLine("Type: %s".formatted(EnumUtils.getEnumName(event.getChannel().getType())), true) .build()) .build()); } @@ -42,14 +41,13 @@ public class ChannelListener implements EventListener { @Override public void onChannelDelete(@NonNull BatGuild guild, @NonNull ChannelDeleteEvent event) { ChannelUnion channel = event.getChannel(); - EmbedDescriptionBuilder description = new EmbedDescriptionBuilder("Channel Deleted") + EmbedDescriptionBuilder description = new EmbedDescriptionBuilder("%s Channel Deleted".formatted(EnumUtils.getEnumName(channel.getType()))) .appendLine("Channel: %s".formatted(channel.getAsMention()), true) .appendLine("Name: %s".formatted(channel.getName()), true); if (channel.getType().isMessage()) { TextChannel textChannel = channel.asTextChannel(); description.appendLine("Topic: %s".formatted(textChannel.getTopic()), true); } - description.appendLine("Type: %s".formatted(EnumUtils.getEnumName(channel.getType())), true); logFeature.sendLog(guild, LogType.CHANNEL_DELETE, EmbedUtils.errorEmbed().setDescription(description.build()).build()); } }