Package com.dianxin.tori.api.config
Interface ServerConfiguration
public interface ServerConfiguration
Represents the core configuration settings for the Tori Server.
Provides access to both the raw configuration file data and specific configuration properties.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the underlying raw configuration file data.booleanisDebug()Checks whether the global debug mode is enabled for the server.booleanChecks whether logs Discord API Error is formatted gracefully.booleanChecks whether errors on JDA RestActions should be globally ignored.boolean
-
Method Details
-
getConfig
FileConfiguration getConfig()Retrieves the underlying raw configuration file data.- Returns:
- The
FileConfigurationinstance containing all loaded settings.
-
isIgnoreErrorsOnRestAction
boolean isIgnoreErrorsOnRestAction()Checks whether errors on JDA RestActions should be globally ignored.- Returns:
trueif REST action errors are ignored (fire-and-forget fallback),falseif they require explicit handling.
-
isGracefulLogOnUnknownInteractionError
boolean isGracefulLogOnUnknownInteractionError()Checks whether logs Discord API Error is formatted gracefully.- Returns:
trueif Suppresses the massive default JDA stack trace and, instead prints a clean, single-line warning in the console, whenfalseif they prints the fullErrorResponseExceptionandContextExceptionstack traces.
-
isDebug
boolean isDebug()Checks whether the global debug mode is enabled for the server. When enabled, additional trace and debug level logging will be output to the console.- Returns:
trueif debug mode is active,falseotherwise.
-
isSuppressingSomePackageOnStackTraceEnabled
@Internal boolean isSuppressingSomePackageOnStackTraceEnabled()
-