Show no server password when none is given

This commit is contained in:
Dennis Heinrich 2024-11-26 00:01:52 +01:00
parent 883406c3de
commit 2e5dc546d7

View file

@ -117,10 +117,15 @@ export default class DiscordEmbed {
playerListString = serverStats.getPlayerList().map(p => p.username).join(', ');
}
let serverPassword = config.application.serverPassword;
if(config.application.serverPassword == "") {
serverPassword = "-/-";
}
// @ts-ignore
embed.addFields(
{name: config.translation.discordEmbed.titleServerName, value: serverStats.getServerName()},
{name: config.translation.discordEmbed.titleServerPassword, value: config.application.serverPassword},
{name: config.translation.discordEmbed.titleServerPassword, value: serverPassword},
{name: config.translation.discordEmbed.titleServerTime, value: serverStats.getServerTime()},
{
name: `${config.translation.discordEmbed.titlePlayerCount} (${serverStats.getPlayerCount()}/${serverStats.getMaxPlayerCount()}):`,