diff options
author | Minteck <contact@minteck.org> | 2022-02-11 18:50:18 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-02-11 18:50:18 +0100 |
commit | 3da955739b9794865467257aa26562c6c81bc17f (patch) | |
tree | 8d087d70fc447dfa5eb81251017ab56d27608b6e | |
parent | 6f7eede93ad7f584aee2a2093a29071fd2f2470a (diff) | |
download | ponyfind-3da955739b9794865467257aa26562c6c81bc17f.tar.gz ponyfind-3da955739b9794865467257aa26562c6c81bc17f.tar.bz2 ponyfind-3da955739b9794865467257aa26562c6c81bc17f.zip |
Fix: /eval is now ignored from commands stats (#5)
-rw-r--r-- | commands/info.js | 8 | ||||
-rw-r--r-- | config/version.txt | 2 |
2 files changed, 7 insertions, 3 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); } diff --git a/config/version.txt b/config/version.txt index e937bfd..973c154 100644 --- a/config/version.txt +++ b/config/version.txt @@ -1 +1 @@ -1.3.41
\ No newline at end of file +1.3.42
\ No newline at end of file |