Skip to content

Commit

Permalink
Update help.lua
Browse files Browse the repository at this point in the history
Allow inline types to be shown on the help command
  • Loading branch information
SignalManSteve authored Jun 27, 2024
1 parent 232064c commit c17d427
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Cmdr/BuiltInCommands/help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ return {
end
if command.Args then
for i, arg in ipairs(command.Args) do
context:Reply(
`#{i} {if type(arg) == "table"
then `{arg.Name}{if arg.Optional == true then "?" else ""}: {arg.Type} - {arg.Description}`
else "Unknown (inline argument)"}`
)
if type(arg) == "function" then
arg = arg(context)
end

context:Reply(`{arg.Name}{if arg.Optional == true then "?" else ""}: {arg.Type} - {arg.Description}`)
end
end
else
Expand Down

0 comments on commit c17d427

Please sign in to comment.