t-rextest

Private

Content

43 lines
{=(COMMENT):Rev 02: Does a more involved temprole now.}
{=(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):t-rex}
{=():}

{=(COMMENT):Roles IDs}
{=(COMMENT):737532034930442342 is the T-Rex role, aka Reward Role}
{=(TRexRole):737532034930442342}
{=(COMMENT):1149595257277775904 is the Mod role, aka Police}
{=(PRole):1149595257277775904}
{=(COMMENT):is 691787391244959754 is the Hybridgumi Role}
{=(HRole):691787391244959754}
{=(COMMENT):is 738759412344422450 is the Full Role}
{=(FullRole):738759412344422450}

{=(COMMENT):Conditional checks}
{=(COMMENT):Checks if the user has any of the required roles}
{=(COMMENT):Checks if the user is T-Rex.}
{=(targetIsTRex):{contains({TRexRole}):{target(roleids)}}}
{=(COMMENT):Checks if the user is Police, aka Mod}
{=(isPolice):{contains({PRole}):{user(roleids)}}}

{=(COMMENT):Checks if the target has the chomp CD}
{=(isCD):{contains({FullRole}):{target(roleids)}}}
{=(HasRole):{any({isPolice}==true):true|false}}

{=(COMMENT):Checks if the mentioned target has no events role, thus does not want to participate in any events}
{=(isTargetNERole):{contains({NERole}):{target(roleids)}}}

{=(COMMENT):Checks if a target has been mentioned. If isUserTarget is true, no target was mentioned. Use as special message output [originally as condition of use]}
{=(isUserTarget):{if({user(id)}=={target(id)}):true|false}}
{=(canRun):{all({isUserTarget}==false|{isPolice}==true|{targetIsTRex}==false):true|false}}

{=(COMMENT):Command execution}
{=(COMMENT):Infects the target by transferring their role to them.}
{{if({canRun}==true):c:temprole c {target(id)} {2} +{TRexRole}}}
{{if({canRun}==true):c:role remove {target(id)} {FullRole}}}

{if({HasRole}==false): Staff-Only command. }
{if({isUserTarget}==true): ⚠️ {user(mention)}, You gotta mention someone to use this. }
{if({targetIsTRex}==true): ⚠️ {user(mention)}, They aready have T-Rex right now. }
Raw JSON
{
  "id": 2250016,
  "created_at": "2025-04-04T18:57:06.000Z",
  "tag_name": "t-rextest",
  "nsfw": false,
  "owner_id": "521368542113955841",
  "uses": 10,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "",
  "hidden": false,
  "guild_id": "632804599979311144",
  "sharer": "521368542113955841",
  "content": "{=(COMMENT):Rev 02: Does a more involved temprole now.}\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):t-rex}\n{=():}\n\n{=(COMMENT):Roles IDs}\n{=(COMMENT):737532034930442342 is the T-Rex role, aka Reward Role}\n{=(TRexRole):737532034930442342}\n{=(COMMENT):1149595257277775904 is the Mod role, aka Police}\n{=(PRole):1149595257277775904}\n{=(COMMENT):is 691787391244959754 is the Hybridgumi Role}\n{=(HRole):691787391244959754}\n{=(COMMENT):is 738759412344422450 is the Full Role}\n{=(FullRole):738759412344422450}\n\n{=(COMMENT):Conditional checks}\n{=(COMMENT):Checks if the user has any of the required roles}\n{=(COMMENT):Checks if the user is T-Rex.}\n{=(targetIsTRex):{contains({TRexRole}):{target(roleids)}}}\n{=(COMMENT):Checks if the user is Police, aka Mod}\n{=(isPolice):{contains({PRole}):{user(roleids)}}}\n\n{=(COMMENT):Checks if the target has the chomp CD}\n{=(isCD):{contains({FullRole}):{target(roleids)}}}\n{=(HasRole):{any({isPolice}==true):true|false}}\n\n{=(COMMENT):Checks if the mentioned target has no events role, thus does not want to participate in any events}\n{=(isTargetNERole):{contains({NERole}):{target(roleids)}}}\n\n{=(COMMENT):Checks if a target has been mentioned. If isUserTarget is true, no target was mentioned. Use as special message output [originally as condition of use]}\n{=(isUserTarget):{if({user(id)}=={target(id)}):true|false}}\n{=(canRun):{all({isUserTarget}==false|{isPolice}==true|{targetIsTRex}==false):true|false}}\n\n{=(COMMENT):Command execution}\n{=(COMMENT):Infects the target by transferring their role to them.}\n{{if({canRun}==true):c:temprole c {target(id)} {2} +{TRexRole}}}\n{{if({canRun}==true):c:role remove {target(id)} {FullRole}}}\n\n{if({HasRole}==false): Staff-Only command. }\n{if({isUserTarget}==true): ⚠️ {user(mention)}, You gotta mention someone to use this. }\n{if({targetIsTRex}==true): ⚠️ {user(mention)}, They aready have T-Rex right now. }",
  "embed": "{}",
  "last_fetched": "2026-10-20T19:54:49.924Z"
}