11package net .discordjug .javabot .data .h2db .commands ;
22
3+ import net .dv8tion .jda .api .modals .Modal ;
34import xyz .dynxsty .dih4jda .interactions .commands .application .SlashCommand ;
45import xyz .dynxsty .dih4jda .interactions .components .ModalHandler ;
56import net .discordjug .javabot .annotations .AutoDetectableComponentHandler ;
67import net .discordjug .javabot .data .config .SystemsConfig ;
78import net .discordjug .javabot .util .ExceptionLogger ;
89import net .discordjug .javabot .util .Responses ;
910import net .dv8tion .jda .api .Permission ;
11+ import net .dv8tion .jda .api .components .label .Label ;
12+ import net .dv8tion .jda .api .components .textinput .TextInput ;
13+ import net .dv8tion .jda .api .components .textinput .TextInputStyle ;
1014import net .dv8tion .jda .api .entities .channel .concrete .TextChannel ;
1115import net .dv8tion .jda .api .events .interaction .ModalInteractionEvent ;
1216import net .dv8tion .jda .api .events .interaction .command .SlashCommandInteractionEvent ;
1317import net .dv8tion .jda .api .interactions .commands .build .SubcommandData ;
14- import net .dv8tion .jda .api .interactions .components .ActionRow ;
15- import net .dv8tion .jda .api .interactions .modals .Modal ;
16- import net .dv8tion .jda .api .interactions .components .text .TextInput ;
17- import net .dv8tion .jda .api .interactions .components .text .TextInputStyle ;
1818import net .dv8tion .jda .api .interactions .modals .ModalMapping ;
1919
2020import org .jetbrains .annotations .NotNull ;
@@ -105,7 +105,7 @@ public void handleModal(@NotNull ModalInteractionEvent event, List<ModalMapping>
105105 }
106106
107107 private @ NotNull Modal buildQuickMigrateModal () {
108- TextInput sqlInput = TextInput .create ("sql" , "SQL-Statement (H2)" , TextInputStyle .PARAGRAPH )
108+ TextInput sqlInput = TextInput .create ("sql" , TextInputStyle .PARAGRAPH )
109109 .setPlaceholder ("""
110110 CREATE TABLE my_table (
111111 thread_id BIGINT PRIMARY KEY,
@@ -114,12 +114,12 @@ CREATE TABLE my_table (
114114 """ )
115115 .setRequired (true )
116116 .build ();
117- TextInput confirmInput = TextInput .create ("confirmation" , "Confirmation" , TextInputStyle .SHORT )
117+ TextInput confirmInput = TextInput .create ("confirmation" , TextInputStyle .SHORT )
118118 .setPlaceholder ("Type 'CONFIRM' to confirm this action" )
119119 .setRequired (true )
120120 .build ();
121121 return Modal .create ("quick-migrate" , "Quick Migrate" )
122- .addComponents (ActionRow .of (sqlInput ), ActionRow .of (confirmInput ))
122+ .addComponents (Label .of ("SQL-Statement (H2)" , sqlInput ), Label .of ("Confirmation" , confirmInput ))
123123 .build ();
124124 }
125125}
0 commit comments