From 30b148fa367d113b3a479b199ecabaecd4e963a7 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sun, 13 Feb 2022 16:59:15 +0100 Subject: Fix \ otal\ showing in /info --- commands/info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands/info.js') diff --git a/commands/info.js b/commands/info.js index 403b70c..aaa4dc5 100644 --- a/commands/info.js +++ b/commands/info.js @@ -61,7 +61,7 @@ module.exports = async (interaction) => { try { delete statsCommandsP["eval"]; } catch (e) {} try { - statsCommand = Object.keys(statsCommandsP).reduce((a, b) => statsCommandsP[a] > statsCommandsP[b] ? a : b); + statsCommand = Object.keys(statsCommandsP).filter(i => i !== "_total").reduce((a, b) => statsCommandsP[a] > statsCommandsP[b] ? a : b); statsCommandUsage = statsCommandsP[Object.keys(statsCommandsP).reduce((a, b) => statsCommandsP[a] > statsCommandsP[b] ? a : b)].toString(); } catch (e) { console.error(e); -- cgit