diff --git a/dist/discord-bot.js b/dist/discord-bot.js index 7527845..7e79658 100644 --- a/dist/discord-bot.js +++ b/dist/discord-bot.js @@ -136,8 +136,10 @@ class ServerInfoMessage { if (gs.info && gs.online) { embed.setTitle(gs.niceName.slice(0, 256)); embed.setColor('#000000'); - embed.addField('Game', gs.info.game, true); - embed.addField('Map', gs.info.map, true); + if (gs.info.game) + embed.addField('Game', gs.info.game, true); + if (gs.info.map) + embed.addField('Map', gs.info.map, true); embed.addField('Players', gs.info.playersNum + '/' + gs.info.playersMax, true); embed.addField('Connect', 'steam://connect/' + gs.info.connect); if (((_a = gs.info) === null || _a === void 0 ? void 0 : _a.players.length) > 0) { diff --git a/index.html b/index.html index ad2d10b..f918b85 100644 --- a/index.html +++ b/index.html @@ -760,7 +760,7 @@ if (ans) window.localStorage.setItem('btoken', await generateBearerToken(ans)); else window.localStorage.removeItem('btoken'); } else { - const hint = '
API Close the tab to re-enable dialog boxes.'; + const hint = '
Close the tab to re-enable dialog boxes.'; $('#bye > h3').html($('#bye > h3').html() + hint); } diff --git a/src/discord-bot.ts b/src/discord-bot.ts index 26ce782..55ad019 100644 --- a/src/discord-bot.ts +++ b/src/discord-bot.ts @@ -168,8 +168,8 @@ class ServerInfoMessage { embed.setTitle(gs.niceName.slice(0, 256)); embed.setColor('#000000'); - embed.addField('Game', gs.info.game, true); - embed.addField('Map', gs.info.map, true); + if (gs.info.game) embed.addField('Game', gs.info.game, true); + if (gs.info.map) embed.addField('Map', gs.info.map, true); embed.addField('Players', gs.info.playersNum + '/' + gs.info.playersMax, true); embed.addField('Connect', 'steam://connect/' + gs.info.connect);