-- Decompiled with the Synapse X Luau decompiler.


return {
	Name = "help", 
	Description = "Displays a list of all commands, or inspects one command.", 
	Group = "Help", 
	Args = { {
			Type = "command", 
			Name = "Command", 
			Description = "The command to view information on", 
			Optional = true
		} }, 
	ClientRun = function(p1, p2)
		if p2 then
			local v1 = p1.Cmdr.Registry:GetCommand(p2);
			p1:Reply(("Command: %s"):format(v1.Name), Color3.fromRGB(230, 126, 34));
			if v1.Aliases and #v1.Aliases > 0 then
				p1:Reply(("Aliases: %s"):format(table.concat(v1.Aliases, ", ")), Color3.fromRGB(230, 230, 230));
			end;
			p1:Reply(v1.Description, Color3.fromRGB(230, 230, 230));
			local v2, v3, v4 = ipairs(v1.Args);
			while true do
				v2(v3, v4);
				if not v2 then
					break;
				end;
				v4 = v2;
				if v3.Optional == true then
					local v5 = "?";
				else
					v5 = "";
				end;
				p1:Reply(("#%d %s%s: %s - %s"):format(v2, v3.Name, v5, v3.Type, v3.Description));			
			end;
		else
			p1:Reply("Argument Shorthands\n-------------------\t\t\t\n.   Me/Self\n*   All/Everyone \n**  Others \n?   Random\n?N  List of N random values\t\t\t\n");
			local v6 = p1.Cmdr.Registry:GetCommands();
			table.sort(v6, function(p3, p4)
				return p3.Group < p4.Group;
			end);
			local v7 = nil;
			local v8, v9, v10 = ipairs(v6);
			while true do
				v8(v9, v10);
				if not v8 then
					break;
				end;
				v10 = v8;
				if v7 ~= v9.Group then
					p1:Reply(("\n%s\n-------------------"):format(v9.Group));
					v7 = v9.Group;
				end;
				p1:Reply(("%s - %s"):format(v9.Name, v9.Description));			
			end;
		end;
		return "";
	end
};
