Dropdowns

I was looking through the documentation but i cant find anything on dropdown menus if anyone can help
29 Replies
d.js docs
d.js docs3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
will it be under these?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
Ah right ty @moros0741 Hey sorry but after a bit i still cant figure out how to make the menus
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
ive read the whole thing and even my friend ( who has better knowledge than me ) and we both just cant figure it out in general
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
Ah- i didnt even see this sorry
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
Still quite new to this 🤣 sorry for any interuption
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
Its 1 min to midnight for me ( not sure about you )
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
Damn well do you want me to talk to you via this thread or dms or smth if i got any questions?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
Alrighty i will do :3 ty i will be back but goodnight if you do go to sleep honestly, ive already broken it or i just didnt do it right 💀
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
the whole code or dropdown
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
const { ActionRowBuilder, SelectMenuBuilder } = require('discord.js');

client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;

if (interaction.commandName === 'ping') {
const row = new ActionRowBuilder()
.addComponents(
new SelectMenuBuilder()
.setCustomId('select')
.setPlaceholder('Nothing selected')
.setMinValues(2)
.setMaxValues(3)
.addOptions([
{
label: '30 Commando',
description: 'This is to open a ticket with the 30 Commando Squadron Leadership',
value: 'first_option',
},
{
label: '40 Commando',
description: 'This is to open a ticket with the 40 Commando Squadron Leadership',
value: 'second_option',
},
{
label: '41 Commando',
description: 'This is to open a ticket with the 30 Commando Squadron Leadership',
value: 'third_option',
},
]),
);

await interaction.reply({ content: 'Pong!', components: [row] });
}
});
const { ActionRowBuilder, SelectMenuBuilder } = require('discord.js');

client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;

if (interaction.commandName === 'ping') {
const row = new ActionRowBuilder()
.addComponents(
new SelectMenuBuilder()
.setCustomId('select')
.setPlaceholder('Nothing selected')
.setMinValues(2)
.setMaxValues(3)
.addOptions([
{
label: '30 Commando',
description: 'This is to open a ticket with the 30 Commando Squadron Leadership',
value: 'first_option',
},
{
label: '40 Commando',
description: 'This is to open a ticket with the 40 Commando Squadron Leadership',
value: 'second_option',
},
{
label: '41 Commando',
description: 'This is to open a ticket with the 30 Commando Squadron Leadership',
value: 'third_option',
},
]),
);

await interaction.reply({ content: 'Pong!', components: [row] });
}
});
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
no it didnt and honestly i just copied it off the website the guide to try get a start on it i get no errors but it doesnt send
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
im on the latest version
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
14.3 i believe
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ImSkylar
ImSkylarOP3y ago
tryin nope i dont have slash commands im already so lost I mean i just want the embed to go into a channel, people can click on what department they want and it opens that ticket kinda like ticket tool but yea

Did you find this page helpful?