terminalCommand Handler

In this section, we will explain how to work with the Command Handler.

It's important to know that it's simple and very well explained. The structure is set up using the SlashCommandBuilder, and its capabilities can be found on the Discord.jsarrow-up-right platform.

const { SlashCommandBuilder } = require("discord.js");
const Utility = require("../utils/modules/Utility");

module.exports = {
    commands: [
        { 
            data: new SlasCommandBuilder()
                .setName('test') // Command Name
                .setDescription('This is a test addon'), // Command Description
            async execute(moi, client, args, {type, send }}) {
                // Your code goes here
            }
        }
    ]
}

It’s important to know that you should always have Utility and SlashCommandBuilder imported, as shown in the example above!

Last updated