Details
Type: Event
DBM Version: 2.1.6
Visibility: Public
Required Mods: Yes
Description
Please check the Guide for more informations
https://rawdata.newstargeted.com/guides/8
Raw Data (JSON)
JSON Data
{
"name": "Registering All Slash Commands",
"temp": "",
"event-type": "48",
"_id": "MkTuV",
"actions": [
{
"comment": "Created by: randombagel_",
"color": "#ff0000",
"name": "Comment"
},
{
"comment": "Edited by: fallking1234",
"color": "#ffff00",
"name": "Comment"
},
{
"comment": "NEEDED MODULE: chalk",
"color": "#ffff00",
"name": "Comment"
},
{
"behavior": "3",
"name": "Run Action Sequence Once"
},
{
"info": "8",
"storage": "1",
"varName2": "GetBotToken",
"name": "Store Bot Client Info"
},
{
"info": "20",
"storage": "1",
"varName2": "GetBotClientID",
"name": "Store Bot Client Info"
},
{
"token": "",
"user": "",
"pass": "",
"url": "https://discord.com/api/v10/applications/${tempVars(\"GetBotClientID\")}/commands",
"path": "",
"storage": "1",
"varName": "GetCommandsJson",
"debugMode": "1",
"headers": "Authorization: Bot ${tempVars(\"GetBotToken\")}",
"reUse": "0",
"name": "Store Json From WebAPI"
},
{
"comment": "Get Command IDs",
"actions": [
{
"behavior": "0",
"varStorage": "1",
"jsonObjectVarName": "GetCommandsJson",
"path": "id",
"storage": "1",
"varName": "GetCommandIDs",
"debugMode": "0",
"name": "Parse From Stored Json"
},
{
"storage": "1",
"varName": "GetCommandIDs",
"conversion": "2",
"storage2": "1",
"varName2": "ConvertCommandIDsToString",
"name": "Convert Variable"
},
{
"storage": "1",
"varName": "ConvertCommandIDsToString",
"separator": ",",
"storage2": "1",
"varName2": "ConvertCommandIDsToList",
"name": "Convert Text to List"
}
],
"name": "Action Container"
},
{
"storage": "1",
"varName": "ConvertCommandIDsToList",
"comparison": "1",
"value": "false",
"branch": {
"iftrue": "0",
"iffalse": "4",
"iffalseVal": "Patch"
},
"name": "Check Variable"
},
{
"tosend": "Could not patch your Commands!\nMake sure to have atleast 1 command and set your Slash Commands to GLOBAL in the DBM Settings!",
"color": "#ff0000",
"name": "Send Message to Console"
},
{
"name": "End Action Sequence"
},
{
"anchorName": "Patch",
"name": "Action Anchor"
},
{
"tosend": "Patching your commands..\nPlease wait",
"color": "#ffff00",
"name": "Send Message to Console"
},
{
"comment": "Get Command Names",
"actions": [
{
"behavior": "0",
"varStorage": "1",
"jsonObjectVarName": "GetCommandsJson",
"path": "name",
"storage": "1",
"varName": "GetCommandsName",
"debugMode": "0",
"name": "Parse From Stored Json"
},
{
"storage": "1",
"varName": "GetCommandsName",
"conversion": "2",
"storage2": "1",
"varName2": "ConvertCommandNamesToString",
"name": "Convert Variable"
},
{
"storage": "1",
"varName": "ConvertCommandNamesToString",
"separator": ",",
"storage2": "1",
"varName2": "ConvertCommandNamesToList",
"name": "Convert Text to List"
}
],
"name": "Action Container"
},
{
"list": "7",
"varName": "ConvertCommandNamesToList",
"storage": "1",
"varName2": "GetHowManyCommandsYouHave",
"name": "Get List Length"
},
{
"list": "7",
"varName": "ConvertCommandIDsToList",
"tempVarName": "GetCommandIDFromList",
"type": "true",
"actions": [
{
"time": "3",
"measurement": "1",
"name": "Wait"
},
{
"text": "${tempVars(\"GetCommandIDFromList\")}",
"text2": "[",
"text3": "",
"info": "1",
"storage": "1",
"varName": "GetCommandIDFromList",
"name": "Replace Text"
},
{
"text": "${tempVars(\"GetCommandIDFromList\")}",
"text2": "\"",
"text3": "",
"info": "1",
"storage": "1",
"varName": "GetCommandIDFromList",
"name": "Replace Text"
},
{
"text": "${tempVars(\"GetCommandIDFromList\")}",
"text2": "]",
"text3": "",
"info": "1",
"storage": "1",
"varName": "GetCommandIDFromList",
"name": "Replace Text"
},
{
"hideUrl": null,
"debugMode": "0",
"postUrl": "https://discord.com/api/v10/applications/${tempVars(\"GetBotClientID\")}/commands/${tempVars(\"GetCommandIDFromList\")}",
"postJson": "{\n \"contexts\": [\n 0,\n 1,\n 2\n ],\n \"integration_types\": [\n 0,\n 1\n ]\n}",
"storage": "",
"varName": "",
"token": "",
"user": "",
"pass": "",
"headers": "Authorization: Bot ${tempVars(\"GetBotToken\")}",
"method": "PATCH",
"name": "Send Json to WebAPI"
},
{
"comment": "Get Command Name",
"actions": [
{
"storage": "1",
"varName": "Number",
"comparison": "4",
"value": "0",
"branch": {
"iftrue": "3",
"iffalse": "0",
"iftrueVal": "1"
},
"name": "Check Variable"
},
{
"storage": "1",
"varName": "Number",
"changeType": "0",
"value": "0",
"name": "Control Variable"
},
{
"list": "7",
"varName": "ConvertCommandNamesToList",
"getType": "3",
"position": "${tempVars(\"Number\")}",
"storage": "1",
"varName2": "GetCommandNameFromList",
"name": "Get Item from List"
},
{
"storage": "1",
"varName": "Number",
"changeType": "1",
"value": "1",
"name": "Control Variable"
},
{
"text": "${tempVars(\"GetCommandNameFromList\")}",
"text2": "[",
"text3": "",
"info": "1",
"storage": "1",
"varName": "GetCommandNameFromList",
"name": "Replace Text"
},
{
"text": "${tempVars(\"GetCommandNameFromList\")}",
"text2": "\"",
"text3": "",
"info": "1",
"storage": "1",
"varName": "GetCommandNameFromList",
"name": "Replace Text"
},
{
"text": "${tempVars(\"GetCommandNameFromList\")}",
"text2": "]",
"text3": "",
"info": "1",
"storage": "1",
"varName": "GetCommandNameFromList",
"name": "Replace Text"
}
],
"name": "Action Container"
},
{
"tosend": "Patched Command \"${tempVars(\"GetCommandNameFromList\")}\" (${tempVars(\"Number\")}/${tempVars(\"GetHowManyCommandsYouHave\")})",
"color": "#ffff00",
"name": "Send Message to Console"
},
{
"storage": "1",
"varName": "Number",
"comparison": "1",
"value": "tempVars(\"GetHowManyCommandsYouHave\")",
"branch": {
"iftrue": "0",
"iffalse": "1"
},
"name": "Check Variable"
},
{
"tosend": "Successfully Patched all Commands",
"color": "#00ff00",
"name": "Send Message to Console"
},
{
"name": "End Action Sequence"
}
],
"name": "Loop Through List"
},
{
"name": "End Action Sequence"
}
]
}