Package xyz.norbjert.jda4spring.internal
Class JDA4SpringMain
java.lang.Object
xyz.norbjert.jda4spring.internal.JDA4SpringMain
handles the initialisation process of the individual DiscordBots and configures them with their tasks, activities and API tokens (and soon gateway intents)
-
Constructor Summary
ConstructorsConstructorDescriptionJDA4SpringMain(org.springframework.context.ApplicationContext appContext, String configFileLocation) -
Method Summary
Modifier and TypeMethodDescriptionList<net.dv8tion.jda.api.JDA>getJDAInstances(Class<?> clazz) request the JDA instance for an eventListener
-
Constructor Details
-
JDA4SpringMain
public JDA4SpringMain(org.springframework.context.ApplicationContext appContext, @Value("${jda4spring.configFileLocation:src/main/resources/application.properties}") String configFileLocation)
-
-
Method Details
-
getJDAInstances
request the JDA instance for an eventListener- Parameters:
clazz- the eventListener in need of his JDA- Returns:
- the correct JDA if available
-