Clan/Guild Role Handling
This tag will allow you to let your Clan/Guild leaders handle their role for the server members, without having to grant them Manage Roles permissions. It will automatically figure out which Clan/Guild they are the leader of, meaning there is no need for separate Tags for each clan.
Basic
{=():}
{override}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck1):{contains(RoleIDHere):{user(roleids)}}}
{=(Role1):RoleIDHere}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck2):{contains(RoleIDHere):{user(roleids)}}}
{=(Role2):RoleIDHere}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck3):{contains(RoleIDHere):{user(roleids)}}}
{=(Role3):RoleIDHere}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck4):{contains(RoleIDHere):{user(roleids)}}}
{=(Role4):RoleIDHere}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck5):{contains(RoleIDHere):{user(roleids)}}}
{=(Role5):RoleIDHere}
{=(leaderIndex):{index(true):{LeaderCheck1} {LeaderCheck2} {LeaderCheck3} {LeaderCheck4} {LeaderCheck5}}}
{=(clanID):{m:trunc({leaderIndex}+1)}}
{=(notLeader):{contains(0):{clanID}}}
{=(args1Empty):{contains(彡):彡{args(1)}}}
{=(args2Empty):{contains(彡):彡{join():{args(2+)}}}}
{=(check):{in(false false true):{notLeader} {args1Empty} {args2Empty}}}
{=($cmd):c:role {args(1)} {Role{clanID}}}
{{{if(true=={check}):$cmd}}}
{=(error.NoLeader):it appears as though you are not a Clan leader.}
{=(error.NoUser):You must enter a user. Can either be a Mention or their ID.}
{=(error.Limit):You have entered too many arguments. You must only enter a User when using the command.}
{{if(true=={notLeader}):error.NoLeader|{if(true=={args1Empty}):error.NoUser|{if(false=={args2Empty}):error.Limit}}}}
Advanced
{=():}
{override}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck1):{contains(RoleIDHere):{user(roleids)}}}
{=(Role1):RoleIDHere}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck2):{contains(RoleIDHere):{user(roleids)}}}
{=(Role2):RoleIDHere}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck3):{contains(RoleIDHere):{user(roleids)}}}
{=(Role3):RoleIDHere}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck4):{contains(RoleIDHere):{user(roleids)}}}
{=(Role4):RoleIDHere}
{=(COMMENT): Name of Clan Here }
{=(LeaderCheck5):{contains(RoleIDHere):{user(roleids)}}}
{=(Role5):RoleIDHere}
{=(leaderIndex):{index(true):{LeaderCheck1} {LeaderCheck2} {LeaderCheck3} {LeaderCheck4} {LeaderCheck5}}}
{=(clanID):{m:trunc({leaderIndex}+1)}}
{=(1Leader):{if(1=={index(&£):{replace(false,):{LeaderCheck1} {LeaderCheck2} {LeaderCheck3} {LeaderCheck4} {LeaderCheck5}} &£}):true|false}}
{=(targetClans):{contains({Role1}):{target(roleids)}} {contains({Role2}):{target(roleids)}} {contains({Role3}):{target(roleids)}} {contains({Role4}):{target(roleids)}} {contains({Role5}):{target(roleids)}}}
{=(targetClanUnderLimit):{if(2>{index(&£):{replace(false,):{targetClans}} &£}):true|false}}
{=(targetClanIndex):{m:trunc({index(true):{targetClans}}+1)}}
{=(targetClanCheck):{if(0!={targetClanIndex}):{if({Role{targetClanIndex}}=={Role{clanID}}):true|false}|true}}
{=(notLeader):{contains(0):{clanID}}}
{=(args1Mention):{in(true false):{contains({target(mention)}):{args(1)}} {contains({user(id)}):{target(id)}}}}
{=(args2Empty):{contains(彡):彡{join():{args(2+)}}}}
{=(check):{in(true true true false true true):{1Leader} {targetClanUnderLimit} {targetClanCheck} {notLeader} {args1Mention} {args2Empty}}}
{=($cmd):c:role {target(id)} {Role{clanID}}}
{{{if(true=={check}):$cmd}}}
{=(error.NoLeader):it appears as though you are not a Clan Leader.}
{=(error.1Leader):it appears as though you are a Leader of more than 1 Clan.}
{=(error.NoUser):You must mention a User.}
{=(error.TargetOverLimit):That user has too many Clan roles already. They need to be manually fixed}
{=(error.TargetClanAlready):That user is already in a Clan.}
{=(error.Limit):You have entered too many arguments. You must only enter a User when using the command.}
{{if(true=={notLeader}):error.NoLeader|{if(false=={1Leader}):error.1Leader|{if(false=={args1Mention}):error.NoUser|{if(false=={targetClanUnderLimit}):error.TargetOverLimit|{if(false=={targetClanCheck}):error.TargetClanAlready|{if(false=={args2Empty}):error.Limit}}}}}}}