]> git.lizzy.rs Git - furrybot.git/blobdiff - bot.lua
Add book command and sort help command output alphabethically
[furrybot.git] / bot.lua
diff --git a/bot.lua b/bot.lua
index 16b872f5a303466180d0f9eb6eb8a37839d01e3a..447ca65d411b5a54ad190bc61de701ed2e4bf837 100644 (file)
--- a/bot.lua
+++ b/bot.lua
@@ -162,11 +162,15 @@ end
 -- General purpose commands
 
 function furrybot.commands.help()
-       local keys = {}
-       for k in pairs(furrybot.commands) do
-               table.insert(keys, k)
+       local commands = {}
+
+       for cmd in pairs(furrybot.commands) do
+               table.insert(commands, cmd)
        end
-       furrybot.send("Available commands: " .. table.concat(keys, ", "), furrybot.colors.system)
+
+       table.sort(commands)
+
+       furrybot.send("Available commands: " .. table.concat(commands, ", "), furrybot.colors.system)
 end
 
 function furrybot.commands.accept(name)