How to create a module
Create a module.
require("dotenv").config()
const fs = require("node:fs");
const yaml = require("js-yaml");
const load = require("@utils/handlers");
const yamlData = fs.readFileSync("./config/ConfigFile.yml","utf8");
const config = yaml.load(yamlData);
module.exports = {
name: "ModuleName",
description: "Your modules description.",
enabled: config.enabled,
emoji: "🤖",
packages: ["discord.js"],
execute(client, commmands) {
load.handleCommands(this.name, commmands, this.enabled);
load.handleEvents(this.name, client, this.enabled);
},
};
Last updated