Anchors. Jumping. Skipping.

Anchors

  • Introduced in BMFD v4.11 Pack 2

  • They're the equivalent of calling groups (groups = commands/events), but in action form. An anchor is a reference to a specific action list, that will run all actions after it once it gets called.

Anchor Example:

Now, Imagine I added my "create anchor" action before a "send message" action. If I call the anchor, every action after it will run. In our case, "Send Message"

Now, how do I reference running that anchor? Simple! Just use "Call Anchor" and insert the anchor ID.

In my case, the ID is 1702304559852. Your ID will be auto generated when the action gets selected, but you can always choose an ID yourself.

Now, I have two commands; I named them "anchorcreator" and "anchorcaller"

If I run the "anchorcaller" action, a "Hello World!" message will be sent to the command channel.

Commands Used:

AnchorCaller Rawdata

{
  "name": "anchorcaller",
  "type": "action",
  "trigger": "textCommand",
  "actions": [
    {
      "name": "Call Anchor",
      "file": "callAnchor.js",
      "data": {
        "name": "Call Anchor",
        "id": "1702304559852"
      }
    }
  ],
  "customId": 1702304703462,
  "boundary": {
    "worksIn": "guild",
    "limits": []
  },
  "parameters": [],
  "description": "No Description"
}

AnchorCreator Rawdata

{
  "name": "anchorcreator",
  "type": "action",
  "trigger": "textCommand",
  "actions": [
    {
      "name": "Create Anchor",
      "file": "createAnchor.js",
      "data": {
        "name": "Create Anchor",
        "id": "1702304559852"
      }
    },
    {
      "name": "Send Message",
      "file": "sendmessage.js",
      "data": {
        "name": "Send Message",
        "messageContent": "Hello World!",
        "actionRows": [],
        "embeds": [],
        "channel": {
          "type": "command",
          "value": ""
        },
        "storeAs": {
          "value": "",
          "type": "temporary"
        },
        "ephemeral": false,
        "dontSend": false,
        "replyToInteraction": false,
        "attachments": []
      }
    }
  ],
  "customId": 1702303919964,
  "boundary": {
    "worksIn": "guild",
    "limits": []
  },
  "parameters": [],
  "description": "No Description"
}

The Editor


Jumping

Jumping to an action is basically going to it, calling it.

See the command above? If the command is ran, "Hello World" won't be sent as the bot will jump to action #3, meaning the send message with the content "Goodbye World!"


Skipping

Skipping actions is basically omitting them.

See the command above? If the command is ran, "Hello World!" and "Goodbye World" won't be sent as the bot will ommit the 2 actions after "Skip Actions"

Commands Used:

SkipExample Rawdata
{
  "name": "skipexample",
  "type": "action",
  "trigger": "textCommand",
  "actions": [
    {
      "name": "Skip Actions",
      "file": "skipActions.js",
      "data": {
        "name": "Skip Actions",
        "action": "2"
      }
    },
    {
      "name": "Send Message",
      "file": "sendmessage.js",
      "data": {
        "name": "Send Message",
        "messageContent": "Hello World!",
        "actionRows": [],
        "embeds": [],
        "channel": {
          "type": "command",
          "value": ""
        },
        "storeAs": {
          "value": "",
          "type": "temporary"
        },
        "ephemeral": false,
        "dontSend": false,
        "replyToInteraction": false,
        "attachments": []
      }
    },
    {
      "name": "Send Message",
      "file": "sendmessage.js",
      "data": {
        "name": "Send Message",
        "messageContent": "Goodbye World!",
        "actionRows": [],
        "embeds": [],
        "channel": {
          "type": "command",
          "value": ""
        },
        "storeAs": {
          "value": "",
          "type": "temporary"
        },
        "ephemeral": false,
        "dontSend": false,
        "replyToInteraction": false,
        "attachments": []
      }
    },
    {
      "name": "Send Message",
      "file": "sendmessage.js",
      "data": {
        "name": "Send Message",
        "messageContent": "Something World!",
        "actionRows": [],
        "embeds": [],
        "channel": {
          "type": "command",
          "value": ""
        },
        "storeAs": {
          "value": "",
          "type": "temporary"
        },
        "ephemeral": false,
        "dontSend": false,
        "replyToInteraction": false,
        "attachments": []
      }
    }
  ],
  "customId": 1702305105232,
  "boundary": {
    "worksIn": "guild",
    "limits": []
  },
  "parameters": [],
  "description": "No Description"
}
JumpExample Rawdata
{
  "name": "jumpexample",
  "type": "action",
  "trigger": "textCommand",
  "actions": [
    {
      "name": "Jump To Action",
      "file": "jumpToAction.js",
      "data": {
        "name": "Jump To Action",
        "action": "3"
      }
    },
    {
      "name": "Send Message",
      "file": "sendmessage.js",
      "data": {
        "name": "Send Message",
        "messageContent": "Hello World!",
        "actionRows": [],
        "embeds": [],
        "channel": {
          "type": "command",
          "value": ""
        },
        "storeAs": {
          "value": "",
          "type": "temporary"
        },
        "ephemeral": false,
        "dontSend": false,
        "replyToInteraction": false,
        "attachments": []
      }
    },
    {
      "name": "Send Message",
      "file": "sendmessage.js",
      "data": {
        "name": "Send Message",
        "messageContent": "Goodbye World!",
        "actionRows": [],
        "embeds": [],
        "channel": {
          "type": "command",
          "value": ""
        },
        "storeAs": {
          "value": "",
          "type": "temporary"
        },
        "ephemeral": false,
        "dontSend": false,
        "replyToInteraction": false,
        "attachments": []
      }
    }
  ],
  "customId": 1702305105232,
  "boundary": {
    "worksIn": "guild",
    "limits": []
  },
  "parameters": [],
  "description": "No Description"
}

Last updated