Module watamebot

Class ProtectedJDABuilder

java.lang.Object
net.foxgenesis.watame.ProtectedJDABuilder

public class ProtectedJDABuilder extends Object
  • Method Details

    • addEventListeners

      @Nonnull public ProtectedJDABuilder addEventListeners(@Nonnull Object... listeners)
      Adds all provided listeners to the list of listeners that will be used to populate the JDA object.
      This uses the InterfacedEventListener by default.
      To switch to the AnnotatedEventManager, use setEventManager(new AnnotatedEventManager()).

      Note: When using the InterfacedEventListener (default), given listener(s) must be instance of EventListener!

      Parameters:
      listeners - The listener(s) to add to the list.
      Returns:
      The JDABuilder instance. Useful for chaining.
      Throws:
      IllegalArgumentException - If either listeners or one of it's objects is null.
      See Also:
      • JDA.addEventListener(Object...)
    • removeEventListeners

      @Nonnull public ProtectedJDABuilder removeEventListeners(@Nonnull Object... listeners)
      Removes all provided listeners from the list of listeners.
      Parameters:
      listeners - The listener(s) to remove from the list.
      Returns:
      The JDABuilder instance. Useful for chaining.
      Throws:
      IllegalArgumentException - If either listeners or one of it's objects is null.
      See Also:
      • JDA.removeEventListener(Object...)