Interface WhitelistMessageContext
- All Superinterfaces:
MessageContext
A change to the whitelist.
Builds on
MessageContext.-
Nested Class Summary
Nested classes/interfaces inherited from interface MessageContext
MessageContext.CacheKey -
Method Summary
Modifier and TypeMethodDescriptionstatic net.flectone.pulse.module.command.whitelist.model.WhitelistMessageContextImpl.WhitelistMessageContextImplBuilderbuilder()Starts building this context.@Nullable ModerationThe whitelist entry, or null when the whitelist itself was toggled.booleanturnedOn()Whether the whitelist was switched on, rather than off.withModeration(@Nullable Moderation moderation) Returns a copy carrying a different value.withTurnedOn(boolean turnedOn) Returns a copy carrying a different value.Methods inherited from interface MessageContext
addFlag, addFlags, addTagResolver, addTagResolvers, base, createCacheKey, flags, isFlag, message, receiver, sender, tagResolver, toBuilder, uuid, withBase, withFlags, withMessage, withReceiver, withSender, withTagResolver, withUuid
-
Method Details
-
builder
static net.flectone.pulse.module.command.whitelist.model.WhitelistMessageContextImpl.WhitelistMessageContextImplBuilder builder()Starts building this context.- Returns:
- a new builder
-
moderation
@Nullable Moderation moderation()The whitelist entry, or null when the whitelist itself was toggled.- Returns:
- the whitelist entry, or null when the whitelist itself was toggled
-
turnedOn
boolean turnedOn()Whether the whitelist was switched on, rather than off.- Returns:
- whether the whitelist was switched on, rather than off
-
withModeration
Returns a copy carrying a different value.- Parameters:
moderation- the whitelist entry, or null when the whitelist itself was toggled- Returns:
- the copy
-
withTurnedOn
Returns a copy carrying a different value.- Parameters:
turnedOn- whether the whitelist was switched on, rather than off- Returns:
- the copy
-