JDA
JDA copied to clipboard
Add support for SelectMenus in Modals
Pull Request Etiquette
- [x] I have checked the PRs for upcoming features/bug fixes.
- [x] I have read the contributing guidelines.
Changes
- [x] Internal code
- [x] Library interface (affecting end-user code)
- [x] Documentation
- [ ] Other: _____
Closes Issue: #2161
Description
Adds support for SelectMenu
s in Modal
s.
Disclaimer: This is not yet documented by Discord.
@seailz you can use the current PR through jitpack. This is explained in our wiki.
Please only use the comments of pull requests for discussion of the implementation and feedback.
@seailz you can use the current PR through jitpack. This is explained in our wiki.
Yeah just waiting for it to be merged & for discord's doc
Please only use the comments of pull requests for discussion of the implementation and feedback.
Sorry about that
also by the way, trying to use this throws an error
[JDA MainWS-ReadThread] ERROR JDA - One of the EventListeners had an uncaught exception
java.lang.IllegalArgumentException: Some components are incompatible with Modals
- root.components[0].components[0] - <SELECT_MENU>
at net.dv8tion.jda.internal.utils.Checks.checkComponents(Checks.java:248)
at net.dv8tion.jda.api.interactions.components.Modal$Builder.addActionRows(Modal.java:246)
at net.dv8tion.jda.api.interactions.components.Modal$Builder.addActionRows(Modal.java:222)
at net.dv8tion.jda.api.interactions.components.Modal$Builder.addActionRow(Modal.java:295)
at TestCommand.onSlashCommandInteraction(TestCommand.java:12)
at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:382)
at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96)
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88)
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70)
at net.dv8tion.jda.internal.JDAImpl.handleEvent(JDAImpl.java:169)
at net.dv8tion.jda.internal.handle.InteractionCreateHandler.handleCommand(InteractionCreateHandler.java:109)
at net.dv8tion.jda.internal.handle.InteractionCreateHandler.handleInternally(InteractionCreateHandler.java:80)
at net.dv8tion.jda.internal.handle.SocketHandler.handle(SocketHandler.java:36)
at net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:954)
at net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:841)
at net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:819)
at net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:993)
at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
@Xirado
You are probably still using the old JDA version. Make sure you removed the old JDA version before using the Jitpack build.
You are probably still using the old JDA version. Make sure you removed the old JDA version before using the Jitpack build.
Unfortunately that's not the case, I've double checked my pom
update: I managed to fix this
Any new information when this will be ready ?
Any new information when this will be ready ?
This feature is not even released by Discord, it only works on Desktop, and is not documented. See this link if you still want to use it.
hasn't worked for 2 hours
@CreaCloudz Discord blocks you from using it because its not released.
@CreaCloudz Discord blocks you from using it because its not released.
Not exactly seeing that it still works in JS
@CreaCloudz Discord blocks you from using it because its not released.
Not exactly seeing that it still works in JS
no it doesn't
Discord restricted access to Selects in Modals because people were using them before they were ready to be released and breaking mobile experiences for users and causing Discord to catch flack from confused bot devs and frustrated users.
Essentially, Discord's hand was forced because people were using an unreleased feature before it was ready.
Discord restricted access to Selects in Modals because people were using them before they were ready to be released and breaking mobile experiences for users and causing Discord to catch flack from confused bot devs and frustrated users.
Essentially, Discord's hand was forced because people were using an unreleased feature before it was ready.
Thanks for the info, hope he adds it soon.
Frozen until the feature is actually functional again.
This PR will be updated when there are news. No need to ask.