> For the complete documentation index, see [llms.txt](https://docs.drakodevelopment.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.drakodevelopment.net/addon-system/addon-system.md).

# Addon System

### Creating Addons for Drako Bot

To start creating addons for Drako Bot, please review the examples within the `Addons > Example` folder.

#### Types of Addons

There are two main types of addons you can create for Drako Bot:

1. **Command Addons**
2. **Event Addons**

#### Command Addons

* **Naming Convention**: Command addons need to be named in the format `cmd_x` (where `x` is a unique name).

**Example Command Addon**

```javascript
const { SlashCommandBuilder } = require('@discordjs/builders');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('test')
        .setDescription('Test command!'),
    async execute(interaction, client) {
        interaction.reply({ content: 'This is a test', ephemeral: true });
    }
};
```

#### Event Addons

* **Naming Convention**: Event addons can be named anything. For example, `example_addon`.

**Example Event Addon**

```javascript
module.exports.run = async (client) => {
    client.on('ready', async () => {
        console.log("This is an example addon! You can delete it in addons/example");
    });
};
```

#### Steps to Create Addons

1. **Review Examples**: Start by looking at the examples provided in the `Addons > Example` folder. This will give you a good idea of the structure and conventions used for Drako Bot addons.
2. **Create a New Addon**: Based on the type of addon you want to create, follow the naming conventions and structure shown in the examples.
3. **Test Your Addon**: Before deploying your addon, make sure to test it thoroughly to ensure it works as expected and does not cause any issues with the bot.
4. **Deploy Your Addon**: Once tested, you can add your new addon to the `Addons` folder of Drako Bot and restart the bot to load the new addon.
