# Creating Mods

In 

This guide provides detailed instructions on creating mods for Bot Maker for Discord (BMD).

Also, please follow the general structure when creating mods. Therefore, add _MOD after your mod name, don't include any additional dots or spaces, and make sure to include the info object within your modded action.
Feel free to add a short description for your action as seen in animeSearch_MOD.js.

# Interface Components

# Action Elements

  • Actions:
    {
      "element": "actions",
      "storeAs": "string"
    }
  • Conditional Actions & Additional Options:
    {
      "element": "condition",
      "storeAs": "string_pointing_to_object",
      "storeActionsAs": "string_pointing_to_array"
    }
  • Image Inputs:
    {
      "element": "image",
      "storeAs": "string_pointing_to_object"
    }
  • Message Inputs:
    {
      "element": "message",
      "storeAs": "string_pointing_to_object"
    }
  • Role Inputs:
    {
      "element": "role",
      "storeAs": "string_pointing_to_object"
    }
  • Interaction Inputs:
    {
      "element": "interaction",
      "storeAs": "string_pointing_to_object"
    }
  • Text:
    {
      "element": "text",
      "text": "string"
    }
  • Large Inputs:
    {
      "element": "largeInput",
      "storeAs": "string_pointing_to_string"
    }

# Bridge Controls

  • get:
    (blob) :: Blob: variableInput generated object :: Value of variable
  • store:
    (blob) :: Blob: storageInput generated Object :: Void
  • getUser:
    [ASYNC] (blob) :: Blob: userInput generated Object :: [User](https://docs.oceanic.ws/v1.9.0/classes/User.html) with a `member` [OPTIONAL] property
  • getChannel:
    [ASYNC] (blob) :: Blob: channelInput generated Object :: [Channel](https://docs.oceanic.ws/v1.9.0/classes/Channel.html)
  • getInteraction:
    [ASYNC] (blob) :: Blob: interactionInput generated Object :: [Interaction](https://docs.oceanic.ws/v1.9.0/classes/Interaction.html)
  • getImage:
    [ASYNC] (blob) :: Blob: image (input) generated Object :: Image Buffer
  • getRole:
    [ASYNC] (blob) :: Blob: roleInput generated Object :: [Role](https://docs.oceanic.ws/v1.9.0/classes/Role.html)
  • runner:
    (actions) :: [ASYNC] Blob: actions generated Array :: Promise
  • call:
    (blob, actions) :: [ASYNC] Blob: Condition generated Object | Actions: Condition generated array :: Promise
  • callActions:
    (blob) :: [ASYNC] Blob: Object with any of these properties: {stop, jump, skip, actions} - Stop: Boolean, Jump: Number, Skip: Number, Actions: Array :: Promise
  • transf:
    (inputText) :: inputText: text to transform variables from ${...} to their values :: String
  • generateCustomID:
    () :: null :: Number
  • createTemporary:
    (blob) :: Blob: Object with these properties: {class, name, value} - Class: String (Optional) - Name: String - Value: Any; Creates temporary values in storage for sharing between a group's actions for context, inaccessible to the user. See joinVoiceChannel actions for examples :: Void
  • getTemporary:
    (blob) :: Blob: Object with these properties: {class, name} - Class: String (Optional) - Name: String :: Any
  • createGlobal:
    (blob) :: Blob: Object with these properties: {class, name, value} - Class: String (Optional) - Name: String - Value: Any; Creates global values in storage for sharing between a group's actions for context, inaccessible to the user. See createAnchor for examples :: Void
  • getGlobal:
    (blob) :: Blob: Object with these properties: {class, name} - Class: String (Optional) - Name: String :: Any

# Data Structure

  • data:
    {
      "ranAt": "string", // source command index
      "nodeName": "string", // source command name
      "IO": {
        "get": "function",
        "write": "function(JSON)"
      },
      "commandID": "string|number" // source command id
    }

# Still Got Questions?

Feel free to ask any questions in our Discord server.