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 toolkit3w 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 docs3w ago
:dtypes: v10: ButtonStyle - Premium read more
Nilla
Nilla3w 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 User3w ago
Message Not Public
Sign In & Join Server To View
Nilla
Nilla3w ago
const { ButtonBuilder } = require('discord.js')
const { ButtonBuilder } = require('discord.js')
I import it like this
Unknown User
Unknown User3w ago
Message Not Public
Sign In & Join Server To View
Nilla
Nilla3w ago
I solved it!
Want results from more Discord servers?
Add your server