Select menu reporting old id?

Hey! I'm experiencing a really weird issue that I have no idea what could be causing. I was using a select menu and decided to change the customId field of it. Yet new select menus using it are reporting to old custom id. I checked, the old custom id (the one being sent when the new ones are used), is found nowhere in my bot's code. Is Discord trying to cache this in some way? What's going on??
9 Replies
d.js docs
d.js docs3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Dominic
DominicOP3y ago
Node: 16.17.0 Discord.js: 14.5.0 the rest I can provide if needed 🙂 also please ping me when you respond
MrMythical
MrMythical3y ago
Show where you change the custom id
Deimoss
Deimoss3y ago
discord doesnt cache custom ids, the custom id will be the same as the one you added to the component, so its most definitely you
Dominic
DominicOP3y ago
that's what i figured
...
const actionsSelectMenuActionRow = new ActionRowBuilder<SelectMenuBuilder>()
.addComponents(
new SelectMenuBuilder()
.setCustomId("self-role-create-editor-select")
.addOptions(
{
...
...
const actionsSelectMenuActionRow = new ActionRowBuilder<SelectMenuBuilder>()
.addComponents(
new SelectMenuBuilder()
.setCustomId("self-role-create-editor-select")
.addOptions(
{
...
I have it logging all interactions to console and when the select menu above is triggered it instead shows an interaction with custom id self-role-create-action-selct which is what the custom id used to be its sorta funny that my typo from earlier is what is sticking around lol
MrMythical
MrMythical3y ago
Where do you edit the message
Dominic
DominicOP3y ago
return await interaction.update({ embeds: [embed], components: [actionsSelectMenuActionRow] }); is that what you mean? Hello? will do, just a sec. It looks like it is sending it with the correct new ID, but it's just the interaction that is the old ID. Nope, these are new (ephemeral) messages This is an update of button original button response: await interaction.deferReply({ ephemeral: true }); then return await interaction.editReply({ components: [row] }); response to select menu from previous, sends select menu that is causing this headache await interaction.deferReply, then await interaction.update({ embeds: [embed], components: [actionsSelectMenuActionRow]}); Nope. I can try it just removing the defer then. I still don't know why this would be sending the old id tho. sure, just a second
Dominic
DominicOP3y ago
Gist
idk what to call it
idk what to call it. GitHub Gist: instantly share code, notes, and snippets.
Dominic
DominicOP3y ago
I am using a select menu handler based off the one the guide shows for slash commands I need to leave now, but thanks for your help so far! Oh, I see the issue with A. And looking back I did send the wrong ID, whoops. Still tho, the same problem remains. What is returned is self-role-create-action-selct, which is not mentioned anywhere in my code. I decided to take a look in the built .js files and low and behold, the old id I deleted the built folder and had it rebuild all of it and it works... not sure why it kept the old id but i guess this works lol
Want results from more Discord servers?
Add your server