Premium Button didn't work

Hi, there,

First of all, I haven't found any documentation on how the Premium button works.

Secondly, I have a problem (Expected the value to be a string or number) for the “Premium” button type.

My code:

await interaction.reply({
      embeds: [
        new EmbedBuilder()
          .setColor("DarkRed")
          .setTimestamp()
          .setAuthor({
            name:
              interaction.user.globalName ??
              interaction.user.username ??
              "Unknown User",
            iconURL: interaction.user.displayAvatarURL() ?? "",
          })
          .setThumbnail(client.user.displayAvatarURL())
          .setDescription("You do not have a Premium subscription to OGHub."),
      ],
      components: [
        new ActionRowBuilder().addComponents(
          new ButtonBuilder()
            .setStyle(ButtonStyle.Premium)
            .setSKUId("1270342893235605524"),
          new ButtonBuilder()
            .setLabel("Sign-up")
            .setStyle(ButtonStyle.Link)
            .setURL("https://...")
        ),
      ],
    });


Full error:
ValidationError > s.nativeEnum(T)
Expected the value to be a string or number

Received:
| undefined

at _NativeEnumValidator.handle (node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2634:25)
at _NativeEnumValidator.parse (node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:939:90)
at ButtonBuilder.setStyle (node_modules/@discordjs/builders/dist/index.js:636:44)
at checkPremium (src/structures/commandOptions/checkPremium.js:66:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.run (src/interactions/slashCommands/premium.js:33:30)


Version : Latest (v14.16.x)

Was this page helpful?