function module.Setup(q)local U=require(main.server.Modules.Commands)for q,U in pairs(U)do if type(U)=="\116\097\098\108\101"then local q=string.lower(U.Name)local j=main.settings.ChangeRankRequiredToUseCommand or main.settings.SetCommandRankByName local Z=j[U.Name]or j[q]if Z then if tonumber(Z)==nil then Z=(main:GetModule("\099\102")):GetRankId(Z)end U.Rank=Z elseif q=="\099\109\100\098\097\114"or q=="\099\109\100\098\097\114\050"then local j=q:gsub("\094\037\097",function(q)return string.upper(q)end)local Z=main.settings[j]if Z then if tonumber(Z)==nil then Z=(main:GetModule("\099\102")):GetRankId(Z)end U.Rank=Z main.settings[j]=Z end end if q~=""then local function j()local q,j={},{}for Z,K in pairs(U)do if(main:GetModule("\099\102")):FindValue(main.commandInfoToShowOnClient,Z)then q[Z]=K elseif Z=="\085\110\070\117\110\099\116\105\111\110"and type(K)=="\102\117\110\099\116\105\111\110"then q.UnFunction="\117\110"..string.gsub(U.Name,"\037\097",function(q)return string.upper(q)end,1)end j[Z]=K end local Z={}if U.Args then for q,U in pairs(U.Args)do table.insert(Z,string.lower(U))end end q.RankName=(main:GetModule("\099\102")):GetRankName(U.Rank)q.Args=Z j.Args=Z return q,j end local Z,K=j()table.insert(main.commandInfo,Z)main.commands[q]=K if U.SpecialColors then for q,Z in pairs(main.settings.Colors)do local K=Z[1]if K~="\119"then local q,m=j()local H=U.Name..K local t=Z[3]q.SpecialColor=t q.SpecialColorName=K q.OriginalName=U.Name q.Name=H m.SpecialColor=t m.Name=H m.OriginalName=U.Name table.insert(main.commandInfo,q)main.commands[H]=m end end end for j,Z in pairs(main.infoOnAllCommands)do local K=U[j]if type(K)=="\116\097\098\108\101"then for U,Z in pairs(K)do if j~="\067\111\110\116\114\105\098\117\116\111\114\115"then Z=string.lower(Z)end if j=="\067\111\110\116\114\105\098\117\116\111\114\115"or j=="\084\097\103\115"then if j=="\067\111\110\116\114\105\098\117\116\111\114\115"and tonumber(Z)then Z=(main.main:GetModule("\099\102")):GetName(Z)end local q=main.infoOnAllCommands[j][Z]if q==nil then main.infoOnAllCommands[j][Z]=1 else main.infoOnAllCommands[j][Z]=q+1 end elseif j=="\065\108\105\097\115\101\115"then main.infoOnAllCommands[j][Z]=q else main.infoOnAllCommands[j][Z]=true end end end end main.commandRanks[q]=U.Rank end end end end return module
-- << FUNCTIONS >>
function module:Setup()
	local commandsToAdd = require(main.server.Modules.Commands)
	for i, command in pairs(commandsToAdd) do
		if type(command) == "table" then
			--ChangeRankRequiredToUseCommand
			local commandName = string.lower(command.Name)
			local changeRankByNameSetting = main.settings.ChangeRankRequiredToUseCommand
				or main.settings.SetCommandRankByName
			local changeRank = changeRankByNameSetting[command.Name] or changeRankByNameSetting[commandName]
			if changeRank then
				if tonumber(changeRank) == nil then
					changeRank = main:GetModule("cf"):GetRankId(changeRank)
				end
				command.Rank = changeRank
			elseif commandName == "cmdbar" or commandName == "cmdbar2" then
				local settingName = commandName:gsub("^%a", function(c)
					return (string.upper(c))
				end)
				local setting = main.settings[settingName]
				if setting then
					if tonumber(setting) == nil then
						setting = main:GetModule("cf"):GetRankId(setting)
					end
					command.Rank = setting
					main.settings[settingName] = setting
				end
			end
			--
			if commandName ~= "" then
				local function getCommandTables()
					local template, modified = {}, {}
					for dataName, data in pairs(command) do
						if main:GetModule("cf"):FindValue(main.commandInfoToShowOnClient, dataName) then
							template[dataName] = data
						elseif dataName == "UnFunction" and type(data) == "function" then
							template["UnFunction"] = "un"
								.. string.gsub(command.Name, "%a", function(c)
									return string.upper(c)
								end, 1)
						end
						modified[dataName] = data
					end
					--
					local lowerCaseArgs = {}
					if command.Args then
						for i, v in pairs(command.Args) do
							table.insert(lowerCaseArgs, string.lower(v))
						end
					end
					template.RankName = main:GetModule("cf"):GetRankName(command.Rank)
					template.Args = lowerCaseArgs
					modified.Args = lowerCaseArgs
					--
					return template, modified
				end
				local infoTemplate, modifiedCommand = getCommandTables()
				table.insert(main.commandInfo, infoTemplate)
				main.commands[commandName] = modifiedCommand
				--Special Colors
				if command.SpecialColors then
					for i, v in pairs(main.settings.Colors) do
						local shortName = v[1]
						if shortName ~= "w" then
							local newTemplate, newModifiedCommand = getCommandTables()
							local commandColorName = command.Name .. shortName
							local color = v[3]
							newTemplate.SpecialColor = color
							newTemplate.SpecialColorName = shortName
							newTemplate.OriginalName = command.Name
							newTemplate.Name = commandColorName
							newModifiedCommand.SpecialColor = color
							newModifiedCommand.Name = commandColorName
							newModifiedCommand.OriginalName = command.Name
							table.insert(main.commandInfo, newTemplate)
							main.commands[commandColorName] = newModifiedCommand
						end
					end
				end
				--
				for infoName, infoTable in pairs(main.infoOnAllCommands) do
					local commandStat = command[infoName]
					if type(commandStat) == "table" then
						for i, v in pairs(commandStat) do
							if infoName ~= "Contributors" then
								v = string.lower(v)
							end
							if infoName == "Contributors" or infoName == "Tags" then
								if infoName == "Contributors" and tonumber(v) then
									v = main.main:GetModule("cf"):GetName(v)
								end
								local statCount = main.infoOnAllCommands[infoName][v]
								if statCount == nil then
									--if infoName ~= "Contributors" or not isCustomCommands then
									main.infoOnAllCommands[infoName][v] = 1
									--end
								else
									main.infoOnAllCommands[infoName][v] = statCount + 1
								end
							elseif infoName == "Aliases" then
								main.infoOnAllCommands[infoName][v] = commandName
							else
								main.infoOnAllCommands[infoName][v] = true
							end
						end
					end
				end
				main.commandRanks[commandName] = command.Rank
			end
		end
	end
end

return module
