Module:ClansList/Clans

local getClanInfo = function(clanName) --Set clanData to the result of the mw.loadData. local clanData success = pcall(function clanData = mw.loadData("Module:ClansList/" .. clanName) end) --Unless the mw.loadData failed (say, because the page doesn't exist or is broken) - in that case return nil. if not success then return "Clanname: " .. clanName .. " errored when trying to fetch data." end --If all is well, just blindly copy all the necessary data over, for now we won't bother validating any of it. local clanInfo = {Name = clanName} clanInfo.Image = clanData.Image clanInfo.MemberCount = clanData.MemberCount clanInfo.Association = clanData.Association clanInfo.Requirements = clanData.Requirements clanInfo.Recruiter = clanData.Recruiter clanInfo.Contact = clanData.Contact clanInfo.Discord = clanData.Discord return clanInfo end local clans = { {       Image = "ClanAddTestImage.png", Name = "Unknown", MemberCount = "5+", Association = "Rogue", Requirements = "Unknown", Recruiter = "Unknown", Contact = "RandomPerson#3432 (Discord Profile), RandomPerson (Roblox Profile)", Discord = "Clan Discord Here/Private", },   {		Image = "ClanAddTestImage.png", Name = "Test", MemberCount = "50+", Association = "Black Sun", Requirements = "20+ Potential", Recruiter = "Door", Contact = "Mirthy#3454, Mirthy", Discord = "Private Link", }, } return clans