Handlers

Command handler

module.exports = {
    name: 'ping',
    description: 'See the bots ping in ms',
    category: 'Example',

    run: async (client, message, args) => {
        // Code here
    },
};

Slash command handler

const { slashCommand } = require("dotwood.js");

module.exports = {
    data: new slashCommand({
        name: "ping",
        desc: "See the bots ping in ms"
    }),

    run: async (client, interaction, args) => {
        // Code here
    },
};

Last updated