You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@InteractionpublicclassDynamicOptionTest {
@SlashCommand("button test")
publicvoidonCommand(CommandEventevent) {
// marked as an error, because the correct reference would be "onButton"event.withButtons("onClick").reply("Click me");
}
@Button("Click me")
publicvoidonButton(ComponentEventevent) {
event.reply("You clicked me!");
}
}
Quickfix
Quickfix options allow you to generate missing code
Before Quickfix:
@InteractionpublicclassDynamicOptionTest {
@SlashCommand("button test")
publicvoidonCommand(CommandEventevent) {
// marked as an error, because no method "onClick" exists yetevent.withButtons("onClick").reply("Click me");
}
}