From f8e5f531d678cef4e5d2bc6f2c5cdd6cf822bdbb Mon Sep 17 00:00:00 2001 From: Supositware Date: Wed, 2 Jan 2019 22:36:29 +0100 Subject: [PATCH] --- commands/utility/stats.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/utility/stats.js b/commands/utility/stats.js index 3212727..35ba85d 100644 --- a/commands/utility/stats.js +++ b/commands/utility/stats.js @@ -17,8 +17,11 @@ class StatsCommand extends Command { async exec(message) { const autoresponse = reload('../../json/autoresponse.json'); - if (autoresponse[message.channel.id] == undefined) - var autoresponseStatus = 'disable'; + let autoresponseStatus; + if (autoresponse[message.channel.id] == undefined || autoresponse[message.channel.id] == 'disable') + autoresponseStatus = 'disabled'; + else if (autoresponse[message.channel.id] == 'enable') + autoresponseStatus = 'enabled'; let totalSeconds = (this.client.uptime / 1000); let days = Math.floor(totalSeconds / 86400);