Selects

Use these functions with message functions?

Change interaction to message. For example: interaction.send("Hello!"); then becomes message.send("Hello!");

const embed = interaction.embedSuccess("This is a success embed!");

const select = interaction.select({
    placeholder: "Select a option",
    id: "selection1",
    options:
    [
        {
            label: 'Select me',
            description: 'This is a description',
            value: 'first_option',
        },
        {
            label: 'You can select me too',
            description: 'This is also a description',
            value: 'second_option',
        },
    ]
})
const row = interaction.row(select);

interaction.channel.send({ embeds: [embed], components: [row] })

Select event

client.on('selectionClick', async (interaction) => {
    // Code here
})

Last updated