fix some messages
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 38s

This commit is contained in:
Lee 2024-07-03 19:53:47 +01:00
parent e4183b4882
commit 90aaf5422f
2 changed files with 4 additions and 4 deletions

@ -32,7 +32,7 @@ public class ChannelListener implements EventListener {
@Override @Override
public void onChannelCreate(@NonNull BatGuild guild, @NonNull ChannelCreateEvent event) { public void onChannelCreate(@NonNull BatGuild guild, @NonNull ChannelCreateEvent event) {
log.info("Channel {} was created in guild {}", event.getChannel().getName(), guild.getName()); log.info("Channel \"{}\" was created in guild \"{}\"", event.getChannel().getName(), guild.getName());
logFeature.sendLog(guild, LogType.CHANNEL_CREATE, EmbedUtils.successEmbed() logFeature.sendLog(guild, LogType.CHANNEL_CREATE, EmbedUtils.successEmbed()
.setDescription(new EmbedDescriptionBuilder("%s Channel Created".formatted(EnumUtils.getEnumName(event.getChannel().getType()))) .setDescription(new EmbedDescriptionBuilder("%s Channel Created".formatted(EnumUtils.getEnumName(event.getChannel().getType())))
.appendLine("Channel: %s".formatted(event.getChannel().getAsMention()), true) .appendLine("Channel: %s".formatted(event.getChannel().getAsMention()), true)
@ -43,7 +43,7 @@ public class ChannelListener implements EventListener {
@Override @Override
public void onChannelDelete(@NonNull BatGuild guild, @NonNull ChannelDeleteEvent event) { public void onChannelDelete(@NonNull BatGuild guild, @NonNull ChannelDeleteEvent event) {
log.info("Channel {} was deleted in guild {}", event.getChannel().getName(), guild.getName()); log.info("Channel \"{}\" was deleted in guild \"{}\"", event.getChannel().getName(), guild.getName());
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);

@ -32,7 +32,7 @@ public class MessageListener implements EventListener {
@Override @Override
public void onGuildMessageDelete(@NonNull BatGuild guild, BatUser user, DiscordMessage message, @NonNull MessageDeleteEvent event) { public void onGuildMessageDelete(@NonNull BatGuild guild, BatUser user, DiscordMessage message, @NonNull MessageDeleteEvent event) {
if (user.getDiscordUser().isBot() || message.getAuthor().isBot()) return; if (user.getDiscordUser().isBot() || message.getAuthor().isBot()) return;
log.info("User {} deleted a message in guild {}", user.getDiscordUser().getGlobalName(), guild.getName()); log.info("User \"{}\" deleted a message in guild \"{}\"", user.getDiscordUser().getGlobalName(), guild.getName());
logFeature.sendLog(guild, LogType.MESSAGE_DELETE, EmbedUtils.errorEmbed() logFeature.sendLog(guild, LogType.MESSAGE_DELETE, EmbedUtils.errorEmbed()
.setDescription(new EmbedDescriptionBuilder("Message Deleted") .setDescription(new EmbedDescriptionBuilder("Message Deleted")
@ -47,7 +47,7 @@ public class MessageListener implements EventListener {
public void onGuildMessageEdit(@NonNull BatGuild guild, @NonNull BatUser user, DiscordMessage oldMessage, public void onGuildMessageEdit(@NonNull BatGuild guild, @NonNull BatUser user, DiscordMessage oldMessage,
@NonNull DiscordMessage newMessage, @NonNull MessageUpdateEvent event) { @NonNull DiscordMessage newMessage, @NonNull MessageUpdateEvent event) {
if (user.getDiscordUser().isBot() || newMessage.getAuthor().isBot() || oldMessage == null) return; if (user.getDiscordUser().isBot() || newMessage.getAuthor().isBot() || oldMessage == null) return;
log.info("User {} edited a message in guild {}", user.getDiscordUser().getGlobalName(), guild.getName()); log.info("User \"{}\" edited a message in guild \"{}\"", user.getDiscordUser().getGlobalName(), guild.getName());
logFeature.sendLog(guild, LogType.MESSAGE_EDIT, EmbedUtils.genericEmbed() logFeature.sendLog(guild, LogType.MESSAGE_EDIT, EmbedUtils.genericEmbed()
.setDescription(new EmbedDescriptionBuilder("Message Edited") .setDescription(new EmbedDescriptionBuilder("Message Edited")