File tree Expand file tree Collapse file tree
src/main/java/com/diamondfire/helpbot/sys/report Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ public void onModalInteraction(ModalInteractionEvent event) {
142142 }
143143
144144 SERVICE .submit (() -> {
145+ event .deferReply (true ).queue ();
145146 try (WebhookClient client = JDAWebhookClient .withUrl (webhookUrl .getAsString ())) {
146147 boolean tooLong = message .length () > 2000 ;
147148 String content = tooLong ? "See content.txt for message (too long)" : message ;
@@ -168,9 +169,9 @@ public void onModalInteraction(ModalInteractionEvent event) {
168169 client .send (builder .build ()).whenComplete ((msg , exception ) -> {
169170 if (exception != null ) exception .printStackTrace ();
170171 if (exception != null ) {
171- event .reply (":x: Uh oh! An error occurred while submitting your report. Please try resending it later." ).setEphemeral (true ).queue ();
172+ event .getHook (). sendMessage (":x: Uh oh! An error occurred while submitting your report. Please try resending it later." ).setEphemeral (true ).queue ();
172173 } else {
173- event .reply (":mega: Your report has been successfully submitted!" ).setEphemeral (true ).queue ();
174+ event .getHook (). sendMessage (":mega: Your report has been successfully submitted!" ).setEphemeral (true ).queue ();
174175 }
175176 });
176177 } catch (Throwable ignored ) {
You can’t perform that action at this time.
0 commit comments