-1

Example

Hey guys, can anyone tell me how to add such an input field to a slash command in Discord.js (v.14)? Example above.

  • Have you taken a look at the official DJS guide on Slash Commands? – Elitezen Sep 24 '22 at 23:14
  • Hello, just to help you familiarise with StackOverflow, we do not spoon feed here. You are simply in the wrong place and did not seem to read how to ask a question. Please refer to the side panel when posting a question to ensure that you get the correct answer you are looking for. – Jeffplays2005 Sep 25 '22 at 09:46

1 Answers1

1

Look at the discord.js doc here
When you create a command, you have just to set the options parameters :

client.application.commands.create({
    type: "CHAT_INPUT",
    name: "mycommand",
    description: "My awesome command",
    options: [
        {
            type: "STRING",
            name: "firstparameter",
            description: "My first parameter",
            required: true
        }
    ]
});