mirror of
https://github.com/a-sync/game-server-watcher.git
synced 2026-07-29 00:42:33 -04:00
fix minecraft discord embed
This commit is contained in:
6
dist/discord-bot.js
vendored
6
dist/discord-bot.js
vendored
@@ -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) {
|
||||
|
||||
@@ -760,7 +760,7 @@
|
||||
if (ans) window.localStorage.setItem('btoken', await generateBearerToken(ans));
|
||||
else window.localStorage.removeItem('btoken');
|
||||
} else {
|
||||
const hint = '<br><span class="text-error">API Close the tab to re-enable dialog boxes.</span>';
|
||||
const hint = '<br><span class="text-error">Close the tab to re-enable dialog boxes.</span>';
|
||||
$('#bye > h3').html($('#bye > h3').html() + hint);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user