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

# Example Addon

Example Addon for Champion Ultra Discord Bot.

Bot is provided with one (1) addon by default. It's used to show how to create addons and to explain which field does what.

**Addon Folder Structure**

![](https://i.imgur.com/1Z4gQ2r.png)

**Example Addon File**

```
const { set: setCommand } = require("../../handlers/commands");
const { set: setEvent } = require("../../handlers/events");
const fs = require("fs");
const yaml = require("js-yaml");
// Load Addon's Configuration, 'example' = addon name
const config = yaml.load(fs.readFileSync('./addons/example/addon_config.yml', 'utf8'));
 
module.exports.run = (client) => {
	setCommand(client, {
		name: "example",
		description: "Example Description",
		usage: "Example Usage",
		permissions: [],
		aliases: [],
		category: "addon",
		listed: false,
		slash: true,
		async run(message, args) {
			message.channel.send({ content: "Example Addon - Normal Command." })
		},
		async slashRun(interaction, args) {
			interaction.reply({ content: "Example Addon - Slash Command." })
		} 
	});

	setEvent(client, {
		name: 'ready',
		async run() {
			console.log("Example Addon - ready Event")
		}
	});
}
```
