From f940bd526ce10696d1246c924ed1116113be74df Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 4 Jul 2024 04:32:14 +0100 Subject: [PATCH] fix channel delete logging for non text channel channels --- .../bat/features/logging/listeners/ChannelListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 245a74e..51c2362 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 @@ -58,7 +58,7 @@ public class ChannelListener implements EventListener { ChannelUnion channel = event.getChannel(); EmbedDescriptionBuilder description = new EmbedDescriptionBuilder("%s Channel Deleted".formatted(EnumUtils.getEnumName(channel.getType()))) .appendLine("Name: #%s".formatted(channel.getName()), true); - if (channel.getType().isMessage()) { + if (channel instanceof TextChannel) { TextChannel textChannel = channel.asTextChannel(); description.appendLine("Topic: %s".formatted(textChannel.getTopic()), true); }