#Problem with JDA
6 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @rapid aspen! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
here's code:
@Override
public void onButtonInteraction(ButtonInteractionEvent e) {
if (e.getComponentId().equalsIgnoreCase("ticketID")) {
TextInput nick = TextInput.create("ticket-nick", "Nick", TextInputStyle.SHORT)
.setPlaceholder("Discord Nickname")
.setMinLength(3)
.setMaxLength(24)
.setRequired(true)
.build();
TextInput problem = TextInput.create("ticket-problem", "Problem", TextInputStyle.PARAGRAPH)
.setPlaceholder("Describe problem..")
.setMinLength(16)
.setMaxLength(512)
.setRequired(true)
.build();
Modal ticket = Modal.create("ticket", "Ticket " + Objects.requireNonNull(e.getMember()).getUser().getAsTag())
.addActionRows(ActionRow.of(nick), ActionRow.of(problem))
.build();
e.replyModal(ticket).queue(); // error in this line (i think)
}
if (e.getComponentId().equalsIgnoreCase("closeTicketID")) {
e.getChannel().delete().queueAfter(3L, TimeUnit.SECONDS);
e.reply("Ticket was closed").queueAfter(3L, TimeUnit.SECONDS);
}
}```
are you listening to button interactions elsewhere?
yes I was, and i didn't seen that