Package com.github.twitch4j.chat.enums
Enum Class MirroredMessagePolicy
- All Implemented Interfaces:
Serializable
,Comparable<MirroredMessagePolicy>
,Constable
Dictates the handling of Shared Chat messages.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAlways publish mirrored chat events.Never publish mirrored chat events.Publish mirrored chat events if the message has not already been observed (and the source channel is not joined). -
Method Summary
Modifier and TypeMethodDescriptionstatic MirroredMessagePolicy
Returns the enum constant of this class with the specified name.static MirroredMessagePolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ACCEPT_ALL
Always publish mirrored chat events. When using this policy, you should handle Shared Chat logic on your own. -
REJECT_IF_OBSERVED
Publish mirrored chat events if the message has not already been observed (and the source channel is not joined). This policy avoids firing effectively duplicated events. However, if your bot is distributed over multiple servers, you should utilizeACCEPT_ALL
and handle de-duplication yourself. -
REJECT_ALL
Never publish mirrored chat events. This is the most conservative option, which avoids any risk of duplicated events. However, this policy can be undesirable for moderation bots as it can enable bypassing of the channel rules.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-