Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to default_values is not supported #9959

Closed
CaptainPlantain opened this issue Nov 13, 2023 · 1 comment
Closed

Modifications to default_values is not supported #9959

CaptainPlantain opened this issue Nov 13, 2023 · 1 comment

Comments

@CaptainPlantain
Copy link

Which package is this bug report for?

discord.js

Issue description

After creating a select menu, the chosen default values cannot be updated.

Code sample

await interaction.deferReply({ ephemeral: true });
  
// Build the channel menu
  const channelMenu = new ActionRowBuilder().addComponents(
    new ChannelSelectMenuBuilder()
      .setCustomId(`channelMenu`)
      .setPlaceholder('Select channel')
      .setMinValues(0)
      .setMaxValues(1)
      .setDefaultChannels(channelId),
  );  

  // Send initial reply
  await interaction.editReply({
    content: 'foo',
    components: [channelMenu],
    ephemeral: true,
  });

  // Modify default channel
  channelMenu.components[0].data.default_values = [{ id: newChannelId, type: 'channel' }];

  // Resend reply 
  await interaction.editReply({
    content: 'bar',
    components: [channelMenu],
    ephemeral: true,
  });

Versions

  • discord.js 14.14.1

Issue priority

Medium (should be fixed soon)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

No response

@Jiralite
Copy link
Member

They update for me, but not on desktop. It's not a discord.js bug.

@Jiralite Jiralite closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants