Package xyz.norbjert.jda4spring.internal
Class JDAInstanceManager
java.lang.Object
xyz.norbjert.jda4spring.internal.JDAInstanceManager
simple help class, to allow BotTasks to request their jda instance
Todo: get rid of this crap, put the functionality into DiscordBot or remove it entirely
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddJDAWithBotTasks(JDAInstanceTaskMapper element) static net.dv8tion.jda.api.JDArequestJDAInstance(Class<?> clazz) request the JDA instance for an eventListener
-
Constructor Details
-
JDAInstanceManager
public JDAInstanceManager()
-
-
Method Details
-
addJDAWithBotTasks
-
requestJDAInstance
request the JDA instance for an eventListener- Parameters:
clazz- the eventListener in need of his JDA- Returns:
- the correct JDA if available
-