How do I send a premium button?

<message>.channel.send({
components: [
new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel('Premium')
.setStyle(6)
.setSKUId('skuid'))
]
})
<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
Expected the value to be a string or number
No description
7 Replies
d.js toolkit
d.js toolkit3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - 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
d.js docs
d.js docs3mo ago
:dtypes: v10: ButtonStyle - Premium read more
Nilla
NillaOP3mo ago
I also get this error
Error: Expected the value to be one of the following enum values:
Error: Expected the value to be one of the following enum values:
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Nilla
NillaOP3mo ago
const { ButtonBuilder } = require('discord.js')
const { ButtonBuilder } = require('discord.js')
I import it like this
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Nilla
NillaOP3mo ago
I solved it!
Want results from more Discord servers?
Add your server