Class Config

java.lang.Object
net.bonn2.modules.Module
net.bonn2.modules.config.Config

public class Config extends Module
  • Constructor Details

    • Config

      public Config()
  • Method Details

    • getName

      public String getName()
      Overrides:
      getName in class Module
    • getVersion

      public String getVersion()
      Overrides:
      getVersion in class Module
    • registerLoggingChannels

      public void registerLoggingChannels()
      Specified by:
      registerLoggingChannels in class Module
    • registerSettings

      public void registerSettings()
      Specified by:
      registerSettings in class Module
    • load

      public void load()
      Load the config from file into ram. Write a new config to disk if no config exists.
      Specified by:
      load in class Module
    • getCommands

      public net.dv8tion.jda.api.interactions.commands.build.CommandData[] getCommands()
      Specified by:
      getCommands in class Module
    • get

      @NotNull public static @NotNull com.google.gson.JsonElement get(@NotNull @NotNull String key)
      Get an item from the config
      Parameters:
      key - The string key of the config item
      Returns:
      A JsonElement containing the config item
    • getList

      @NotNull public static @NotNull List<String> getList(@NotNull @NotNull String key)
      Get a list item from the config
      Parameters:
      key - The string key of the config item
      Returns:
      A List of Strings containing the list items