slash

Help for Slash commands!

Slash Commands

  • now discord is forcing to use slash commands, so we decided to make our handler support slash commands!

Example

module.exports = {
    name: 'say',
    description: 'Shows latency ping!',
    options: [{
        name: 'input',
        type: 'STRING',
        description: 'The input to echo back',
        required: true,
    }],
    run: async({ interaction, client, args, reply, editReply }) => {
        let r = await reply({ content: "hi" + interaction.member }) //interaction will be slash interaction when user uses slash command but if users uses normal then interaction will me message!
        await editReply(r, { content: "hello"})
    }
}

All types of arguments!

STRING
INTEGER
BOOLEAN
USER
CHANNEL
ROLE
MENTIONABLE
SUB_COMMAND_GROUP
SUB_COMMAND

Last updated