Package me.therealkeyis.models
Class DiscordConfig
java.lang.Object
me.therealkeyis.models.DiscordConfig
Configuration object for the DiscordBot
-
Constructor Summary
ConstructorDescriptionDiscordConfig
(org.bukkit.configuration.file.FileConfiguration config, Logger log, Runnable saveConfig) Automatically builds configuration based on the Plugin configuration -
Method Summary
Modifier and TypeMethodDescriptionProvides the configured default Discord voice category nameThe plugin loggerProvides the configured server idProvides the configured default Discord text channel IDgetToken()
Provides the configured Discord API tokenProvides the configured default Discord voice channel IDvoid
setCategory
(String category) void
void
setTextChannelId
(String textChannelId) void
setVoiceChannelId
(String voiceChannelId)
-
Constructor Details
-
DiscordConfig
public DiscordConfig(org.bukkit.configuration.file.FileConfiguration config, Logger log, Runnable saveConfig) Automatically builds configuration based on the Plugin configuration- Parameters:
config
- The plugin configuration objectlog
- The plugin loggersaveConfig
- A function that saves the current configuration to file
-
-
Method Details
-
getToken
Provides the configured Discord API token- Returns:
- A Discord API token
-
getTextChannelId
Provides the configured default Discord text channel ID- Returns:
- A Discord text channel ID
-
getVoiceChannelId
Provides the configured default Discord voice channel ID- Returns:
- A Discord voice channel ID
-
getCategory
Provides the configured default Discord voice category name- Returns:
- A Discord category name
-
getServerId
Provides the configured server id- Returns:
- A Discord server ID
-
getLogger
The plugin logger- Returns:
- The plugin logger
-
setTextChannelId
-
setVoiceChannelId
-
setCategory
-
setLog
-