Deleting a Command

In case you do not want the user to run some commands to the bot, you might want to temporarily "delete" the command without deleting the command file.

How to "delete" the command?

You will have to insert the "delete" variable and set it to true.

ping.js
const { NoCliCommandType } = require("nocli-handler.js");

/**
 * @type {import("nocli-handler.js").ICommand}
 */
const Command = {
    delete: true, // <-- Temporarily "deletes" the command.
    type: NoCliCommandType.Both, //    Works for Slash commands also
    description: "Checks client latency",
    callback: ({ client, message, args, text }) => {
        return `๐Ÿ“ Pong! \`${client.ws.ping}ms\``
    }
}

module.exports = Command;

This feature is currently being improved. Expect the future version to have its full features.

Last updated