promote
Privateunrated
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):788272396179079198 789021014041427968 788266568542847016}
{=(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": 934217,
"created_at": "2021-07-07T13:54:13.000Z",
"tag_name": "promote",
"nsfw": false,
"owner_id": "760394874284802078",
"uses": 11,
"description": null,
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "787591418176208908",
"sharer": "760394874284802078",
"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):788272396179079198 789021014041427968 788266568542847016}\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-20T17:01:39.482Z"
}