use proper embed color for voice channel logs

This commit is contained in:
Lee 2024-07-03 23:01:56 +01:00
parent 5f75302f3a
commit 5959b814a7

@ -78,10 +78,19 @@ public class ChannelListener implements EventListener {
lastVoiceChannel.remove(user); lastVoiceChannel.remove(user);
} }
log.info("User \"{}\" {} voice channel \"{}\" in guild \"{}\"", user.getId(), joined ? "joined" : "left", voiceChannel.getName(), guild.getName()); log.info("User \"{}\" {} voice channel \"{}\" in guild \"{}\"", user.getId(), joined ? "joined" : "left", voiceChannel.getName(), guild.getName());
logFeature.sendLog(guild, joined ? LogType.VOICE_CHANNEL_JOIN : LogType.VOICE_CHANNEL_LEAVE, EmbedUtils.successEmbed() if (joined) {
.setDescription(new EmbedDescriptionBuilder("User %s Voice Channel".formatted(joined ? "Joined" : "Left")) logFeature.sendLog(guild, LogType.VOICE_CHANNEL_JOIN, EmbedUtils.successEmbed()
.setDescription(new EmbedDescriptionBuilder("User Joined Voice Channel")
.appendLine("User: %s".formatted(user.getDiscordUser().getAsMention()), true)
.appendLine("Channel: %s".formatted(voiceChannel.getName()), true)
.build())
.build());
return;
}
logFeature.sendLog(guild, LogType.VOICE_CHANNEL_LEAVE, EmbedUtils.errorEmbed()
.setDescription(new EmbedDescriptionBuilder("User Left Voice Channel")
.appendLine("User: %s".formatted(user.getDiscordUser().getAsMention()), true) .appendLine("User: %s".formatted(user.getDiscordUser().getAsMention()), true)
.appendLine("Channel: %s".formatted(voiceChannel.getAsMention()), true) .appendLine("Channel: %s".formatted(voiceChannel.getName()), true)
.build()) .build())
.build()); .build());
} }