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.jsfile 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.jsextension.
Now lets start by requiring the default modules
constfs=require("fs");constDiscord=require("discord.js");constyaml=require("js-yaml");constsupportbot=yaml.load(fs.readFileSync("./Configs/supportbot.yml","utf8"));// If you need to read something from the main config!constcmdconfig=yaml.load(fs.readFileSync("./Configs/supportbot.yml","utf8"));// This is for your Addon Configurationconstconfig=yaml.load(fs.readFileSync('./Addons/Configs/YourAddonConfig.yml','utf8'));const{ Command, Event }=require("../Structures/Addon");Now lets set-up addon handler
module.exports=newCommand({name: "addon",description: "This is a sample addon!",options: [],permissions: ["Administrator"],asyncrun(interaction){letdisableCommand=true;constPingEmbed=newDiscord.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.
