cleanup voice logs
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 38s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 38s
This commit is contained in:
parent
938005f6d9
commit
831bc934b4
@ -81,20 +81,14 @@ public class ChannelListener implements EventListener {
|
||||
lastVoiceChannel.remove(user);
|
||||
}
|
||||
log.info("User \"{}\" {} voice channel \"{}\" in guild \"{}\"", user.getId(), joined ? "joined" : "left", voiceChannel.getName(), guild.getName());
|
||||
String description = new EmbedDescriptionBuilder("User %s Voice Channel".formatted(joined ? "Joined" : "Left"))
|
||||
.appendLine("User: %s".formatted(user.getDiscordUser().getAsMention()), true)
|
||||
.appendLine("Channel: %s".formatted(voiceChannel.getName()), true)
|
||||
.build();
|
||||
if (joined) {
|
||||
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());
|
||||
logFeature.sendLog(guild, LogType.VOICE_CHANNEL_JOIN, EmbedUtils.successEmbed().setDescription(description).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("Channel: %s".formatted(voiceChannel.getName()), true)
|
||||
.build())
|
||||
.build());
|
||||
logFeature.sendLog(guild, LogType.VOICE_CHANNEL_LEAVE, EmbedUtils.errorEmbed().setDescription(description).build());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user