nerd
Private
Content
19 lines{=(comment):This works by making a list of all the role id's associated with every role in a set group that a target can be promoted to, in reverse order (lowest role first, highest role last).
The tag finds their highest role, then gives them the role that comes after that role in the list if the tag user has a role in the promotableroles group at least 2 roles higher than the target. If the user's highest role is not in the list, they will be given the first role in the role list (so persons in the chain of command can use this tag to induct new members as well). Replace the example role ids in (promotableroles): with your own.}
{=(promotableroles):1210629078894383124 1214993080906678292 1214993475531964476 1214993715693748284 1214994354972917890}
{=(comment):Don't touch this section}
{=(SRlength):{index({promotableroles(0)}):{promotableroles}}}
{=(URs):{user(roleids)}}
{=(TRs):{target(roleids)}}
{=(nextrole):{if({contains({TRs(0)}):{promotableroles}}==true):{promotableroles({m:trunc({index({TRs(0)}):{promotableroles}}+2)})}|{promotableroles(1)}}}
{=(comment):Don't touch this section}
{=(checks):{if({contains({URs(0)}):{promotableroles}}==false):1|{if({target(id)}=={user(id)}):2|{if({index({TRs(0)}):{promotableroles}}=={SRlength}):3|{if({m:trunc({index({URs(0)}):{promotableroles}}-1)}<={index({TRs(0)}):{promotableroles}}):4|false}}}}}
{=(error):You do not have a role within the list of promotable roles.$You did not mention a user. You cannot promote yourself.${target} already has the highest role in the promotable role list.$You must be at least 2 ranks higher than {target} to promote them.}
{=(comment):If you would like the target to lose their current highest role upon promotion provided that role is in the promotion role list, put {if({contains({TRs(0)}):{promotableroles}}==true): -{TRs(0)}} at the end of the role custom statement, before the "|error"}
{{if({checks}==false):c:role custom {target(id)} +{nextrole}|error({checks}):$}}
{if({checks}==false):{target} has been promoted to <@&{nextrole}> by {user(mention)}.}
{override}{silence}Raw JSON
{
"id": 1960843,
"created_at": "2024-03-06T18:04:08.000Z",
"tag_name": "nerd",
"nsfw": false,
"owner_id": "936544158951297075",
"uses": 5,
"description": null,
"restricted": false,
"shared": false,
"deleted": false,
"safe": "",
"hidden": false,
"guild_id": "1201950704831574127",
"sharer": "936544158951297075",
"content": "{=(comment):This works by making a list of all the role id's associated with every role in a set group that a target can be promoted to, in reverse order (lowest role first, highest role last).\nThe tag finds their highest role, then gives them the role that comes after that role in the list if the tag user has a role in the promotableroles group at least 2 roles higher than the target. If the user's highest role is not in the list, they will be given the first role in the role list (so persons in the chain of command can use this tag to induct new members as well). Replace the example role ids in (promotableroles): with your own.}\n\n{=(promotableroles):1210629078894383124 1214993080906678292 1214993475531964476 1214993715693748284 1214994354972917890}\n\n{=(comment):Don't touch this section}\n{=(SRlength):{index({promotableroles(0)}):{promotableroles}}}\n{=(URs):{user(roleids)}}\n{=(TRs):{target(roleids)}}\n{=(nextrole):{if({contains({TRs(0)}):{promotableroles}}==true):{promotableroles({m:trunc({index({TRs(0)}):{promotableroles}}+2)})}|{promotableroles(1)}}}\n\n{=(comment):Don't touch this section}\n{=(checks):{if({contains({URs(0)}):{promotableroles}}==false):1|{if({target(id)}=={user(id)}):2|{if({index({TRs(0)}):{promotableroles}}=={SRlength}):3|{if({m:trunc({index({URs(0)}):{promotableroles}}-1)}<={index({TRs(0)}):{promotableroles}}):4|false}}}}}\n{=(error):You do not have a role within the list of promotable roles.$You did not mention a user. You cannot promote yourself.${target} already has the highest role in the promotable role list.$You must be at least 2 ranks higher than {target} to promote them.}\n\n{=(comment):If you would like the target to lose their current highest role upon promotion provided that role is in the promotion role list, put {if({contains({TRs(0)}):{promotableroles}}==true): -{TRs(0)}} at the end of the role custom statement, before the \"|error\"}\n{{if({checks}==false):c:role custom {target(id)} +{nextrole}|error({checks}):$}}\n{if({checks}==false):{target} has been promoted to <@&{nextrole}> by {user(mention)}.}\n{override}{silence}",
"embed": "{}",
"last_fetched": "2026-10-20T19:33:33.506Z"
}