Advertisement
xuuun

Create Team

Apr 10th, 2025
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 9.69 KB | Source Code | 0 0
  1.     {
  2.   "name": "create team",
  3.   "type": "action",
  4.   "trigger": "slashCommand",
  5.   "actions": [
  6.     {
  7.       "name": "Postgres Query",
  8.       "file": "postgresQuery_MOD.js",
  9.       "data": {
  10.         "name": "Postgres Query",
  11.         "query": "SELECT * FROM \"Teams\" WHERE \"team_ownerId\" = '${command.author.id}';",
  12.         "storedConnection": {
  13.           "type": "globVar",
  14.           "value": "databaseConnection"
  15.         },
  16.         "toggle": true,
  17.         "logToConsole": false,
  18.         "store": {
  19.           "type": "temporary",
  20.           "value": "userAuth"
  21.         }
  22.       },
  23.       "id": 1744169072525
  24.     },
  25.     {
  26.       "name": "Check Variable",
  27.       "file": "checkVariable.js",
  28.       "data": {
  29.         "name": "Check Variable",
  30.         "variable": {
  31.           "type": "tempVar",
  32.           "value": "userAuth"
  33.         },
  34.         "comparator": "Equals",
  35.         "compareValue": "[]",
  36.         "true": {
  37.           "type": "continue",
  38.           "value": "6"
  39.         },
  40.         "trueActions": [],
  41.         "false": {
  42.           "type": "jump",
  43.           "value": "8"
  44.         },
  45.         "falseActions": []
  46.       },
  47.       "id": 1744192654279
  48.     },
  49.     {
  50.       "name": "Wait",
  51.       "file": "wait.js",
  52.       "data": {
  53.         "name": "Wait",
  54.         "timeUnit": "Seconds",
  55.         "time": "1"
  56.       },
  57.       "id": 1744257858207
  58.     },
  59.     {
  60.       "name": "Check Variable",
  61.       "file": "checkVariable.js",
  62.       "data": {
  63.         "name": "Check Variable",
  64.         "variable": {
  65.           "type": "tempVar",
  66.           "value": "teamName"
  67.         },
  68.         "comparator": "Matches Regex",
  69.         "compareValue": "[A-Za-z-09 ]{2,14}",
  70.         "true": {
  71.           "type": "continue",
  72.           "value": "8"
  73.         },
  74.         "trueActions": [],
  75.         "false": {
  76.           "type": "jump",
  77.           "value": "10"
  78.         },
  79.         "falseActions": []
  80.       },
  81.       "id": 1744255435393
  82.     },
  83.     {
  84.       "name": "Send Message",
  85.       "file": "sendmessage.js",
  86.       "data": {
  87.         "name": "Send Message",
  88.         "messageContent": "Please mention 5 players of your team (include yourself only if you're a player).\ne.g. `@aud` `@fin` `@VancedGG` etc ",
  89.         "actionRows": [],
  90.         "embeds": [],
  91.         "channel": {
  92.           "type": "command",
  93.           "value": ""
  94.         },
  95.         "replyToInteraction": true,
  96.         "storeAs": {
  97.           "value": "",
  98.           "type": "temporary"
  99.         },
  100.         "options": [
  101.           {
  102.             "type": "options"
  103.           }
  104.         ]
  105.       },
  106.       "id": 1744257910752
  107.     },
  108.     {
  109.       "name": "Await Message",
  110.       "file": "awaitMessage.js",
  111.       "data": {
  112.         "name": "Await Message",
  113.         "stopAwaitingAfter": "120",
  114.         "oneTime": false,
  115.         "channel": {
  116.           "type": "command",
  117.           "value": ""
  118.         },
  119.         "user": {
  120.           "type": "author",
  121.           "value": ""
  122.         },
  123.         "messageStorage": {
  124.           "type": "temporary",
  125.           "value": "teamPlayers"
  126.         },
  127.         "authorStorage": {
  128.           "type": "temporary",
  129.           "value": ""
  130.         },
  131.         "actions": [
  132.           {
  133.             "name": "Get Message Info",
  134.             "file": "getMessageInfo.js",
  135.             "data": {
  136.               "name": "Get Message Info",
  137.               "message": {
  138.                 "type": "tempVar",
  139.                 "value": "teamPlayers"
  140.               },
  141.               "get": {
  142.                 "type": "content",
  143.                 "value": ""
  144.               },
  145.               "store": {
  146.                 "type": "temporary",
  147.                 "value": "players"
  148.               }
  149.             },
  150.             "id": 1744261447861
  151.           },
  152.           {
  153.             "name": "Wait",
  154.             "file": "wait.js",
  155.             "data": {
  156.               "name": "Wait",
  157.               "timeUnit": "Seconds",
  158.               "time": "1"
  159.             },
  160.             "id": 1744266386868
  161.           },
  162.           {
  163.             "name": "Check Variable",
  164.             "file": "checkVariable.js",
  165.             "data": {
  166.               "name": "Check Variable",
  167.               "variable": {
  168.                 "type": "tempVar",
  169.                 "value": "players"
  170.               },
  171.               "comparator": "Matches Regex",
  172.               "compareValue": "(<@[0-9]{18}> ?){1,5}",
  173.               "true": {
  174.                 "type": "continue",
  175.                 "value": ""
  176.               },
  177.               "trueActions": [],
  178.               "false": {
  179.                 "type": "jump",
  180.                 "value": "6"
  181.               },
  182.               "falseActions": []
  183.             },
  184.             "id": 1744266177717
  185.           },
  186.           {
  187.             "name": "Send Message",
  188.             "file": "sendmessage.js",
  189.             "data": {
  190.               "name": "Send Message",
  191.               "messageContent": "Team name: `${tempVars('teamName')}`\nTeam owner: <@${command.author.id}>\nIn-game server: ${tempVars('ingameServer')}\n\nTeam players: ${tempVars('players')}",
  192.               "actionRows": [],
  193.               "embeds": [],
  194.               "channel": {
  195.                 "type": "command",
  196.                 "value": ""
  197.               },
  198.               "replyToInteraction": true,
  199.               "storeAs": {
  200.                 "value": "",
  201.                 "type": "temporary"
  202.               },
  203.               "options": [
  204.                 {
  205.                   "type": "options"
  206.                 }
  207.               ]
  208.             },
  209.             "id": 1744266231587
  210.           },
  211.           {
  212.             "name": "Stop Actions",
  213.             "file": "stopRunningActions.js",
  214.             "data": {
  215.               "name": "Stop Actions"
  216.             },
  217.             "id": 1744257895436
  218.           },
  219.           {
  220.             "name": "Send Message",
  221.             "file": "sendmessage.js",
  222.             "data": {
  223.               "name": "Send Message",
  224.               "messageContent": "`Bad error`: You need to mention 2 to 5 players. Run the create command again!",
  225.               "actionRows": [],
  226.               "embeds": [],
  227.               "channel": {
  228.                 "type": "command",
  229.                 "value": ""
  230.               },
  231.               "replyToInteraction": true,
  232.               "storeAs": {
  233.                 "value": "",
  234.                 "type": "temporary"
  235.               },
  236.               "options": [
  237.                 {
  238.                   "type": "options"
  239.                 }
  240.               ]
  241.             },
  242.             "id": 1744266272025
  243.           }
  244.         ]
  245.       },
  246.       "id": 1744259439779
  247.     },
  248.     {
  249.       "name": "Stop Actions",
  250.       "file": "stopRunningActions.js",
  251.       "data": {
  252.         "name": "Stop Actions"
  253.       },
  254.       "id": 1744257895436
  255.     },
  256.     {
  257.       "name": "Send Message",
  258.       "file": "sendmessage.js",
  259.       "data": {
  260.         "name": "Send Message",
  261.         "messageContent": "User already has a team",
  262.         "actionRows": [],
  263.         "embeds": [],
  264.         "channel": {
  265.           "type": "command",
  266.           "value": ""
  267.         },
  268.         "replyToInteraction": true,
  269.         "storeAs": {
  270.           "value": "",
  271.           "type": "temporary"
  272.         },
  273.         "options": [
  274.           {
  275.             "type": "options"
  276.           }
  277.         ]
  278.       },
  279.       "id": 1744257966598
  280.     },
  281.     {
  282.       "name": "Stop Actions",
  283.       "file": "stopRunningActions.js",
  284.       "data": {
  285.         "name": "Stop Actions"
  286.       },
  287.       "id": 1744257895436
  288.     },
  289.     {
  290.       "name": "Send Message",
  291.       "file": "sendmessage.js",
  292.       "data": {
  293.         "name": "Send Message",
  294.         "messageContent": "`Bad error`: Team name should contain **only** english characters or number(s).\n-# Min 2 & Max 14 characters allowed.",
  295.         "actionRows": [],
  296.         "embeds": [],
  297.         "channel": {
  298.           "type": "command",
  299.           "value": ""
  300.         },
  301.         "replyToInteraction": true,
  302.         "storeAs": {
  303.           "value": "",
  304.           "type": "temporary"
  305.         },
  306.         "options": [
  307.           {
  308.             "type": "options"
  309.           }
  310.         ]
  311.       },
  312.       "id": 1744257966598
  313.     }
  314.   ],
  315.   "customId": 1744169062619,
  316.   "boundary": {
  317.     "worksIn": "guild",
  318.     "limits": [
  319.       "SEND_MESSAGES"
  320.     ]
  321.   },
  322.   "parameters": [
  323.     {
  324.       "name": "name",
  325.       "type": "string",
  326.       "description": "Enter the name of your team",
  327.       "required": true,
  328.       "choices": [],
  329.       "storeAs": "teamName",
  330.       "completion": false,
  331.       "max_value": "14",
  332.       "min_value": "2"
  333.     },
  334.     {
  335.       "name": "server",
  336.       "type": "string",
  337.       "description": "Choose your in-game server",
  338.       "required": true,
  339.       "choices": [
  340.         {
  341.           "name": "Singapore",
  342.           "value": "Singapore"
  343.         },
  344.         {
  345.           "name": "Hong Kong",
  346.           "value": "Hong Kong"
  347.         },
  348.         {
  349.           "name": "Tokyo",
  350.           "value": "Tokyo"
  351.         },
  352.         {
  353.           "name": "Mumbai",
  354.           "value": "Mumbai"
  355.         },
  356.         {
  357.           "name": "Sidney",
  358.           "value": "Sidney"
  359.         }
  360.       ],
  361.       "storeAs": "ingameServer",
  362.       "completion": true
  363.     }
  364.   ],
  365.   "description": "Create your team for registration",
  366.   "folder": [],
  367.   "goodies": {
  368.     "actionType": "slash",
  369.     "variables": {
  370.       "temporary": [
  371.         ""
  372.       ],
  373.       "global": [
  374.         [
  375.           "databaseConnection"
  376.         ],
  377.         [],
  378.         [
  379.           "databaseConnection"
  380.         ],
  381.         []
  382.       ],
  383.       "server": [
  384.         [],
  385.         [],
  386.         [],
  387.         [],
  388.         [],
  389.         []
  390.       ],
  391.       "commandVars": [
  392.         "teamName",
  393.         ""
  394.       ],
  395.       "thisServer": [],
  396.       "thisGlobal": []
  397.     }
  398.   }
  399. }
  400.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement