Skip to content

Addons made by the public for SupportBot, an open-sourced support system for discord.

License

Notifications You must be signed in to change notification settings

Emerald-Services/Addons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



SupportBot Addons

Hello Developers! So I assume you're reading this because you're Developer interested in creating an addon or using an addon created by other developers correct? Well you're in the right place. First of all you'll need to understand and have knowledge with Node/Discord.js. This is what SupportBot is based off.

List of current addons in this repository.

Name V7 V8
Levels
Polls
Stats
Reload

Other Addons:

We have created a marketplace where people can upload there addons with ease, you can find it here

How to enable the addons?

  1. Go to /Addons/ and import the files from te folder. This means that the .js file must be in the /Addons/ folder. If the addon uses a config, you can import that file in the /Addons/Configs/ folder.

Creating your own addon

  1. You'll see a directory called /Addons/ in your version of SupportBot. This is where you're addon will config, and its config folder will be /Addons/Configs/.
  2. So let's set-up the base for your addon. Head into the /Addons/ directory and create the file for your addon with the .js extension.

Now lets start by requiring the default modules

const fs = require("fs");

const Discord = require("discord.js");
const yaml = require("js-yaml");
const supportbot = yaml.load(
  fs.readFileSync("./Configs/supportbot.yml", "utf8")
);

// If you need to read something from the main config!
const cmdconfig = yaml.load(fs.readFileSync("./Configs/supportbot.yml", "utf8"));

// This is for your Addon Configuration
const config = yaml.load(fs.readFileSync('./Addons/Configs/YourAddonConfig.yml', 'utf8'));

const { Command, Event } = require("../Structures/Addon");

Now lets set-up addon handler

module.exports = new Command({
    name: "addon",
    description: "This is a sample addon!",
    options: [],
    permissions: ["Administrator"],
  
    async run(interaction) {
      let disableCommand = true;
  
      const PingEmbed = new Discord.EmbedBuilder()
        .setDescription(
          `This is a sample addon.\n\nPong! \`${interaction.client.ws.ping} ms\``
        )
        .setColor(supportbot.Embed.Colours.General);
  
      interaction.reply({
        embeds: [PingEmbed],
      });
    },
  });

If you want, you can always share your own addon by creating a pull request to this rep.

About

Addons made by the public for SupportBot, an open-sourced support system for discord.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •