Class ChatCrowdChant

java.lang.Object
com.github.twitch4j.chat.util.ChatCrowdChant

@Unofficial
public final class ChatCrowdChant
extends java.lang.Object
Information regarding a Crowd Chant participation or initiation.
See Also:
Related Uservoice
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String CHANT_MSG_ID_TAG_NAME  
  • Constructor Summary

    Constructors
    Constructor Description
    ChatCrowdChant​(java.lang.String messageId, java.lang.String text, boolean initiator, java.lang.String channelName)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    java.lang.String getMessageId()
    The id for the parent message in the Crowd Chant.
    java.lang.String getText()
    The text being chanted.
    int hashCode()  
    boolean isInitiator()
    Whether this message initiated a crowd chat.
    static @Nullable ChatCrowdChant parse​(IRCMessageEvent event)
    Attempts to parse the ChatCrowdChant information from a chat event.
    void participate​(ITwitchChat chat)
    Sends the same message in the same channel to participate in the Crowd Chant, with the proper chat tag.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • CHANT_MSG_ID_TAG_NAME

      public static final java.lang.String CHANT_MSG_ID_TAG_NAME
      See Also:
      Constant Field Values
  • Constructor Details

    • ChatCrowdChant

      public ChatCrowdChant​(java.lang.String messageId, java.lang.String text, boolean initiator, java.lang.String channelName)
  • Method Details

    • participate

      @Unofficial public void participate​(ITwitchChat chat)
      Sends the same message in the same channel to participate in the Crowd Chant, with the proper chat tag.
      Parameters:
      chat - an authenticated TwitchChat instance.
    • parse

      @Nullable public static @Nullable ChatCrowdChant parse​(IRCMessageEvent event)
      Attempts to parse the ChatCrowdChant information from a chat event.
      Parameters:
      event - the raw IRCMessageEvent.
      Returns:
      ChatCrowdChant (or null if parsing was unsuccessful)
    • getMessageId

      public java.lang.String getMessageId()
      The id for the parent message in the Crowd Chant.
    • getText

      public java.lang.String getText()
      The text being chanted.
    • isInitiator

      public boolean isInitiator()
      Whether this message initiated a crowd chat. When false, the message is simply participating in the chant, rather than initiating.
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object