File tree Expand file tree Collapse file tree 5 files changed +39
-16
lines changed
docs/com/seailz/test/listeners
main/java/com/seailz/jdaframework/command/registry
test/java/com/seailz/test Expand file tree Collapse file tree 5 files changed +39
-16
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ <h2 title="Class TestListener" class="title">Class TestListener</h2>
123123< li > java.lang.Object</ li >
124124< li >
125125< ul class ="inheritance ">
126- < li > com.seailz.test.listeners. TestListener</ li >
126+ < li > TestListener</ li >
127127</ ul >
128128</ li >
129129</ ul >
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public CommandRegistry() {
2121 }
2222
2323 public void registerCommand (JDA jda , Command command ) {
24- if (! commands .containsValue (command )) return ;
24+ if (commands .containsValue (command )) return ;
2525 if (command .getOptions ().isEmpty ()) {
2626 jda .upsertCommand (command .getName (), command .getDescription ()).queue ();
2727 } else {
Original file line number Diff line number Diff line change 1+ package com .seailz .test ;
2+
3+ import com .seailz .jdaframework .DiscordBot ;
4+ import net .dv8tion .jda .api .events .GenericEvent ;
5+ import net .dv8tion .jda .api .hooks .EventListener ;
6+ import org .jetbrains .annotations .NotNull ;
7+
8+ import javax .security .auth .login .LoginException ;
9+
10+ public class TestBot extends DiscordBot {
11+
12+ public static void main (String [] args ) throws LoginException {
13+ new TestBot ();
14+ }
15+ public TestBot () throws LoginException {
16+ super ("token" );
17+ build ();
18+
19+ registerCommands (new TestCommand ());
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ package com .seailz .test ;
2+
3+ import com .seailz .jdaframework .command .Command ;
4+ import com .seailz .jdaframework .command .annotation .CommandInfo ;
5+ import net .dv8tion .jda .api .events .interaction .command .SlashCommandInteractionEvent ;
6+
7+ @ CommandInfo (
8+ name = "test" ,
9+ description = "Test command"
10+ )
11+ public class TestCommand extends Command {
12+ @ Override
13+ public void onCommand (SlashCommandInteractionEvent e ) {
14+ e .reply ("hi" ).queue ();
15+ }
16+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments