#why does this menu reset when I select something? I want the placeholder as the menu selected

1 messages · Page 1 of 1 (latest)

solar agate
hoary bough
#

huh

solar agate
#

looks like you are reply with a new message everytime

#

you should set the previous selection as default

hoary bough
solar agate
#

use default when declaring your options

#

you don't need a hardcoded default

valid sable
solar agate
#

you can use your previous interaction to decide the new default

valid sable
#

he's using interaction.deferUpdate() and edit the initial reply (slash command one)

solar agate
hoary bough
hoary bough
solar agate
#

is it a new message or not @hoary bough before going further?

hoary bough
#

first 2 options

if(values[0] === "helpOwnerOption") {
              client.commands.category.owner.forEach(cmd => {
                return output.push(`**[${cmd.name}](${link})**
                :Stabler: ${cmd.description || "No description provided"}`)
              })
              let embedOwner = new embed()
              .setTitle("Owner")
              .setDescription(output.join("\n"))
              .setColor("2f3136")
              .setTimestamp()
              await i.editReply({ embeds: [embedOwner] })
            } else if(values[0] === "helpModOption") {
              client.commands.category.mod.forEach(cmd => {
                return output.push(`**[${cmd.name}](${link})**
                :Stabler: ${cmd.description || "No description provided"}`)
              })
              let embedMod = new embed()
              .setTitle("Moderation")
              .setDescription(output.join("\n"))
              .setColor("2f3136")
              .setTimestamp()
              await i.editReply({ embeds: [embedMod] })
            }
solar agate
#

i might be wrong, but i see very little correlation between the code you sent and the first video. where is Economy or General?

hoary bough
#

its the same

solar agate
#

my bad

hoary bough
#

why do you think the select menu keeps resetting?

hoary bough
solar agate
#

where you define the select menu? aka where you send the initial msg

hoary bough
#

the assets.options is

options: [
    {
      label: "Bot owner",
      description: "Commands that only the bot owner can use", value: "helpOwnerOption",
      emoji: ":Crown:"
    }, 
    {
      label: "Moderation",
      description: "Commands that only moderators can use",
      value: "helpModOption",
      emoji: ":Lock:"
    },
    {
      label: "General",
      description: "General commands that mostly everyone can use",
      value: "helpGeneralOption",
      emoji: ":Settings:"
    },
    {
      label: "Fun",
      description: "Commands that can everyone can use for fun",
      value: "helpFunOption",
      emoji: ":Flower:"
    },
    {
      label: "Economy",
      description: "Economy commands that can be used by everyone",
      value: "helpEconomyOption",
      emoji: ":MoneyEmoji:"
    },
    {
      label: "Image",
      description: "Fun image commands",
      value: "helpImageOption",
      emoji: ":Picture:"
    },
    {
      label: "Music",
      description: "Intersting music commands",
      value: "helpMusicOption",
      emoji: ":MusicBeat:"
    },
    {
      label: "Slash",
      description: "All of the slash commands in Zetaku",
      value: "helpSlashCmdsOption",
      emoji: ":SlashCommand:"
    },
    {
      label: "All",
      description: "All of the commands in Zetaku",
      value: "helpAllOption",
      emoji: ":Pin:"
    }
  ],
solar agate
#

i'm thinking

#

so if you use i.editReply, you indeed post a new message

hoary bough
solar agate
#

does the original message keeps its selection?

solar agate
#

ok, so this is the problem

#

i guess you want just 1 msg right?

hoary bough
#

Ye

solar agate
#

use .update(), not .editReply()

hoary bough
#

ok

#

lemme try

solar agate
#

i see you already used .deferUpdate() which is good

hoary bough
#

because I deferred it

solar agate
#

right. sorry for telling misleading stuff, i'm not really experienced with update. how are you doing it in the working code with arrow buttons?

hoary bough
hoary bough
solar agate
#

maybe if you use just update without deferring

hoary bough
solar agate
#

you mean the same error?

hoary bough
#

no

#

no error

#

because I removed deferUpdate

#

but still resets

solar agate
#

but do you still get multiple messages from the bot?

solar agate
#

we confirmed previously that by using editReply, the bot edits a new message, rather than the original reply. does this still happens?

hoary bough
#

@solar agate You there?

solar agate
#

yes, but i have no idea what would be the cause

#

i mean, when creating a new row, it is expected that the previous selected options are no longer selected