Interface MirrorableEvent

All Known Implementing Classes:
AbstractChannelMessageEvent, ChannelMessageActionEvent, ChannelMessageEvent, CheerEvent, DirectCheerEvent, GiftedMultiMonthSubCourtesyEvent, GiftSubscriptionsEvent, GiftSubUpgradeEvent, ModAnnouncementEvent, PayForwardEvent, PrimeSubUpgradeEvent, RaidEvent, SubscriptionEvent

public interface MirrorableEvent
Indicates chat events that can be mirrored when channels are using the Stream Together Shared Chat feature.

When chats are merged, all PRIVMSG events and most USERNOTICE events are forwarded to the other channels. In addition, bans/timeouts in one channel apply to all channels. Thus, certain applications may wish to ignore any mirrored events while others may wish to act upon them. Be wary of edge cases when your bot is joined to multiple channels in a single shared chat session. You can obtain the other channels in a shared chat session via TwitchHelix#getSharedChatSession.

See Also:
  • Method Details

    • getMessageEvent

      IRCMessageEvent getMessageEvent()
      Returns:
      the raw message event
    • isMirrored

      default boolean isMirrored()
      Returns:
      whether the message originated from a different source channel
    • getSourceChannelId

      default Optional<String> getSourceChannelId()
      Returns:
      the room id of the source channel
    • getSourceMessageId

      default Optional<String> getSourceMessageId()
      Returns:
      the id of the source message in the source channel
    • getSourceBadges

      default Optional<Map<String,String>> getSourceBadges()
      Returns:
      the user's chat badges in the source channel
    • getSourceBadgeInfo

      default Optional<Map<String,String>> getSourceBadgeInfo()
      Returns:
      the user's badge info in the source channel
    • getSourceNoticeType

      default Optional<String> getSourceNoticeType()
      Returns:
      the msg-id of the USERNOTICE in the source channel