fix channel delete logging for non text channel channels
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 39s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 39s
This commit is contained in:
parent
490080b17a
commit
f940bd526c
@ -58,7 +58,7 @@ public class ChannelListener implements EventListener {
|
|||||||
ChannelUnion channel = event.getChannel();
|
ChannelUnion channel = event.getChannel();
|
||||||
EmbedDescriptionBuilder description = new EmbedDescriptionBuilder("%s Channel Deleted".formatted(EnumUtils.getEnumName(channel.getType())))
|
EmbedDescriptionBuilder description = new EmbedDescriptionBuilder("%s Channel Deleted".formatted(EnumUtils.getEnumName(channel.getType())))
|
||||||
.appendLine("Name: #%s".formatted(channel.getName()), true);
|
.appendLine("Name: #%s".formatted(channel.getName()), true);
|
||||||
if (channel.getType().isMessage()) {
|
if (channel instanceof TextChannel) {
|
||||||
TextChannel textChannel = channel.asTextChannel();
|
TextChannel textChannel = channel.asTextChannel();
|
||||||
description.appendLine("Topic: %s".formatted(textChannel.getTopic()), true);
|
description.appendLine("Topic: %s".formatted(textChannel.getTopic()), true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user