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.
Name | V7 | V8 |
---|---|---|
Levels | ✅ | ❌ |
Polls | ✅ | ❌ |
Stats | ✅ | ❌ |
Reload | ✅ | ❌ |
We have created a marketplace where people can upload there addons with ease, you can find it here
- 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.
- 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/
. - 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.