{ "name": "embed", "permissions": "NONE", "restriction": "1", "_id": "RithN", "actions": [ { "anchor_id": "[CONFIG]", "color": "#00ffff", "description": "[CONFIG]", "name": "Create Anchor" }, { "anchor_id": "[CONFIG]", "color": "#80ff80", "description": "Permission:", "name": "Create Anchor" }, { "member": "1", "varName": "", "permission": "MANAGE_MESSAGES", "iftrue": "0", "iftrueVal": "", "iffalse": "1", "iffalseVal": "", "name": "Check Member Permissions" }, { "comment": "---", "color": "#ffffff", "name": "Comment" }, { "info": "19", "storage": "1", "varName2": "bot.prefix", "name": "Store Bot Client Info" }, { "condition": "0", "comparison": "0", "value": "0", "iftrue": "3", "iftrueVal": "1", "iffalse": "0", "iffalseVal": "", "name": "Check Parameters" }, { "description": "Jump To [RAW-EMBED]", "jump_to_anchor": "[RAW-EMBED]", "color": "#ff0000", "name": "Jump to Anchor" }, { "anchor_id": "[EMBED-BUILDER]", "color": "#ffff00", "description": "[EMBED-BUILDER]", "name": "Create Anchor" }, { "title": "Embed Builder", "author": "", "color": "${msg.guild.me.displayHexColor}", "url": "", "authorIcon": "", "authorUrl": "", "imageUrl": "", "thumbUrl": "", "timestamp": "false", "debug": "false", "text": "", "year": "", "month": "", "day": "", "hour": "", "minute": "", "second": "", "storage": "1", "varName": "MSG_EMBEDBUILDER", "name": "Create Embed Message" }, { "storage": "1", "varName": "MSG_EMBEDBUILDER", "message": "Create a professional looking message \nwith ease by using Embed Builder.\n\n**Usage:** `${tempVars(\"bot.prefix\")}embed <json>`\n\n[Docs](https://github.com/Gr3nDy/DBM-Embed-Builder/wiki)", "name": "Set Embed Description" }, { "storage": "1", "varName": "MSG_EMBEDBUILDER", "channel": "0", "varName2": "", "storage3": "0", "varName3": "", "iffalse": "0", "iffalseVal": "", "messageContent": "", "name": "Send Embed Message" }, { "name": "End Action Sequence" }, { "anchor_id": "[RAW-EMBED]", "color": "#ff0000", "description": "[RAW-EMBED]", "name": "Create Anchor" }, { "info": "1", "infoIndex": "1", "storage": "1", "varName": "param", "name": "Store Command Params" }, { "anchor_id": "[Curly Braces]", "color": "#8080c0", "description": "[Curly Braces]", "name": "Create Anchor" }, { "storage": "1", "varName": "param", "comparison": "12", "value": "/^{(.*})$/g", "iftrue": "4", "iftrueVal": "[Thumbnail & Image]", "iffalse": "0", "iffalseVal": "[Variables]", "name": "Check Variable" }, { "code": "const Discord = require(\"discord.js\")\n\nconst text = tempVars(\"param\");\nconst braces = '{' + text + '}' \n\nActions.storeValue(braces, 1, \"param\", cache);", "behavior": "0", "interpretation": "1", "storage": "0", "varName": "", "VTypeSelect": "0", "CVTypeValue": "", "name": "Run Script" }, { "anchor_id": "[Thumbnail & Image]", "color": "#8080c0", "description": "[Thumbnail & Image]", "name": "Create Anchor" }, { "code": "const Discord = require(\"discord.js\");\nconst { toJson } = require('really-relaxed-json');\n\nconst param = tempVars(\"param\");\n// Relaxed JSON | Double Quotes isn't necessary anymore\nconst correctJson = toJson(param);\n// Parse correctJson(String) to an object\nconst object = JSON.parse(correctJson);\n// Stringify CorrectJson(Object) back to string\nconst stringify = JSON.stringify(object);\nActions.storeValue(stringify, 1, \"jsonString\", cache);", "behavior": "0", "interpretation": "1", "storage": "0", "varName": "", "VTypeSelect": "0", "CVTypeValue": "", "name": "Run Script" }, { "anchor_id": "[Content Message]", "color": "#8080c0", "description": "[Content Message]", "name": "Create Anchor" }, { "code": "const Discord = require(\"discord.js\");\nconst { toJson } = require('really-relaxed-json');\n\nconst param = tempVars(\"param\");\n// Relaxed JSON | Double Quotes isn't necessary anymore\nconst correctJson = toJson(param);\n// Parse correcJson(String) to an object\nconst object = JSON.parse(correctJson);\n// Message Content\nconst content = object.content;\n\nActions.storeValue(content, 1, \"content\", cache);", "behavior": "0", "interpretation": "1", "storage": "0", "varName": "", "VTypeSelect": "0", "CVTypeValue": "", "name": "Run Script" }, { "anchor_id": "[Variables]", "color": "#8080c0", "description": "[Variables]", "name": "Create Anchor" }, { "code": "const Discord = require(\"discord.js\")\n\nconst text = tempVars(\"param\");\n\n// [USER SECTION]\n\n// USER OBJECT\nlet edited1 = text.replace(/{USER}/g, msg.author);\n// USER USERNAME\nlet edited2 = edited1.replace(/{USER.NAME}/g, msg.author.username);\n// USER ID\nlet edited3 = edited2.replace(/{USER.ID}/g, msg.author.id);\n// USER DISPLAYNAME\nlet edited4 = edited3.replace(/{USER.DISPLAYNAME}/g, msg.author.displayName);\n// USER TAG\nlet edited5 = edited4.replace(/{USER.TAG}/g, msg.author.tag);\n// USER DISCRIMINATOR\nlet edited6 = edited5.replace(/{USER.DISCRIMINATOR}/g, msg.author.discriminator);\n// USER AVATAR\nlet edited7 = edited6.replace(/{USER.AVATAR}/g, \"https://cdn.discordapp.com/avatars/\"+msg.author.id+\"/\"+msg.author.avatar+\".png?size=4096\");\n// USER CREATEDAT\nlet edited8 = edited7.replace(/{USER.CREATEDAT}/g, msg.author.createdAt.toLocaleString('en-US', {weekday: 'short',day:'numeric',year: 'numeric',month: 'long', hour: 'numeric', minute: 'numeric', second: 'numeric'}));\n// USER CREATEDTIMESTAMP\nlet edited9 = edited8.replace(/{USER.CREATEDTIMESTAMP}/g, msg.author.createdTimestamp);\n// USER STATUS\nlet edited10 = edited9.replace(/{USER.STATUS}/g, msg.author.presence.status);\n\n// [SERVER SECTION]\n\n//SERVER NAME\nlet edited11 = edited10.replace(/{SERVER.NAME}/g, msg.guild.name);\n//SERVER ID\nlet edited12 = edited11.replace(/{SERVER.NAME}/g, msg.guild.id);\n//SERVER ICON\nlet edited13 = edited12.replace(/{SERVER.ICON}/g, \"https://cdn.discordapp.com/icons/\"+msg.guild.id+\"/\"+msg.guild.icon+\".png?size=4096\");\n//SERVER AVATAR\nlet edited14 = edited13.replace(/{SERVER.AVATAR}/g, \"https://cdn.discordapp.com/icons/\"+msg.guild.id+\"/\"+msg.guild.icon+\".png?size=4096\");\n//SERVER REGION\nlet edited15 = edited14.replace(/{SERVER.REGION}/g, msg.guild.region);\n//SERVER MEMBER\nlet edited16 = edited15.replace(/{SERVER.MEMBER}/g, msg.guild.memberCount);\n//SERVER CREATEDAT\nlet edited17 = edited16.replace(/{SERVER.CREATEDAT}/g, msg.guild.createdAt.toLocaleString('en-US', {weekday: 'short',day:'numeric',year: 'numeric',month: 'long', hour: 'numeric', minute: 'numeric', second: 'numeric'}));\n//SERVER CREATEDTIMESTAMP\nlet edited18 = edited17.replace(/{SERVER.CREATEDTIMESTAMP}/g, msg.guild.createdTimestamp);\n\n// [SERVER OWNER SECTION]\n\n//SERVER OWNER\nlet edited19 = edited18.replace(/{SERVER.OWNER}/g, msg.guild.owner.user);\n// SERVER OWNER USERNAME\nlet edited20 = edited19.replace(/{SERVER.OWNER.NAME}/g, msg.guild.owner.user.username);\n// SERVER OWNER ID\nlet edited21 = edited20.replace(/{SERVER.OWNER.ID}/g, msg.guild.owner.user.id);\n// SERVER OWNER DISPLAYNAME\nlet edited22 = edited21.replace(/{SERVER.OWNER.DISPLAYNAME}/g, msg.guild.owner.user.displayName);\n// SERVER OWNER TAG\nlet edited23 = edited22.replace(/{SERVER.OWNER.TAG}/g, msg.guild.owner.user.tag);\n// SERVER OWNER DISCRIMINATOR\nlet edited24 = edited23.replace(/{SERVER.OWNER.DISCRIMINATOR}/g, msg.guild.owner.user.discriminator);\n// SERVER OWNER AVATAR\nlet edited25 = edited24.replace(/{SERVER.OWNER.AVATAR}/g, \"https://cdn.discordapp.com/avatars/\"+msg.guild.owner.user.id+\"/\"+msg.guild.owner.user.avatar+\".png?size=4096\");\n// SERVER OWNER CREATEDAT\nlet edited26 = edited25.replace(/{SERVER.OWNER.CREATEDAT}/g, msg.guild.owner.user.createdAt.toLocaleString('en-US', {weekday: 'short',day:'numeric',year: 'numeric',month: 'long', hour: 'numeric', minute: 'numeric', second: 'numeric'}));\n// SERVER OWNER CREATEDTIMESTAMP\nlet edited27 = edited26.replace(/{SERVER.OWNER.CREATEDTIMESTAMP}/g, msg.guild.owner.user.createdTimestamp);\n// SERVER OWNER STATUS\nlet edited28 = edited27.replace(/{SERVER.OWNER.STATUS}/g, msg.guild.owner.user.presence.status);\n\n// [CHANNEL SECTION]\n\n// CHANNEL OBJECT\nlet edited29 = edited28.replace(/{CHANNEL}/g, \"<#\"+msg.channel.id+\">\");\n// CHANNEL NAME\nlet edited30 = edited29.replace(/{CHANNEL.NAME}/g, msg.channel.name);\n// CHANNEL ID\nlet edited31 = edited30.replace(/{CHANNEL.ID}/g, msg.channel.id);\n// CHANNEL TOPIC\nlet edited32 = edited31.replace(/{CHANNEL.TOPIC}/g, msg.channel.topic);\n// CHANNEL CATEGORY\nlet edited33 = edited32.replace(/{CHANNEL.CATEGORY}/g, msg.channel.parentID);\n\n// [OTHER SECTION]\n\n// @EVERYONE\nlet edited34 = edited33.replace(/{@EVERYONE}/g, \"@everyone\");\n// @HERE\nlet edited35 = edited34.replace(/{@HERE}/g, \"@here\");\n// @\nlet edited36 = edited35.replace(/{@}/g, \"@\");\n\n// CURRENT TIME\nlet edited37 = edited36.replace(/{CURRENT.TIME}/g, Date.now());\n// RANDOM PERCENTAGE\nlet edited38 = edited37.replace(/{RANDOM.PERCENTAGE}/g, Math.floor(Math.random() * 100) + 1 + '%');\n\n\nActions.storeValue(edited38, 1, \"param\", cache);", "behavior": "0", "interpretation": "1", "storage": "0", "varName": "", "VTypeSelect": "0", "CVTypeValue": "", "name": "Run Script" }, { "anchor_id": "[Send]", "color": "#8080c0", "description": "[Send]", "name": "Create Anchor" }, { "storage": "0", "varName": "", "reason": "", "name": "Delete Message" }, { "code": "const Discord = require(\"discord.js\");\nconst { toJson } = require('really-relaxed-json');\n\nconst param = tempVars(\"param\");\nconst content = tempVars(\"content\");\n\n// Relaxed JSON | Double Quotes isn't necessary anymore\nconst correctJson = toJson(param);\n// Parse correctJson(String) to an object\nconst object = JSON.parse(correctJson); \n\n\nlet embed = new Discord.MessageEmbed(object);\nmsg.channel.send(content,embed);", "behavior": "0", "interpretation": "1", "storage": "0", "varName": "", "VTypeSelect": "0", "CVTypeValue": "", "name": "Run Script" }, { "comment": "---", "color": "#ffffff", "name": "Comment" }, { "comment": "JSON Embed Builder | experimental 1 for ver 2.0 | GrenDy", "color": "#ff8000", "name": "Comment" }, { "comment": "https://github.com/Gr3nDy/DBM-Embed-Builder", "color": "#ffffff", "name": "Comment" } ], "comType": "0", "_aliases": [ "eb", "embedbuilder" ] }