forked from Fascinated/Bat
cleanup voice logs
This commit is contained in:
parent
938005f6d9
commit
831bc934b4
@ -81,20 +81,14 @@ 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());
|
||||||
if (joined) {
|
String description = 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("User: %s".formatted(user.getDiscordUser().getAsMention()), true)
|
||||||
.appendLine("Channel: %s".formatted(voiceChannel.getName()), true)
|
.appendLine("Channel: %s".formatted(voiceChannel.getName()), true)
|
||||||
.build())
|
.build();
|
||||||
.build());
|
if (joined) {
|
||||||
|
logFeature.sendLog(guild, LogType.VOICE_CHANNEL_JOIN, EmbedUtils.successEmbed().setDescription(description).build());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logFeature.sendLog(guild, LogType.VOICE_CHANNEL_LEAVE, EmbedUtils.errorEmbed()
|
logFeature.sendLog(guild, LogType.VOICE_CHANNEL_LEAVE, EmbedUtils.errorEmbed().setDescription(description).build());
|
||||||
.setDescription(new EmbedDescriptionBuilder("User Left Voice Channel")
|
|
||||||
.appendLine("User: %s".formatted(user.getDiscordUser().getAsMention()), true)
|
|
||||||
.appendLine("Channel: %s".formatted(voiceChannel.getName()), true)
|
|
||||||
.build())
|
|
||||||
.build());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user