discord-modals icon indicating copy to clipboard operation
discord-modals copied to clipboard

Show Modal Error (Select Menu)

Open pillowskiy opened this issue 3 years ago • 10 comments

image

Code

          const modal = new Modal()
          .setCustomId('modal-customid')
          .setTitle('Modal')
          .addComponents(
            new SelectMenuComponent()
              .setCustomId('theme')
              .setPlaceholder('What theme of Discord do you like?')
              .addOptions(
                {
                  label: 'Dark',
                  description: 'The default theme of Discord.',
                  value: 'dark',
                },
                {
                  label: 'Light',
                  description: 'Some people hate it, some people like it.',
                  value: 'light',
                },
              ),
          );

          return showModal(modal, { client, interaction });

pillowskiy avatar Aug 17 '22 19:08 pillowskiy

I've been using the library for about a month, because discord.js doesn't support select menus in modals idk what happened, I didn’t touch anything, took an example from the guide.

It seems that all the fields are correct, what should I do?

pillowskiy avatar Aug 17 '22 19:08 pillowskiy

Start by not using unreleased and unsupported features. Tends to help when that undocumented feature disappears.

tipakA avatar Aug 17 '22 20:08 tipakA

The Dis. API version isn't dynamically updated in the library, is it statically specified?

pillowskiy avatar Aug 17 '22 20:08 pillowskiy

Doesn't matter, the API change rolled out, so you cannot do this anymore.

castdrian avatar Aug 17 '22 20:08 castdrian

is it statically specified?

Well, yes. the lib didn't change, but it didn't have to because it never explicitly supported selects in modals. Also, don't get confused. APIs tend to get updated without asking every single library and user using it to "update pls we want to change a thing", especially when the thing they are changing is not supported or even documented.

tipakA avatar Aug 17 '22 20:08 tipakA

Unfortunately, Discord stopped allowing select menus in modal responses, I need to remove the select menus in discord-modals then. According to some people (including a Discord Developer), select menus in modals was a bug but was solved today. Also, some people say that select menus in modals are planned for the future, Nobody knows 🤷‍♂️

Mateo-tem avatar Aug 17 '22 22:08 Mateo-tem

so is this problem temporary or what?

Bardia-SG avatar Aug 18 '22 02:08 Bardia-SG

I don't really know, but probably yes, Discord didn't provide a date for support of select menus in modals, just they have it planified.

Mateo-tem avatar Aug 18 '22 02:08 Mateo-tem

Any option to set a select menu into a modal? 😞

Sube22 avatar Aug 18 '22 20:08 Sube22

nah

Есть ли возможность установить меню выбора в модальное?😞

pillowskiy avatar Aug 18 '22 20:08 pillowskiy