house-trim

Privateunrated

Content

85 lines
{blacklist(You are already in a House.):933494248060370994,933494589589970954,933494377463038022,933494507461312522} 

{=(COMMENT):Your preferred server prefix, and this tag's name}
{=(prefix):.}
{=(tagname):house-trim}

{=(COMMENT):Prefix URL of the Fandom Wiki. Will be used for a bunch of fields later in the code.}
{=(wikiPrefix):https://clashofclans.fandom.com/wiki/}

{=(Format):roleid~name~founder~colors~animal~element~traits~imgURL~hex}
{=(Mighty_Yak):933494248060370994~Mighty_Yak~Barbarian King~Red~Wall_Wrecker~๐Ÿ‚~Brave Bold Daring Ground-Breaking~https://cdn.discordapp.com/attachments/682242530305507347/933875980643213382/Avatar_Mighty_Yak.png~#f94646}
{=(Unicorn):933494507461312522~Unicorn~Archer Queen~Green~Healer~๐Ÿฆ„~Resourceful Determined Supportive Life-Giving~https://cdn.discordapp.com/attachments/682242530305507347/933875925156757595/Avatar_Unicorn.png~#25c059}
{=(LASSI):933494589589970954~LASSI~Royal Champion~Yellow~PEKKA~๐Ÿบ~Loyal Protective Fast Hard-Working~https://cdn.discordapp.com/attachments/682242530305507347/933890506142920714/Avatar_LASSI.png~#ffb73d}
{=(Electro_Owl):933494377463038022~Electro_Owl~Grand Warden~Blue~Electro_Dragon~๐Ÿฆ‰~Motivated Creative Wise Knowledge-Seeking~https://cdn.discordapp.com/attachments/682242530305507347/933876062226636891/Avatar_Electro_Owl.png~#5e94fe}

{=(COMMENT):House Roles IDs next to each other.}
{=(hrl):{933494248060370994(1):~} {933494507461312522(1):~} {933494589589970954(1):~} {933494377463038022(1):~}}

{=(COMMENT):House names, next to each other.}
{=(hn):Mighty_Yak Unicorn LASSI Electro_Owl}

{=(ur):{user(roleids)}}

{=(COMMENT):Index house roles}
{=(idxhrl):{index({hrl(1)}):{ur}} {index({hrl(2)}):{ur}} {index({hrl(3)}):{ur}} {index({hrl(4)}):{ur}}}

{=(COMMENT):Returns something like "false true false false"}
{=(ins):{in({hrl(1)}):{ur}} {in({hrl(2)}):{ur}} {in({hrl(3)}):{ur}} {in({hrl(4)}):{ur}}}
{=(houseidx):{index(true):0 {ins}}}

{=(r):replace}

{=(COMMENT):Returns "true" if the user *doesn't* have a House role. "false" if they do.}
{=(needsHouseRole):{in(ZZZZ):{join():{{r}(-1,Z):{idxhrl}}}}}

{=(COMMENT):This part is just to the "change" or "switch" subcommand looks for substring matching. Meaning that if they type "sw", it will still know they meant "switch" and work.}
{=(l1):{lower:{1}}}
{=(kw):switch change}
{=(inkw):{if(!={1}):{in({l1}):{kw(1)}} {in({l1}):{kw(2)}}}}

{=(wantsToSwitch):{in(true):{inkw}}}

{=(shouldReroll):{or({needsHouseRole}==true|{wantsToSwitch}==true):true|false}}

{=(COMMENT):Randomly generates a new house role for the user and actually gives it to them, when they ask to switch house.}
{=():}
{=(jhn):{join(,):{hn}}}
{{if({shouldReroll}==true):=(rHouse):{#:{and({wantsToSwitch}==true|{needsHouseRole}==false):{join():{{r}({hn({houseidx})},):{jhn}}|{jhn}}}}}}
{{if({shouldReroll}==true):c:role c {user(id)} +{{rHouse}(1):~} -{join( -):{join( ):{{r}({{rHouse}(1):~},):{hrl}}}}}}
{override}{silent}

{=(COMMENT):--- Output Management ---}
{=(COMMENT):Returns the name of the house that the user is in.}
{=(house):{if({shouldReroll}==true):{rHouse}|{hn({houseidx})}}}
{=(house.role):{{house}(1):~}}

{=(house.founder):{{house}(3):~}}
{=(house.founder.hl):[{house.founder}]({wikiPrefix}{join(_):{house.founder}} "{house}'s Hero Wiki Page")}

{=(house.colors):{{house}(4):~}}

{=(house.animal):{{house}(5):~}}
{=(house.animal.hl):[{house.animal}]({wikiPrefix}{house.animal} "{house}'s SImilar Troop Wiki Page")}

{=(house.element):{{house}(6):~}}

{=(house.traits):{{house}(7):~}}
{=(COMMENT):Formatted House Traits, for better readability in the output.}
{=(house.traits.f):{join(, ):{house.traits(+-1)}}, and {house.traits(0)}}

{=(house.image):{{house}(8):~}}

{=(house.hex):{{house}(9):~}}

{=(house.url):{wikiPrefix}{house}}

{=(em.name):{if({shouldReroll}==true):And you are placed into...}}
{=(em.icon):{if({shouldReroll}==true):https://cdn.discordapp.com/attachments/682242530305507347/935239683535941642/Villager_Welcome.png}}
{=(em.title):{house}!}
{=(em.desc):{if({shouldReroll}==true):Welcome to <@&{house.role}>, {mention}!|Information about <@&{house.role}>, {mention}}}

{=(em.footer):Now start earning points for your team! The more active you are in our community the more points you and your team will receive. Points can be earned by: having conversations in the server, posting food or pet pics, playing in events, hanging out in Voice, taking part in server challenges, and more!}

{embed(URL):{house.url}}
{embed(color):#{replace(#,):{house.hex}}}

Embed

1 line
{"color": 5198940, "title": "{em.title}", "author": {"name": "{em.name}", "icon_url": "{em.icon}"}, "fields": [{"name": "Team Color", "value": "{house.colors}", "inline": true}, {"name": "Emoji", "value": "{house.element}", "inline": true}, {"name": "Traits", "value": "{house.traits.f}", "inline": false}], "footer": {"text": "{em.footer}"}, "thumbnail": {"url": "{house.image}"}, "description": "{em.desc}"}
Raw JSON
{
  "id": 1254043,
  "created_at": "2022-04-26T10:37:59.031Z",
  "tag_name": "house-trim",
  "nsfw": false,
  "owner_id": "84096392208875520",
  "uses": 10,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "101681392651362304",
  "sharer": "84096392208875520",
  "content": "{blacklist(You are already in a House.):933494248060370994,933494589589970954,933494377463038022,933494507461312522} \n\n{=(COMMENT):Your preferred server prefix, and this tag's name}\n{=(prefix):.}\n{=(tagname):house-trim}\n\n{=(COMMENT):Prefix URL of the Fandom Wiki. Will be used for a bunch of fields later in the code.}\n{=(wikiPrefix):https://clashofclans.fandom.com/wiki/}\n\n{=(Format):roleid~name~founder~colors~animal~element~traits~imgURL~hex}\n{=(Mighty_Yak):933494248060370994~Mighty_Yak~Barbarian King~Red~Wall_Wrecker~๐Ÿ‚~Brave Bold Daring Ground-Breaking~https://cdn.discordapp.com/attachments/682242530305507347/933875980643213382/Avatar_Mighty_Yak.png~#f94646}\n{=(Unicorn):933494507461312522~Unicorn~Archer Queen~Green~Healer~๐Ÿฆ„~Resourceful Determined Supportive Life-Giving~https://cdn.discordapp.com/attachments/682242530305507347/933875925156757595/Avatar_Unicorn.png~#25c059}\n{=(LASSI):933494589589970954~LASSI~Royal Champion~Yellow~PEKKA~๐Ÿบ~Loyal Protective Fast Hard-Working~https://cdn.discordapp.com/attachments/682242530305507347/933890506142920714/Avatar_LASSI.png~#ffb73d}\n{=(Electro_Owl):933494377463038022~Electro_Owl~Grand Warden~Blue~Electro_Dragon~๐Ÿฆ‰~Motivated Creative Wise Knowledge-Seeking~https://cdn.discordapp.com/attachments/682242530305507347/933876062226636891/Avatar_Electro_Owl.png~#5e94fe}\n\n{=(COMMENT):House Roles IDs next to each other.}\n{=(hrl):{933494248060370994(1):~} {933494507461312522(1):~} {933494589589970954(1):~} {933494377463038022(1):~}}\n\n{=(COMMENT):House names, next to each other.}\n{=(hn):Mighty_Yak Unicorn LASSI Electro_Owl}\n\n{=(ur):{user(roleids)}}\n\n{=(COMMENT):Index house roles}\n{=(idxhrl):{index({hrl(1)}):{ur}} {index({hrl(2)}):{ur}} {index({hrl(3)}):{ur}} {index({hrl(4)}):{ur}}}\n\n{=(COMMENT):Returns something like \"false true false false\"}\n{=(ins):{in({hrl(1)}):{ur}} {in({hrl(2)}):{ur}} {in({hrl(3)}):{ur}} {in({hrl(4)}):{ur}}}\n{=(houseidx):{index(true):0 {ins}}}\n\n{=(r):replace}\n\n{=(COMMENT):Returns \"true\" if the user *doesn't* have a House role. \"false\" if they do.}\n{=(needsHouseRole):{in(ZZZZ):{join():{{r}(-1,Z):{idxhrl}}}}}\n\n{=(COMMENT):This part is just to the \"change\" or \"switch\" subcommand looks for substring matching. Meaning that if they type \"sw\", it will still know they meant \"switch\" and work.}\n{=(l1):{lower:{1}}}\n{=(kw):switch change}\n{=(inkw):{if(!={1}):{in({l1}):{kw(1)}} {in({l1}):{kw(2)}}}}\n\n{=(wantsToSwitch):{in(true):{inkw}}}\n\n{=(shouldReroll):{or({needsHouseRole}==true|{wantsToSwitch}==true):true|false}}\n\n{=(COMMENT):Randomly generates a new house role for the user and actually gives it to them, when they ask to switch house.}\n{=():}\n{=(jhn):{join(,):{hn}}}\n{{if({shouldReroll}==true):=(rHouse):{#:{and({wantsToSwitch}==true|{needsHouseRole}==false):{join():{{r}({hn({houseidx})},):{jhn}}|{jhn}}}}}}\n{{if({shouldReroll}==true):c:role c {user(id)} +{{rHouse}(1):~} -{join( -):{join( ):{{r}({{rHouse}(1):~},):{hrl}}}}}}\n{override}{silent}\n\n{=(COMMENT):--- Output Management ---}\n{=(COMMENT):Returns the name of the house that the user is in.}\n{=(house):{if({shouldReroll}==true):{rHouse}|{hn({houseidx})}}}\n{=(house.role):{{house}(1):~}}\n\n{=(house.founder):{{house}(3):~}}\n{=(house.founder.hl):[{house.founder}]({wikiPrefix}{join(_):{house.founder}} \"{house}'s Hero Wiki Page\")}\n\n{=(house.colors):{{house}(4):~}}\n\n{=(house.animal):{{house}(5):~}}\n{=(house.animal.hl):[{house.animal}]({wikiPrefix}{house.animal} \"{house}'s SImilar Troop Wiki Page\")}\n\n{=(house.element):{{house}(6):~}}\n\n{=(house.traits):{{house}(7):~}}\n{=(COMMENT):Formatted House Traits, for better readability in the output.}\n{=(house.traits.f):{join(, ):{house.traits(+-1)}}, and {house.traits(0)}}\n\n{=(house.image):{{house}(8):~}}\n\n{=(house.hex):{{house}(9):~}}\n\n{=(house.url):{wikiPrefix}{house}}\n\n{=(em.name):{if({shouldReroll}==true):And you are placed into...}}\n{=(em.icon):{if({shouldReroll}==true):https://cdn.discordapp.com/attachments/682242530305507347/935239683535941642/Villager_Welcome.png}}\n{=(em.title):{house}!}\n{=(em.desc):{if({shouldReroll}==true):Welcome to <@&{house.role}>, {mention}!|Information about <@&{house.role}>, {mention}}}\n\n{=(em.footer):Now start earning points for your team! The more active you are in our community the more points you and your team will receive. Points can be earned by: having conversations in the server, posting food or pet pics, playing in events, hanging out in Voice, taking part in server challenges, and more!}\n\n{embed(URL):{house.url}}\n{embed(color):#{replace(#,):{house.hex}}}",
  "embed": "{\"color\": 5198940, \"title\": \"{em.title}\", \"author\": {\"name\": \"{em.name}\", \"icon_url\": \"{em.icon}\"}, \"fields\": [{\"name\": \"Team Color\", \"value\": \"{house.colors}\", \"inline\": true}, {\"name\": \"Emoji\", \"value\": \"{house.element}\", \"inline\": true}, {\"name\": \"Traits\", \"value\": \"{house.traits.f}\", \"inline\": false}], \"footer\": {\"text\": \"{em.footer}\"}, \"thumbnail\": {\"url\": \"{house.image}\"}, \"description\": \"{em.desc}\"}",
  "last_fetched": "2026-10-20T18:21:35.651Z"
}