diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-09-13 17:16:59 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-09-13 17:16:59 +0200 |
commit | 008e302ea3ee1055cd624c9ad645b981b0271822 (patch) | |
tree | 25cf87431c180bfc7f24239bd7ff5fce9e31b4d5 /bot.lua | |
parent | b846ef0a0aa0b0c27ba15026ae0eaac9664080ba (diff) | |
download | furrybot-008e302ea3ee1055cd624c9ad645b981b0271822.tar.xz |
Add book command and sort help command output alphabethically
Diffstat (limited to 'bot.lua')
-rw-r--r-- | bot.lua | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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) |