Class ChatReply

java.lang.Object
com.github.twitch4j.common.util.ChatReply

@Unofficial
public final class ChatReply
extends java.lang.Object
Meta-info regarding the parent message being replied to.
  • Field Summary

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

    Constructors
    Constructor Description
    ChatReply​(@NonNull java.lang.String messageId, java.lang.String messageBody, java.lang.String userId, java.lang.String userLogin, java.lang.String displayName)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    java.lang.String getDisplayName()
    The display name of the user who originally sent the message being replied to.
    java.lang.String getMessageBody()
    The text of the original message being replied to.
    @NonNull java.lang.String getMessageId()
    The msgId of the original message being replied to.
    java.lang.String getUserId()
    The id of the user who originally sent the message being replied to.
    java.lang.String getUserLogin()
    The login name of the user who originally sent the message being replied to.
    int hashCode()  
    static ChatReply parse​(java.util.Map<java.lang.String,​java.lang.String> tags)
    Attempts to parse a ChatReply instance from chat tags.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

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

    • REPLY_MSG_ID_TAG_NAME

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

    • ChatReply

      public ChatReply​(@NonNull @NonNull java.lang.String messageId, java.lang.String messageBody, java.lang.String userId, java.lang.String userLogin, java.lang.String displayName)
  • Method Details

    • parse

      public static ChatReply parse​(java.util.Map<java.lang.String,​java.lang.String> tags)
      Attempts to parse a ChatReply instance from chat tags.
      Parameters:
      tags - the message tags associated with a reply.
      Returns:
      the parsed ChatReply, or null if unsuccessful
    • getMessageId

      @NonNull public @NonNull java.lang.String getMessageId()
      The msgId of the original message being replied to.
    • getMessageBody

      public java.lang.String getMessageBody()
      The text of the original message being replied to.
    • getUserId

      public java.lang.String getUserId()
      The id of the user who originally sent the message being replied to.
    • getUserLogin

      public java.lang.String getUserLogin()
      The login name of the user who originally sent the message being replied to.
    • getDisplayName

      public java.lang.String getDisplayName()
      The display name of the user who originally sent the message being replied to.
    • 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