Giter VIP home page Giter VIP logo

mods's Introduction

Mods

This repo serves to house mods for DBS. Please see example_mod.js to see how modding works in DBS. DBS does not hold responsibility for the content and effects of 3rd party mods you install.

To install mods:

  1. Download this repository by pressing "Code" then "Download ZIP" on the repo home page. download
  2. Locate the javascript (.js) file for the mod(s) you want to add inside the mods folder of this repo.
  3. Copy that file(s).
  4. Open the BotFiles folder for the bot you want to add the mods to. This folder will be located in the location you chose to create the bot in.
  5. Paste the js files inside the "mods" folder inside BotFiles (/BotFiles/mods).
  6. Now open DBS (restart it if it was open already), and you will now be able to add responses of the type of mod(s) you added, just like any other response in DBS.
  7. Done!

Development

Variables

How can I use variables in mods? Note this only works if you have BetterMods.js installed.

// Saving Data
// types ("temp", "server", "global")
DBS.BetterMods.saveVar("varType", "varName", "your data here", guild);

// Fetching Data
// types ("temp", "server", "global")
DBS.BetterMods.getVar("types", "varName", guild)

// Parsing Data
// types ("temp", "server", "global")
DBS.BetterMods.parseAction(string, message) // replaces stuff like ${tempVars.myVar} with the data

Responses

mod: async function(DBS, message, action, args, command, index) {
    // your mods code here

    // This will move onto the next node. Without this the command will stop after this node is finished running.
    // You can also change the index to something like 0 to start the command from the beginning.
    DBS.callNextAction(command, message, args, index + 1);
}

FAQ

  • Why is my mod not showing up in DBS? Make sure you have "isMod" set to true and that your mod file mates your mod name. For an example if my mod was called "Example Mod" my mod file name would be "ExampleMod.js".

Events

Note events wont show in Discord Bot Studio but the mod function is still called.

mods's People

Contributors

akuankka128 avatar aoe0001 avatar arepp23 avatar big-d1129 avatar byfr0st avatar codecrafter21 avatar cyberofficial avatar electraboss avatar ferretwithagun avatar koki10190 avatar kxiraw avatar mirobestbg avatar nick9306 avatar oneandonlyfinbar avatar openmoddev avatar playboyprime avatar qizzle avatar slithey avatar sno2007 avatar soultale avatar subcher avatar your-a-nerd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.