How do I register components like buttons in this case, similarly to JavaBot? but without the use of Spring? or any other libraries like Spring? I did try to copy JavaBots code on this, but it required Spring to work so, yeah. (DIH4JDA + JDA)
package com.hedreon.hedreobot;
import ..;
public class Bot {
private static DIH4JDA dih4jda;
private void registerButtons() {
// code
}
@SuppressWarnings("unused")
public static void main(String[] args) throws DIH4JDAException {
Dotenv env = Dotenv.configure().load();
String loginVar = env.get("TOKEN");
JDA jda = JDABuilder.createDefault(loginVar).setActivity(Activity.watching("you")).build();
dih4jda = DIH4JDABuilder.setJDA(jda).setCommandPackages("com.hedreon.hedreobot.commands").build();
//dih4jda.addButtonMappings(IdMapping.of(new RulesCommand(), "rules-button"));
dih4jda.addEventListener(new PermissionListener());
}
}