IntelliJ Code Inspection Plugin for jda-commands
@Interaction
public class DynamicOptionTest {
@SlashCommand("button test")
public void onCommand(CommandEvent event) {
// marked as an error, because the correct reference would be "onButton"
event.withButtons("onClick").reply("Click me");
}
@Button("Click me")
public void onButton(ComponentEvent event) {
event.reply("You clicked me!");
}
}
@Interaction
public class DynamicOptionTest {
@SlashCommand("button test")
public void onCommand(CommandEvent event) {
// marked as an error, because no method "onClick" exists yet
event.withButtons("onClick").reply("Click me");
}
}
@Interaction
public class DynamicOptionTest {
@SlashCommand("button test")
public void onCommand(CommandEvent event) {
event.withButtons("onClick").reply("Click me");
}
@Button()
public void onClick(ComponentEvent event) {
}
}