Package com.github.ygimenez.model
Class PUtilsConfig
java.lang.Object
com.github.ygimenez.model.PUtilsConfig
Utility class holding library-wide settings.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classLevels used to filter what events are logged to the console by the library. -
Method Summary
Modifier and TypeMethodDescriptionstatic PUtilsConfig.LogLevelRetrieves thePUtilsConfig.LogLevelcurrently configured.static ThrowingConsumer<net.dv8tion.jda.api.interactions.InteractionHook>Retrieve the action performed when encounteing an unmapped event.static voidsetLogLevel(PUtilsConfig.LogLevel logLevel)Set the library'sPUtilsConfig.LogLevel.static voidsetOnRemove(ThrowingConsumer<net.dv8tion.jda.api.interactions.InteractionHook> onRemove)Set the action to be performed when encountering an unmapped event.
-
Method Details
-
getLogLevel
Retrieves thePUtilsConfig.LogLevelcurrently configured.- Returns:
- The current
PUtilsConfig.LogLevel.
-
setLogLevel
Set the library'sPUtilsConfig.LogLevel.- Parameters:
logLevel- The desiredPUtilsConfig.LogLevel(default:PUtilsConfig.LogLevel.LEVEL_1).
-
getOnRemove
Retrieve the action performed when encounteing an unmapped event.- Returns:
- The action to be performed.
-
setOnRemove
public static void setOnRemove(ThrowingConsumer<net.dv8tion.jda.api.interactions.InteractionHook> onRemove)Set the action to be performed when encountering an unmapped event. This defaults to simply removing the message buttons.- Parameters:
onRemove- The action to be performed (the interaction is automatically acknowledged).
-