telegram: removed stats text

This commit is contained in:
Smith
2022-04-06 23:53:41 +02:00
parent f9fe5b359f
commit 2fba5c838d
2 changed files with 2 additions and 19 deletions

10
dist/telegram-bot.js vendored
View File

@@ -106,19 +106,11 @@ class ServerInfoMessage {
async updatePost(gs) {
let infoText = gs.niceName + ' offline...';
if (gs.info && gs.online) {
const stats = gs.history.stats();
let statsText = '';
if (stats.length > 0) {
const s = stats.slice(-1).pop();
if (s) {
statsText = ' (hourly avg/max: ' + s.avg.toFixed(1) + '/' + s.max + ') ';
}
}
infoText = [
gs.niceName,
gs.info.game + ' / ' + gs.info.map,
'`' + gs.info.connect + '`',
'Players ' + gs.info.playersNum + '/' + gs.info.playersMax + statsText
'Players ' + gs.info.playersNum + '/' + gs.info.playersMax
].join('\n');
if (gs.info.players.length > 0) {
const chart = '[📊](' + gs.history.statsChart(gs.info.playersMax) + ')';

View File

@@ -129,20 +129,11 @@ class ServerInfoMessage {
let infoText = gs.niceName + ' offline...';
if (gs.info && gs.online) {
const stats = gs.history.stats();
let statsText = '';
if (stats.length > 0) {
const s = stats.slice(-1).pop();
if (s) {
statsText = ' (hourly avg/max: ' + s.avg.toFixed(1) + '/' + s.max + ') ';
}
}
infoText = [
gs.niceName,
gs.info.game + ' / ' + gs.info.map,
'`' + gs.info.connect + '`',
'Players ' + gs.info.playersNum + '/' + gs.info.playersMax + statsText
'Players ' + gs.info.playersNum + '/' + gs.info.playersMax
].join('\n');
if (gs.info.players.length > 0) {