feat: Improve command processing output; list command names instead of serializing the commands table

This commit is contained in:
MayaTheShy
2026-02-20 00:59:19 -05:00
parent b1d68565cd
commit 86250deba3

View File

@@ -913,7 +913,13 @@ local function processMessage(message)
if message.command then
print(" Command: " .. message.command)
print(" Available handlers: " .. textutils.serialize(table.keys or function(t) local k={} for n in pairs(t) do table.insert(k,n) end return k end)(commands))
-- Don't try to serialize the commands table - it contains functions!
-- Just list the command names
local availableCommands = {}
for cmdName, _ in pairs(commands) do
table.insert(availableCommands, cmdName)
end
print(" Available handlers: " .. table.concat(availableCommands, ", "))
local handler = commands[message.command]
if handler then