Enum Class MirroredMessagePolicy

java.lang.Object
java.lang.Enum<MirroredMessagePolicy>
com.github.twitch4j.chat.enums.MirroredMessagePolicy
All Implemented Interfaces:
Serializable, Comparable<MirroredMessagePolicy>, Constable

public enum MirroredMessagePolicy extends Enum<MirroredMessagePolicy>
Dictates the handling of Shared Chat messages.
  • Enum Constant Details

    • ACCEPT_ALL

      public static final MirroredMessagePolicy ACCEPT_ALL
      Always publish mirrored chat events. When using this policy, you should handle Shared Chat logic on your own.
    • REJECT_IF_OBSERVED

      public static final MirroredMessagePolicy 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 utilize ACCEPT_ALL and handle de-duplication yourself.
    • REJECT_ALL

      public static final MirroredMessagePolicy 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

      public static MirroredMessagePolicy[] 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

      public static MirroredMessagePolicy valueOf(String name)
      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 name
      NullPointerException - if the argument is null