aboutsummaryrefslogtreecommitdiff
path: root/commands/info.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/info.js')
-rw-r--r--commands/info.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/commands/info.js b/commands/info.js
index 14088f4..77082bf 100644
--- a/commands/info.js
+++ b/commands/info.js
@@ -55,9 +55,13 @@ module.exports = async (interaction) => {
let statsCommand = "-";
let statsCommandUsage = "n/a";
+
+ let statsCommandsP = statsCommands
+ try { delete statsCommandsP["eval"]; } catch (e) {}
+
try {
- statsCommand = Object.keys(statsCommands).reduce((a, b) => statsCommands[a] > statsCommands[b] ? a : b);
- statsCommandUsage = statsCommands[Object.keys(statsCommands).reduce((a, b) => statsCommands[a] > statsCommands[b] ? a : b)].toString();
+ statsCommand = Object.keys(statsCommandsP).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);
}