diff --git a/src/modules/bot.js b/src/modules/bot.js index 765a16c..d3e2237 100644 --- a/src/modules/bot.js +++ b/src/modules/bot.js @@ -227,7 +227,9 @@ socketstats.category = CATEGORY; socketstats.helpText = "List the counts of socket events this session"; socketstats.callback = function () { let out = "```c\n"; - for (const [event, count] of Object.entries(hf.event_stats)) { + const events = Object.entries(hf.event_stats); + events.sort((a, b) => b[1] - a[1]); + for (const [event, count] of events) { out += `"${event}": ${count}\n`; } out += "```";