Skip to content

Latest commit

 

History

History
executable file
·
26 lines (25 loc) · 552 Bytes

messageCommands.md

File metadata and controls

executable file
·
26 lines (25 loc) · 552 Bytes

MessageCommands (With Aliases)

Format

export const MsgCommand = {
    name: "commandName",
    // Other Command Options
    aliases: ["commandName2", "commandName3"], // Optional to be provided.
    run: async(client, message, args) => {
        // Code Here
    }
};

Example Code

export const MsgCommand = {
    name: "ping",
    // Other Command Options
    aliases: ["pong"],
    run: (client, message, args) => {
        message.channel.send({
            content: `My ping is ${client.ws.ping}ms.`
        });
    }
};