From b9c0b1fc795e271b6575c0c9ddb5776222d7b32e Mon Sep 17 00:00:00 2001 From: Lucas Gabriel <90426410+lucmsilva651@users.noreply.github.com> Date: Sun, 2 Jun 2024 13:28:14 +0000 Subject: [PATCH] Var name change on stats --- src/commands/stats.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/stats.js b/src/commands/stats.js index 4cbfe8d..6982494 100644 --- a/src/commands/stats.js +++ b/src/commands/stats.js @@ -2,7 +2,7 @@ const os = require('os'); module.exports = function (bot, msg) { const chatId = msg.chat.id; - const admins = process.env.TGBOT_ADMINS; + const botAdmin = process.env.TGBOT_ADMINS; function formatUptime(uptime) { const hours = Math.floor(uptime / 3600); @@ -44,7 +44,7 @@ module.exports = function (bot, msg) { const message = getSystemInfo(); - const isAdmin = admins.includes(msg.from.id.toString()); + const isAdmin = botAdmin.includes(msg.from.id.toString()); if (isAdmin) { bot.sendMessage(chatId, message, { parse_mode: 'Markdown' }) .catch(error => console.error('WARN: Message cannot be sent: ', error));