upgrade

Private

Content

95 lines
{=(COMMENT):Rev 01: Introduction of the bot}
{=(COMMENT):General configuration}
{=(COMMENT):Main prefix and name of the tag, to be used in the command's instructions if you'd like to display them.}
{=(prefix):.}
{=(tagName):upgrade}
{=():}

{=(COMMENT):Roles IDs}


{=(COMMENT):Roles IDs}
{=(COMMENT):No CD Role, CD set via slowmode}
{=(6_HP_Role):996936996146659449}
{=(5_HP_Role):996877847924850769}
{=(4_HP_Role):996877841482399795}
{=(3_HP_Role):996877742920437830}
{=(2_HP_Role):996877693612212272}
{=(1_HP_Role):996877564847083662}
{=(Dead_Role):977084311050289172}
{=(Staff_Role):977083410478694420}


{=(COMMENT):Conditional checks}
{=(COMMENT):Check the User's current status}
{=(COMMENT):Removed, no need to check user status.}
{=(COMMENT):Check the target's current status}
{=(Is_6_HP_Target):{contains({6_HP_Role}):{target(roleids)}}}
{=(Is_5_HP_Target):{contains({5_HP_Role}):{target(roleids)}}}
{=(Is_4_HP_Target):{contains({4_HP_Role}):{target(roleids)}}}
{=(Is_3_HP_Target):{contains({3_HP_Role}):{target(roleids)}}}
{=(Is_2_HP_Target):{contains({2_HP_Role}):{target(roleids)}}}
{=(Is_1_HP_Target):{contains({1_HP_Role}):{target(roleids)}}}
{=(Is_Dead_Target):{contains({Dead_Role}):{target(roleids)}}}
{=(Is_User_Staff):{contains({Staff_Role}):{user(roleids)}}}

{=(Is__Target_Not_Max):{any({Is_5_HP_Target}==true|{Is_4_HP_Target}==true|{Is_3_HP_Target}==true|{Is_2_HP_Target}==true|{Is_1_HP_Target}==true|{Is_Dead_Target}==true):true|false}}

{=(COMMENT):Checks if the user can infect by meeting the proper conditions.}
{=(CanUpgrade):{all({Is__Target_Not_Max}==true|{Is_User_Staff}==true):true|false}}

{=(COMMENT):List the Major Variables, the HP which will change}
{=(CurrentHP):{if({Is_6_HP_Target}==true):{6_HP_Role}|{if({Is_5_HP_Target}==true):{5_HP_Role}|{if({Is_4_HP_Target}==true):{4_HP_Role}|{if({Is_3_HP_Target}==true):{3_HP_Role}|{if({Is_2_HP_Target}==true):{2_HP_Role}|{if({Is_1_HP_Target}==true):{1_HP_Role}|{if({Is_Dead_Target}==true):{Dead_Role}}}}}}}}}

{=(NewHP):{if({Is_5_HP_Target}==true):{6_HP_Role}|{if({Is_4_HP_Target}==true):{5_HP_Role}|{if({Is_3_HP_Target}==true):{4_HP_Role}|{if({Is_2_HP_Target}==true):{3_HP_Role}|{if({Is_1_HP_Target}==true):{2_HP_Role}|{if({Is_Dead_Target}==true):{1_HP_Role}}}}}}}}


{=(COMMENT):Command execution}
{=(CMDUpgrade):role c {target(id)} -{CurrentHP} +{NewHP}}
{{if({CanUpgrade}==true):c:{CMDUpgrade}}}

{=(COMMENT):Error messages configuration.}
{=(msg.CommandFailed):⚠️ Unable to use to command due to not meeting conditions.}
{=(msg.TargetAlreadyMax):⚠️ You can only only upgrade HP to max of <@&{6_HP_Role}>.}


{=(msg.Upgrade):<:Gouhin_DeathToAll:637783373237977118> {user(mention)} has upgraded the HP of {target(mention)}.
<:Jack_PhoneChecking:637781729129529364> {target(mention)} Status: <@&{CurrentHP}> ▶️ <@&{NewHP}>.}


{=(COMMENT):Output management. Displays the message corresponding to the current situation. Adapts to the player's behavior. Done as a loop instead of nested for cleaner view}
{embed(title):<:BloodMoon:656365681062707200> /r/Beastars August 2022: Turf War 🪦}

{embed(description):{if({Is__Target_Not_Max}==false):{msg.TargetAlreadyMax}|{if({CanUpgrade}==true):{msg.Upgrade}|{msg.CommandFailed}}}}


{=(COMMENT):Sets the embed color Color}
{=(6_HP_Role_Color):#71368a}
{=(5_HP_Role_Color):#3498db}
{=(4_HP_Role_Color):#1f8b4c}
{=(3_HP_Role_Color):#f1c40f}
{=(2_HP_Role_Color):#e74c3c}
{=(1_HP_Role_Color):#ce0909}
{=(Dead_Role_Color):#030303}
{=(White_Color_Error):#FFFFFF}

{embed(color):
	{if({CanUpgrade}==false):{White_Color_Error}|
				{if({Is_5_HP_Target}==true):{6_HP_Role_Color}|
					{if({Is_4_HP_Target}==true):{5_HP_Role_Color}|
						{if({Is_3_HP_Target}==true):{4_HP_Role_Color}|
							{if({Is_2_HP_Target}==true):{3_HP_Role_Color}|
								{if({Is_1_HP_Target}==true):{2_HP_Role_Color}|
									{1_HP_Role_Color}
								}
							}
						}
					}
				}
			}
}

{=(COMMENT):Avoids the bot's default outputs to only have our custom ones to display.}
{silence}
{=(COMMENT):Allows the user of the tag to actually execute the command blocks above, while they normally couldn't outside of it because of the lack of permissions.}
{override}

Embed

1 line
{"color": 5198940, "title": "{embed(title)}", "description": "{embed(description)}"}
Raw JSON
{
  "id": 1493319,
  "created_at": "2022-07-27T03:38:02.000Z",
  "tag_name": "upgrade",
  "nsfw": false,
  "owner_id": "237997099432542209",
  "uses": 86,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "",
  "hidden": false,
  "guild_id": "970749722321100850",
  "sharer": "237997099432542209",
  "content": "{=(COMMENT):Rev 01: Introduction of the bot}\n{=(COMMENT):General configuration}\n{=(COMMENT):Main prefix and name of the tag, to be used in the command's instructions if you'd like to display them.}\n{=(prefix):.}\n{=(tagName):upgrade}\n{=():}\n\n{=(COMMENT):Roles IDs}\n\n\n{=(COMMENT):Roles IDs}\n{=(COMMENT):No CD Role, CD set via slowmode}\n{=(6_HP_Role):996936996146659449}\n{=(5_HP_Role):996877847924850769}\n{=(4_HP_Role):996877841482399795}\n{=(3_HP_Role):996877742920437830}\n{=(2_HP_Role):996877693612212272}\n{=(1_HP_Role):996877564847083662}\n{=(Dead_Role):977084311050289172}\n{=(Staff_Role):977083410478694420}\n\n\n{=(COMMENT):Conditional checks}\n{=(COMMENT):Check the User's current status}\n{=(COMMENT):Removed, no need to check user status.}\n{=(COMMENT):Check the target's current status}\n{=(Is_6_HP_Target):{contains({6_HP_Role}):{target(roleids)}}}\n{=(Is_5_HP_Target):{contains({5_HP_Role}):{target(roleids)}}}\n{=(Is_4_HP_Target):{contains({4_HP_Role}):{target(roleids)}}}\n{=(Is_3_HP_Target):{contains({3_HP_Role}):{target(roleids)}}}\n{=(Is_2_HP_Target):{contains({2_HP_Role}):{target(roleids)}}}\n{=(Is_1_HP_Target):{contains({1_HP_Role}):{target(roleids)}}}\n{=(Is_Dead_Target):{contains({Dead_Role}):{target(roleids)}}}\n{=(Is_User_Staff):{contains({Staff_Role}):{user(roleids)}}}\n\n{=(Is__Target_Not_Max):{any({Is_5_HP_Target}==true|{Is_4_HP_Target}==true|{Is_3_HP_Target}==true|{Is_2_HP_Target}==true|{Is_1_HP_Target}==true|{Is_Dead_Target}==true):true|false}}\n\n{=(COMMENT):Checks if the user can infect by meeting the proper conditions.}\n{=(CanUpgrade):{all({Is__Target_Not_Max}==true|{Is_User_Staff}==true):true|false}}\n\n{=(COMMENT):List the Major Variables, the HP which will change}\n{=(CurrentHP):{if({Is_6_HP_Target}==true):{6_HP_Role}|{if({Is_5_HP_Target}==true):{5_HP_Role}|{if({Is_4_HP_Target}==true):{4_HP_Role}|{if({Is_3_HP_Target}==true):{3_HP_Role}|{if({Is_2_HP_Target}==true):{2_HP_Role}|{if({Is_1_HP_Target}==true):{1_HP_Role}|{if({Is_Dead_Target}==true):{Dead_Role}}}}}}}}}\n\n{=(NewHP):{if({Is_5_HP_Target}==true):{6_HP_Role}|{if({Is_4_HP_Target}==true):{5_HP_Role}|{if({Is_3_HP_Target}==true):{4_HP_Role}|{if({Is_2_HP_Target}==true):{3_HP_Role}|{if({Is_1_HP_Target}==true):{2_HP_Role}|{if({Is_Dead_Target}==true):{1_HP_Role}}}}}}}}\n\n\n{=(COMMENT):Command execution}\n{=(CMDUpgrade):role c {target(id)} -{CurrentHP} +{NewHP}}\n{{if({CanUpgrade}==true):c:{CMDUpgrade}}}\n\n{=(COMMENT):Error messages configuration.}\n{=(msg.CommandFailed):⚠️ Unable to use to command due to not meeting conditions.}\n{=(msg.TargetAlreadyMax):⚠️ You can only only upgrade HP to max of <@&{6_HP_Role}>.}\n\n\n{=(msg.Upgrade):<:Gouhin_DeathToAll:637783373237977118> {user(mention)} has upgraded the HP of {target(mention)}.\n<:Jack_PhoneChecking:637781729129529364> {target(mention)} Status: <@&{CurrentHP}> ▶️ <@&{NewHP}>.}\n\n\n{=(COMMENT):Output management. Displays the message corresponding to the current situation. Adapts to the player's behavior. Done as a loop instead of nested for cleaner view}\n{embed(title):<:BloodMoon:656365681062707200> /r/Beastars August 2022: Turf War 🪦}\n\n{embed(description):{if({Is__Target_Not_Max}==false):{msg.TargetAlreadyMax}|{if({CanUpgrade}==true):{msg.Upgrade}|{msg.CommandFailed}}}}\n\n\n{=(COMMENT):Sets the embed color Color}\n{=(6_HP_Role_Color):#71368a}\n{=(5_HP_Role_Color):#3498db}\n{=(4_HP_Role_Color):#1f8b4c}\n{=(3_HP_Role_Color):#f1c40f}\n{=(2_HP_Role_Color):#e74c3c}\n{=(1_HP_Role_Color):#ce0909}\n{=(Dead_Role_Color):#030303}\n{=(White_Color_Error):#FFFFFF}\n\n{embed(color):\n\t{if({CanUpgrade}==false):{White_Color_Error}|\n\t\t\t\t{if({Is_5_HP_Target}==true):{6_HP_Role_Color}|\n\t\t\t\t\t{if({Is_4_HP_Target}==true):{5_HP_Role_Color}|\n\t\t\t\t\t\t{if({Is_3_HP_Target}==true):{4_HP_Role_Color}|\n\t\t\t\t\t\t\t{if({Is_2_HP_Target}==true):{3_HP_Role_Color}|\n\t\t\t\t\t\t\t\t{if({Is_1_HP_Target}==true):{2_HP_Role_Color}|\n\t\t\t\t\t\t\t\t\t{1_HP_Role_Color}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n}\n\n{=(COMMENT):Avoids the bot's default outputs to only have our custom ones to display.}\n{silence}\n{=(COMMENT):Allows the user of the tag to actually execute the command blocks above, while they normally couldn't outside of it because of the lack of permissions.}\n{override}",
  "embed": "{\"color\": 5198940, \"title\": \"{embed(title)}\", \"description\": \"{embed(description)}\"}",
  "last_fetched": "2026-10-20T18:54:47.343Z"
}