Mateo-tem / discord-modals

discord-modals is a package that allows your bot of discord.js v13 to create the new Discord Modals and interact with them.
https://www.npmjs.com/package/discord-modals
MIT License
93 stars 27 forks source link

Show Modal Error (Select Menu) #113

Open pillowskiy opened 2 years ago

pillowskiy commented 2 years ago

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 commented 2 years ago

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?

tipakA commented 2 years ago

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

pillowskiy commented 2 years ago

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

castdrian commented 2 years ago

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

tipakA commented 2 years ago

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.

Mateo-tem commented 2 years ago

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 🤷‍♂️

Bardia-SG commented 2 years ago

so is this problem temporary or what?

Mateo-tem commented 2 years ago

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.

Sube22 commented 2 years ago

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

pillowskiy commented 2 years ago

nah

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