forked from Fascinated/Bat
fix channel delete logging for non text channel channels
This commit is contained in:
parent
490080b17a
commit
f940bd526c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user