#How do I send a premium button?

10 messages · Page 1 of 1 (latest)

karmic star
#
<message>.channel.send({
    components: [
        new ActionRowBuilder()
        .addComponents(
            new ButtonBuilder()
            .setLabel('Premium')
              .setStyle(6)
                .setSKUId('skuid'))
    ]
})

This error occurred.

 Expected the value to be a string or number
teal hearthBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
  • Marked as resolved by OP
lucid crystalBOT
karmic star
#

I also get this error

#
Error: Expected the value to be one of the following enum values:
cold bobcat
#

how do you import ButtonBuilder?

karmic star
#
const { ButtonBuilder } = require('discord.js')

I import it like this

cold bobcat
#

can you show the full error please

#

i tested this in my own bot and you can't set a label with a premium button