Class JDA4SpringMain

java.lang.Object
xyz.norbjert.jda4spring.internal.JDA4SpringMain

@Component public class JDA4SpringMain extends Object
handles the initialisation process of the individual DiscordBots and configures them with their tasks, activities and API tokens (and soon gateway intents)
  • Constructor Details

    • JDA4SpringMain

      public JDA4SpringMain(org.springframework.context.ApplicationContext appContext, @Value("${jda4spring.configFileLocation:src/main/resources/application.properties}") String configFileLocation)
  • Method Details

    • getJDAInstances

      public List<net.dv8tion.jda.api.JDA> getJDAInstances(Class<?> clazz)
      request the JDA instance for an eventListener
      Parameters:
      clazz - the eventListener in need of his JDA
      Returns:
      the correct JDA if available