Package net.bonn2.modules.config
Class Config
java.lang.Object
net.bonn2.modules.Module
net.bonn2.modules.config.Config
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.bonn2.modules.Module
getAuthor, getDepends, getDescription
-
Constructor Details
-
Config
public Config()
-
-
Method Details
-
getName
-
getVersion
- Overrides:
getVersionin classModule
-
registerLoggingChannels
public void registerLoggingChannels()- Specified by:
registerLoggingChannelsin classModule
-
registerSettings
public void registerSettings()- Specified by:
registerSettingsin classModule
-
load
public void load()Load the config from file into ram. Write a new config to disk if no config exists. -
getCommands
public net.dv8tion.jda.api.interactions.commands.build.CommandData[] getCommands()- Specified by:
getCommandsin classModule
-
get
Get an item from the config- Parameters:
key- The string key of the config item- Returns:
- A JsonElement containing the config item
-
getList
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
-