Add-on Creation
Doing addon for NovaBot is simple
Folder Structure
Folder Structure
novabot:
- index.js
- addons:
- yourAddon:
- index.js
- events:
- event.js
- commands:
- command.js
To ensure NovaBot will read all files in order, we have to strictly follow folder structure.
NovaBot automatically register all commands inside of commands folder and register all events in events folder.
index.js
| Simple index.js | |
|---|---|
This is simple index.js.
As you can see, module.exports exports name, version, author and description.
These variables are important for NovaBot to have, so it can show in /reload and in console upon start.
command.js
This will create a simple slash (/) command for our bot which calls
myFunction function which will say "Hello World!" into console.
event.js
| Simple event | |
|---|---|
Success
We are done! Hope you will unleash your creativity!